Even if it receives an answer on the forum first, it would still be cool for others to be able to watch a video with the most important suggestions put into a visual format to more easily learn from it.
@@BaconbuttywithCheese These videos are actually quite easy to do, as I don't prepare anything, I just hit record and then waffle on as things come to mind and hopefully useful stuff comes out and I don't miss much. There is the big risk though of missing something really obvious.
I probably speak for a lot of your viewers, we would love a series of this format where you walk through a real world viewer design and offer help and opinions and maybe solutions to problems and also general guide lines on PCB design...I personal would love it ! if anybody reads this and agrees please add your comment...cheers.
I concur. Having an expert look at beginner to intermediate designs and point out how they could be improved can catch a lot of stuff Dave takes for granted and doesn't think to mention while doing a tutorial. I'm trying to get into simple design like this and videos of this nature would be very helpful.
I often wish I could build something, but haven't tried. Watching peer reviews of other novice / intermediate designs would certainly be informative and build confidence.
Second this. I'd love to see user submitted projects/PCBs that can be analysed and reviewed. Even for working PCBs as "What do you think of this?" type situation
To be honest, I really love all the content! The tear downs, the mailbag...! But your more informational content is what broad me to your channel. I love to hear and see you talking about these things as exactly this is what's missing in other forms of education. I can google formulas and may even be able to properly understand things after a while. But in the project videos, in the design reviews (should be about your second or third?), deep dives in datasheets... THIS is where we can pick up things that are not available in any other format (apart maybe from apprenticeships), little tips tricks, things to watch out for, all these 20year-experience-things. Thanks, Dave! And if you'd like to do these things more I'd be thoroughly pleased :-)
There's nothing more enjoyable than following Dave down (or even half way down) a few rabbit holes. A welcome distraction from current (not the electrical kind) events. There are so many considerations when designing even a simple board like this that I sometimes wonder why anything I design actually works. If I don't learn something new from a video like this, I'm at least reminded of a few things I shouldn't forget even when using some classic parts.
@@EEVblog Of course, it's always better when things go wrong in the lab rather than in the field. And it's nice to learn from other engineers' experience as well as your own. You do an excellent job at sharing yours. I never mind if you waffle on a bit. Hm. The idea of waffles is making me hungry. Thanks once again.
For those that matter, these are the videos we want to watch! This type of video might not get the most views, but it's immensely valuable and interesting for those of us working on similar problems.
This is wonderful. This not only helps the original designer but other people like me that might overlook so many issues. I really look forward to more videos like this.
This is the first EEVBlog video I'm watching after getting through most of Ben Eater's 8-bit computer project videos, and being able to understand everything so much more is amazing!!
I love this. With almost every tangent you learn something new, or at least refresh some of the stuff you should know already :) Looking forward to more of these. Along with fundamentals and repair, these type of videos are my favourite. Thanks Dave!
I don’t really understand much of this but this guys passionate explanations make me excited to learn, I know I’ll come back to these videos and they’ll be a great resource.
Would love to see more of this. As a beginner with PCB design I could have opened a million and one tabs with all the things you've mentioned. This video is definitely going into my collection of resources.
Neat idea using real world examples of circuits with problems and giving your opinions on it. I have read quite about Schmitt triggers and their uses. Just never played too much with them for this case use. I would love to see more circuits that are having problem and can be solved by you giving your knowledge on the subject. Great learning experience.
Now the thing about forums is that you actually have to read stuff, if you're going to learn anything. It's a lot more fun to sit back, glass in hand, and watch Dave explain it all. So ... Great Job! ... 2 thumbs up from me, for this kind of video.
The Raspberry Pi is a 3.3v chip. Your devices hooked up to the I-O connector must be compatible. The Pi has a very limited 3.3v power output. The Vcc voltage isn't specified. Assuming it's 5v from the relay board this shifts the 595's Vih to over 3.15v With the Pi only putting out 3.3v as a logic high MAXIMUM. The margin is to slim for reliable operation. Try using the SN74LS595 for a lower Vih of 2v.
I really enjoy this idea. It is reminiscent of your educational series, but I think the less textbook-esque design reviews is great middle ground between theory and professionally designed circuits from teardowns
Oh how many times I have seen this problem, In fact I just finished simulating a clock layout a week ago before it went out. Yes please you should have an endless stream of reviews and we will all learn
. Big up to you Dave, love your content and makes me aspire to study harder and aspire to greater heights in the beautiful field of electronics. Ty from South Africa
Love this video. Thank for taking the time to share the knowledge. Such traps for yong players are quite hard to find ourself, great for videos like this to point them out.
Learning is always fantastic, Dave may pick some really "come and get you" design to discuss, learn from error is always much impressive than straight forward from the book.
One can also use the OE line and hold all the lines high impedance, so the registers are only needed if you need to hold the previous values’ outputs while loading new values.
I was thinking the same. If it's desired to add the input/output buffers then you could use something like the 74HCT14 Schmitt trigger inverter with the TTL compatible inputs. Of course since this is an inverter the code would need to be changed, I'm not sure if this is an option or not. (Two inverters equals a buffer)
I've been designing circuits and PCBs as a hobbyist for years now, and I still don't understand shift registers. Also, I use JLCPCB for the boards I make and sell, and have been very pleased with what I get. I'm that guy that gets the flat black soldermask. :D And I love ULN2803 and 2804s. They save so much space when doing through-hole
BTW Every so often your glasses were reflecting something green (I'm guessing), letting us see right through your head. Freaky! 🙂 Still, awesome lesson on all the traps for young signals. Thanks.
Your point on high-frequency probing is never taught in college where I come from. We have a lot of situations like these where we know the theory and working of a circuit but end up with seemingly random errors like the OP is facing.
Art of Electronics has the most wonderful explanation of transmission lines and termination. I don't think I ever really understood it before reading that. Also, yes to more reviews. Have guest reviewers if necessary to lighten the workload.
RED HERRING ALERT! Dave goes off the rails thinking that each optocoupler requires 15-20mA, which would require a total of up to 320mA per board, and motivates his whole discussion of bulk capacitance and/or ground bounce on the interface cables or connectors. However, that 15-20mA spec is _per board_, not per channel, and suggests 1mA to 1.25mA per channel. (See 4:30, which shows "per board"). I'm skeptical that it's that low though, because on boards I've seen the LED series resistor is 1k, which would lead to a per channel current of about 3.5mA. Adding to the confusion, the specs for 4-relay and 8-relay boards also say 15-20mA per board, so clearly something has been lost in translation. Conceivably the 15-20mA spec originally referred to how much current is required to operate each relay coil. At any rate, a first order of business, before rushing to diagnoses based on wrong info, is to investigate whether the basic specs make sense. A worse gotcha (but not applicable to the design under review), is that these optocouplers expect to be driven by an output with ability to allow rising to +5V (for "off"), and that makes them not directly compatible with 3.3V logic outputs.
Good catch, I was already about to comment that the sn74hc595 supply current is rated with max. of 70mA. So if each opto-coupler would require 15mA, with 5 lines high this would already exceed the rating and cause problems.
Best improvement is to lose the optocouplers, as what isolation are they providing. Supply input and supply output is the same, and you have a nice octal relay driver to the relays, which is already 3V3/5V input. Only needs 1mA of drive, not 15 times to compensate for the opto having 10% CTR, and would reduce power needed to operate.
I mean, there might be some benefit to optocouplers, we don't know anything about the wider system here. *However,* having 16 optocouplers after a shift register instead of 5 or so before the shift register *is* really crazy. Especially if Schmitt triggers are required, may as well use Schmitt trigger optocouplers on the serial/clock lines and kill 2 birds with one stone.
@@TheHuesSciTech Original this was probably meant for industrial use, where you have a PLC power supply, then an IO power supply and likely a separate driver power supply. All interface between them isolated so a failure in the relay driver side does not destroy your IO system or PLC, which could be a very expensive mistake. However as they now, on this cheap board, no longer use a separate power supply, it makes no sense to use the optocouplers, as they are just acting as a really poor one transistor buffer or inverter. Copied and they, not understanding the original design intent, left the optocouplers and removed the isolated power supply, negating the use of the optocouplers. As they also put catch diodes across the relay coils, while the ULN driver provides exactly the same catch diodes, as part of the unit, deliberately to not need them externally, or to allow you to have faster switching by using an external single transorb to clamp to the transistor Vce limit.
@@SeanBZA Yeah, the more I thought about it, I started to wonder if the relay board was just completely bonkers, and I posted a question about this as a separate comment.
Hi Dave, would love to see more mix signal layout example specifically microcontroller with ADC, and DAC. perhaps some examples of good isolation... This is a great series by the way, slot can be learn from failure ...
As a newbie electronic hobbyist. I found this a great discussion. Can you make more like this please? I can't believe you made this video unscripted. I found it packed with useful information and ideas. Thank you for sharing your thoughts.😁
I'm really liking this kind of video. I'm kind of new when it comes to circuit design. I understand a lot of the basics, but when i design something it does not always work on the PCB. Just like explained in this video there are many traps in what seem to be a simple design. Most issues are caused by things that you simply do no know when you start a design. Once you build the circuit and you notice it doesn't work as expected you research the cause and learn something about a component or circuit that you were unaware of. While i know what a schmitt trigger does, i would probably have designed such a circuit without it myself. By watching this video i will defiantly consider using one in a similar case. So yes, please continue with these design review videos. I have a circuit i would love to have your opinion about. Although i works, it would be great to see how a experienced engineer solves such a problem. In my case i'm trying to do high side current measurements, but as its a automotive application i need to secure it from long high voltage spikes (load dumps) up to 200V. This was very challenging. Its already on the forum actually. www.eevblog.com/forum/projects/pcb-design-high-current-tracks-low-voltage-measurement-(please-review)/msg3222948/ (Please note some small changes were made since my last post)
One important thing is to draw the schematic from left to right. The serial port is in the left side followed by the 595's, 2803's and the header. This makes it very much easier to read. (The presented design is a ratnest that are difficult to debug etc.)
I am really looking forward to experiencing those "walks half way thru the room and it doesn't work anymore" things. Knowing the digital tribe has my back. If not for channels like this,I wouldn't have a shot at trying my own home automation. Bolting things together or rigging a few tons of load no problem,but this is like a whole side of things i always was wanting to explore but never came around to. So like i said,looking forward to it :-)
A great first try. Some of my first designs ~25 years ago were fireworks controllers using a similar serial shift register driving relays design. I had a system that worked really well and seemed very reliable. That is until I had a firing module sitting next to a 4" aerial shell rack. When the first shell was launched, strangely everything in the whole rack launched straight after. What should have been 15 shells all launched throughout the show, launched basically at once. Looked amazing! At first I thought the firing module had suffered a major failure. All the smaller fireworks worked fine. Back at the workshop and I couldn't get it to fault, with the exact same setup (same cables, same everything). My theory was there is a huge pressure wave when large fireworks are launched, and the shock wave might have caused the relays to trigger. It only takes about 1mS for the squib (electric detonator) to fire. So I tried it again on the next show. Same problem. I also tried it just with some squibs (no fireworks) and kicking the firing module. Everything went off! Since then all my designs have been solid state (MOSFET) based. No issues ever since, and I have firing modules sitting right next to 12" shells. Also be wary of what happens on power up. How are you guaranteed that all the relays are OFF!! What is happening before the raspberry PI is loaded? Is there some fail safe there? Feel free to contact me if you have questions, I've designed many fireworks controllers over the years, mostly all wireless these days.
it would be kinda neat to see a similar cirtuit/application, and to take that design and redesign it for various common power levels, and show how increasing the operational power level changes a design
I had a very similar issue when I tried such a circuit. As Dave explained, those are all valid things than can can the issue, with my design I had most of them (signal noise, no schmitt-trigger, power delivery issues). But a great explaination and good solutions. I had to learn it the hard way back then (in the mid 90s). Also another thing is safety. If this is used as a firework controller or in general controlling something dangerous and someone/thing (like a firecracker) damages the signal wire(s), everything will keep the current state (on, in some cases). This can cause nasty things. Always add at least a "green light" signal that turns off everything if going low. Also feed back the output of the last module to the controller to detect signal/wire breaks. If you want to get more secure, add a wire with a pulse signal (like 1 Hz) and a watchdog circuit on the board. If the signal does not toggle for 2 seconds, turn everything off.
Double-buffering seems like overkill... I think the Schmitt buffer at the input would deal with both the slow edge transitions, and would also easily power both the couple of chips of this board and the cabling heading to the next board. And the Schmitt buffer can do logic level translation for you, rendering much of the adding-a-3V3-regulator discussion irrelevant.
I haven't noticed anyone point out that Raspi GPIO is 3v3, but the board seems to be designed for 5v. That would obviously cause issues without level shifters. Edit: Just got to the end of the video and you finally point this out.
I do enjoy the occasional video on your channel every now and then, But I'm gonna parrot others and say that I'd love to see more videos like this. I feel like I learned more during this video than I did in the last couple of months, and my project has nothing to do with fireworks :D
Yes, correct PS bypassing on each IC is a must, even with a power/gnd plane ... and don't forget 'buffering' for long lines.... just hooking a bunch of chips together doesn't mean it's is good design practice.... it's the little items that turn into 'gotchas' .....
I like this kind of video and these could be very helpful to learn to do things properly by following someone who has been in the industry for a long time. However, it would be great if you reviewed some more complex boards/designs or tackled more complicated mistakes/issues. Thanks for the video!
A comment about the supply bypassing. The 2803s don't gulp those 100mA from vcc, they're open collector drivers. Local bypassing won't help, the loop is through the supply for the optocouplers on the relay board, through the 2803, through the gnd pins back to the relay board. You can get gnd bounce so a low impedance gnd is the only thing you need. You actually noticed that in the video later
A series like this would be great not just for young players but areas you don't usually work with. Microwave/RF engineers working on striplines may not appreciate the design challenges of nanoAmp measurement guarding and vice versa. IGBTs and DIN rails may be unfamiliar to designers working with twisted pair and coax Comms. Etc.
Daisy chaining will introduce ground bounce on signals as well to screw the ignal waveforms going along the chain. Note the >100mA driver spikes will assuredly apply glitches on the chaining of signals board to board.
Add me to the cacophony (I hope?) of voices asking for more of this. Identifying pitfalls makes it possible for us ignoramuses to start asking the right questions, if nothing else, and you brought up quite a few here on a relatively simple circuit.
Simple thing to try on a circuit like this prior to final design are test ports on those outputs or add in very small leds to watch the outputs. You dont need thousand dollar logic analyzer youre just trying to see the circuit state.
I use Eagle CAD when reverse engineering boards we do not have schematics for, and need to repair regularly. Some of the boards I work on have a 10 to 30 ohm resistor in the VCC line to each of the logic chips followed by the 10nF capacitor at each logic chip, just to decouple the sensitive chips from dirty power on the board. Don't forget the noise on the ground circuit if the relay boards each are powered from the same supply. High currents to multiple relay boards and multiple logic boards will cause local variations in the potential on each board's ground. This change in the ground potential, will cause problems with the logic levels clocking the boards.
Dave: Didnt prepare and just turned on the cam and started waffling Me: Holy shit... quality content.. I couldnt do that if I had 20 years to prepare Good video :)
The whole topic is around the legendary say said ( Work in Analog - Think Analog , Work in Digital - Think Analog ) but the new generations of EEs have become merely software engineers specifically .. So I damn the people who made this era of new EE done with ready made modules ..
Aside from all the signal integrity problems we should also question the wisdom of using this setup to trigger fireworks (which is the ultimate purpose of the board). One small glitch and you fire something unintentionally. There are lots of safe ways of triggering pyros but this isn't one of them!
I agree, As An electronics designer of Pyrotechnic Firing Systems, I highly recommend NOT TO USE RELAY's for outputting firing current, Best to use N-Channel Mosfets. If you fire large Shells, the blast from them can trigger other relays. I have seen this happen. Plus relays take up alot of space and have a slower response time compared to Mosfets. YOU can drive many mosfets directly from the 595's I ve done this myself
Those relay boards support an independent supply for the relays from the signals inputs, that's what the optocouplers are for, it is brigable though for one supply.
Hi Dave, Speaking about the topic you've missed or topic suggestion; I noticed that I couldn't find in your videos talking about strategies of driving a motor. Maybe as simple DC motor, like what PWM frequency to use (got a personal experience where I needed to drive beyond a frequency or the motor will be a ringing noise, I didn't know about this at all and no one writes about it or maybe I was just dumb). And maybe also the relation between torque and the current draw. Anyway, good series :D
A detailed video with design for EMC/EMI compliance for outdoor applications would be great! It's not easy to find relevant (well structured) information
I think another problem is the pi giving 3v3 signals while the shift registers use 5v without schmidt-trigger inputs is realy bad. A levelshifter with a schmidt-trigger input will help to get consistent results.
Oh just seeing at min. 30: when the minimum voltage for high is 3.15v and the pi supplies 3.3 that is only 0.15 Volt over minimum, which is fairly low and tends to invite bad signals... So the buffers are minimum, at least with level shift capability and s-trigger...
Further to SeanBZA's point, and completely aside from the Viewer's question here, focussing instead entirely on the Relay Module Board: can anyone here contrive a reason for why the relay board needs/benefits from having optocouplers on it? Relays provide all the galvanic isolation you could reasonably want, right? And because there are still ground and 5V connections going through to the Arduino/whatever, there's no real galvanic isolation anyway, right? Am I missing something?
Nope, you aren't missing anything. There is no need for the isolation, and you could remove it all for a simpler lower power system design. You wouldn't of course go buy new boards given he already has these ones, but if you wanted to mod them then that takes time and effort.
You could conceive of a medical application where an extra level of isolation would be required to protect the patient from any single isolation failure. However, I wouldn't expect this design would be allowed anywhere near that sort of medical application as they have completely screwed up any isolation benefit of the opto-couplers with the PCB layout stacking the opto-couplers nose-to-tail so any creepage distances will be minimal.
I think they have the optos so these board are "more robust", ie glitches, over voltages on the inputs do not damage them. In the end blowing the LED inside the opto is "not easy task" compared to blowing the input of a ULN200x.
In the board Dave showed, the relays have 12v coils. So the optocouplers make it easy to drive the relay from a lower voltage (same for 5 volt coils being controlled by 3.3v). One thing not mentioned was to be sure to size the power supply for the relays. They take between 1/3 and a 1/2 watt each...
@@libertywool Wrong, the darlington transistors take care of translating from lower voltages to 12V coils. The optocouplers are not necessary for this.
A series like this is an AMAZING idea! It will give everyone the chance to learn about circuit and PCB design.
You may require the problem to be posted on the forum before you review them so you don't get inundated with requests that will never be published
Even if it receives an answer on the forum first, it would still be cool for others to be able to watch a video with the most important suggestions put into a visual format to more easily learn from it.
@@DennisXiloj If I put out the call then I'd expect to only do like 1% of them. I'd have to explain up front those are the odds.
@@EEVblog It is very cool to hear your explainations audibly, rather than raking through a few forum posts. Time and effort well spent DJ.
@@BaconbuttywithCheese These videos are actually quite easy to do, as I don't prepare anything, I just hit record and then waffle on as things come to mind and hopefully useful stuff comes out and I don't miss much. There is the big risk though of missing something really obvious.
I probably speak for a lot of your viewers, we would love a series of this format where you walk through a real world viewer design and offer help and opinions and maybe solutions to problems and also general guide lines on PCB design...I personal would love it ! if anybody reads this and agrees please add your comment...cheers.
I concur. Having an expert look at beginner to intermediate designs and point out how they could be improved can catch a lot of stuff Dave takes for granted and doesn't think to mention while doing a tutorial. I'm trying to get into simple design like this and videos of this nature would be very helpful.
Yes, I would be educational.
Absolutely
I often wish I could build something, but haven't tried. Watching peer reviews of other novice / intermediate designs would certainly be informative and build confidence.
Second this. I'd love to see user submitted projects/PCBs that can be analysed and reviewed. Even for working PCBs as "What do you think of this?" type situation
Lol I subscribed years ago thinking your channel was more geared towards content like this. I was never disappointed and now I am even happier haha.
I wish he did more of it
My channel has always been an electic mix of content.
@@EEVblog I like the world "electic" -- it's like halfway between "eclectic" and "electric", which is a pretty good description of your channel :-)
@@TheHuesSciTech I saw what you did there :-)
Definitely continue this series, this is like code review for hardware engineers, super helpful.
I have learnt more in this one short video than I have in a dozen others, please do more like this :)
please continue this series Dave, it's interesting.
To be honest, I really love all the content! The tear downs, the mailbag...!
But your more informational content is what broad me to your channel. I love to hear and see you talking about these things as exactly this is what's missing in other forms of education. I can google formulas and may even be able to properly understand things after a while.
But in the project videos, in the design reviews (should be about your second or third?), deep dives in datasheets... THIS is where we can pick up things that are not available in any other format (apart maybe from apprenticeships), little tips tricks, things to watch out for, all these 20year-experience-things.
Thanks, Dave!
And if you'd like to do these things more I'd be thoroughly pleased :-)
There's nothing more enjoyable than following Dave down (or even half way down) a few rabbit holes. A welcome distraction from current (not the electrical kind) events. There are so many considerations when designing even a simple board like this that I sometimes wonder why anything I design actually works. If I don't learn something new from a video like this, I'm at least reminded of a few things I shouldn't forget even when using some classic parts.
You usually need something to go wrong in order to learn all the way that things can go wrong!
@@EEVblog Of course, it's always better when things go wrong in the lab rather than in the field. And it's nice to learn from other engineers' experience as well as your own. You do an excellent job at sharing yours. I never mind if you waffle on a bit. Hm. The idea of waffles is making me hungry. Thanks once again.
TI's TPIC6C595 is worth looking at. It's a 595 type shift register, but with open drain outputs designed to directly drive relays, lamps etc
Even just 74AC595, that one can drive 24mA.
For those that matter, these are the videos we want to watch!
This type of video might not get the most views, but it's immensely valuable and interesting for those of us working on similar problems.
This is wonderful. This not only helps the original designer but other people like me that might overlook so many issues. I really look forward to more videos like this.
And further advice: Use correct time units so you don't fire off the entire show in under a second ;)
This is the first EEVBlog video I'm watching after getting through most of Ben Eater's 8-bit computer project videos, and being able to understand everything so much more is amazing!!
I love this. With almost every tangent you learn something new, or at least refresh some of the stuff you should know already :)
Looking forward to more of these. Along with fundamentals and repair, these type of videos are my favourite.
Thanks Dave!
Wow thanks very much!
I'm working on my first PCB project with 74HC595 chips right now and this is a big help.
I don’t really understand much of this but this guys passionate explanations make me excited to learn, I know I’ll come back to these videos and they’ll be a great resource.
As a delinquent electronics nerd struggling to get back into it, I really appreciate when you take the time to do instructive videos like this.
Would love to see more of this. As a beginner with PCB design I could have opened a million and one tabs with all the things you've mentioned. This video is definitely going into my collection of resources.
This would definitely make a great series.
Neat idea using real world examples of circuits with problems and giving your opinions on it. I have read quite about Schmitt triggers and their uses. Just never played too much with them for this case use.
I would love to see more circuits that are having problem and can be solved by you giving your knowledge on the subject.
Great learning experience.
Appreciate you effort helping so many others learn nitty gritties of your trade! thanks alot
Now the thing about forums is that you actually have to read stuff, if you're going to learn anything. It's a lot more fun to sit back, glass in hand, and watch Dave explain it all. So ... Great Job! ... 2 thumbs up from me, for this kind of video.
Thanks Dave, please do videos like this more often.
love this masterclass. so much information in such a short video.
I’m hooked, best way to learn! Please make these reviews a regular thing.
lots of lessons learned and places to come-a-gutsa, thanks Dave!
The Raspberry Pi is a 3.3v chip. Your devices hooked up to the I-O connector must be compatible. The Pi has a very limited 3.3v power output. The Vcc voltage isn't specified. Assuming it's 5v from the relay board this shifts the 595's Vih to over 3.15v With the Pi only putting out 3.3v as a logic high MAXIMUM. The margin is to slim for reliable operation. Try using the SN74LS595 for a lower Vih of 2v.
Or the HCT version.
I really enjoy this idea. It is reminiscent of your educational series, but I think the less textbook-esque design reviews is great middle ground between theory and professionally designed circuits from teardowns
Oh how many times I have seen this problem, In fact I just finished simulating a clock layout a week ago before it went out. Yes please you should have an endless stream of reviews and we will all learn
Would love to see similar content or possibly a series of videos dedicated to PCB design reviews like this.
.
Big up to you Dave, love your content and makes me aspire to study harder and aspire to greater heights in the beautiful field of electronics. Ty from South Africa
Love this video. Thank for taking the time to share the knowledge. Such traps for yong players are quite hard to find ourself, great for videos like this to point them out.
Please make more of these. This is extremely educational.
Learning is always fantastic, Dave may pick some really "come and get you" design to discuss, learn from error is always much impressive than straight forward from the book.
One can also use the OE line and hold all the lines high impedance, so the registers are only needed if you need to hold the previous values’ outputs while loading new values.
"Worst diagram ever" -- Did your DaveCad license expire?
I agree a series like this would be super helpful for me...
There is the version of the shift register with TTL inputs (74HCT595) that detects n high level above 2V. Maybe worth a test as a simple replacement.
Yes, should have mentioned that.
I was thinking the same. If it's desired to add the input/output buffers then you could use something like the 74HCT14 Schmitt trigger inverter with the TTL compatible inputs. Of course since this is an inverter the code would need to be changed, I'm not sure if this is an option or not. (Two inverters equals a buffer)
make it a series
The Raspberry Pie is a 3.3v device used for driving 5v logic. That is asking for trouble with noise. You need to use logic level converters.
LED finally someone!!! Yes it is LED. Simple. Why do people make their lives harder spelling it out? Thanks Dave. You are the man.
I've been designing circuits and PCBs as a hobbyist for years now, and I still don't understand shift registers. Also, I use JLCPCB for the boards I make and sell, and have been very pleased with what I get. I'm that guy that gets the flat black soldermask. :D
And I love ULN2803 and 2804s. They save so much space when doing through-hole
BTW Every so often your glasses were reflecting something green (I'm guessing), letting us see right through your head. Freaky! 🙂 Still, awesome lesson on all the traps for young signals. Thanks.
Yeah, just noticed that it was my camcorder LCD (which is mostly the green background of course)
Another amazing video. Learned a lot from this video.
Your point on high-frequency probing is never taught in college where I come from. We have a lot of situations like these where we know the theory and working of a circuit but end up with seemingly random errors like the OP is facing.
Great video! I'd love it if you decided to make this a series!
Art of Electronics has the most wonderful explanation of transmission lines and termination. I don't think I ever really understood it before reading that. Also, yes to more reviews. Have guest reviewers if necessary to lighten the workload.
Hi Dave, a great idea for basic PCB projects like this, not complicated and using basic PCB design principles and datasheet research.👍👍👍👍👍
I think it's a great idea to continue wwth this format, it's priceless!
Very good Dave. Please do series on this topic.
Awesome video! Very kind of you to assist.
Definitely continue this series.
Thumbs-up to have such content as a series!
"I could do a whole episode on something like this" he says on an episode about this.
RED HERRING ALERT! Dave goes off the rails thinking that each optocoupler requires 15-20mA, which would require a total of up to 320mA per board, and motivates his whole discussion of bulk capacitance and/or ground bounce on the interface cables or connectors. However, that 15-20mA spec is _per board_, not per channel, and suggests 1mA to 1.25mA per channel. (See 4:30, which shows "per board"). I'm skeptical that it's that low though, because on boards I've seen the LED series resistor is 1k, which would lead to a per channel current of about 3.5mA. Adding to the confusion, the specs for 4-relay and 8-relay boards also say 15-20mA per board, so clearly something has been lost in translation. Conceivably the 15-20mA spec originally referred to how much current is required to operate each relay coil. At any rate, a first order of business, before rushing to diagnoses based on wrong info, is to investigate whether the basic specs make sense.
A worse gotcha (but not applicable to the design under review), is that these optocouplers expect to be driven by an output with ability to allow rising to +5V (for "off"), and that makes them not directly compatible with 3.3V logic outputs.
Good catch, I was already about to comment that the sn74hc595 supply current is rated with max. of 70mA. So if each opto-coupler would require 15mA, with 5 lines high this would already exceed the rating and cause problems.
Yeah, probably easy fix with a 74HCT595 or a level shifting of the signals.
Best improvement is to lose the optocouplers, as what isolation are they providing. Supply input and supply output is the same, and you have a nice octal relay driver to the relays, which is already 3V3/5V input. Only needs 1mA of drive, not 15 times to compensate for the opto having 10% CTR, and would reduce power needed to operate.
I mean, there might be some benefit to optocouplers, we don't know anything about the wider system here. *However,* having 16 optocouplers after a shift register instead of 5 or so before the shift register *is* really crazy. Especially if Schmitt triggers are required, may as well use Schmitt trigger optocouplers on the serial/clock lines and kill 2 birds with one stone.
@@TheHuesSciTech Original this was probably meant for industrial use, where you have a PLC power supply, then an IO power supply and likely a separate driver power supply. All interface between them isolated so a failure in the relay driver side does not destroy your IO system or PLC, which could be a very expensive mistake. However as they now, on this cheap board, no longer use a separate power supply, it makes no sense to use the optocouplers, as they are just acting as a really poor one transistor buffer or inverter.
Copied and they, not understanding the original design intent, left the optocouplers and removed the isolated power supply, negating the use of the optocouplers. As they also put catch diodes across the relay coils, while the ULN driver provides exactly the same catch diodes, as part of the unit, deliberately to not need them externally, or to allow you to have faster switching by using an external single transorb to clamp to the transistor Vce limit.
@@SeanBZA Yeah, the more I thought about it, I started to wonder if the relay board was just completely bonkers, and I posted a question about this as a separate comment.
Hi Dave, would love to see more mix signal layout example specifically microcontroller with ADC, and DAC. perhaps some examples of good isolation... This is a great series by the way, slot can be learn from failure ...
Well addressed. Great educational video even as a reminder.
As a newbie electronic hobbyist. I found this a great discussion. Can you make more like this please?
I can't believe you made this video unscripted. I found it packed with useful information and ideas. Thank you for sharing your thoughts.😁
Nice work Professor. This would make a great series.
Fantastic segment Dave!
I loved the way you converted .01u to 10n without missing a beat lol
I'm really liking this kind of video. I'm kind of new when it comes to circuit design. I understand a lot of the basics, but when i design something it does not always work on the PCB. Just like explained in this video there are many traps in what seem to be a simple design. Most issues are caused by things that you simply do no know when you start a design. Once you build the circuit and you notice it doesn't work as expected you research the cause and learn something about a component or circuit that you were unaware of. While i know what a schmitt trigger does, i would probably have designed such a circuit without it myself. By watching this video i will defiantly consider using one in a similar case.
So yes, please continue with these design review videos. I have a circuit i would love to have your opinion about. Although i works, it would be great to see how a experienced engineer solves such a problem. In my case i'm trying to do high side current measurements, but as its a automotive application i need to secure it from long high voltage spikes (load dumps) up to 200V. This was very challenging. Its already on the forum actually. www.eevblog.com/forum/projects/pcb-design-high-current-tracks-low-voltage-measurement-(please-review)/msg3222948/ (Please note some small changes were made since my last post)
One important thing is to draw the schematic from left to right. The serial port is in the left side followed by the 595's, 2803's and the header.
This makes it very much easier to read. (The presented design is a ratnest that are difficult to debug etc.)
I would like to have a deep dive into signal integrity for 74 series logic.
That would be awesome!
I am really looking forward to experiencing those "walks half way thru the room and it doesn't work anymore" things.
Knowing the digital tribe has my back.
If not for channels like this,I wouldn't have a shot at trying my own home automation.
Bolting things together or rigging a few tons of load no problem,but this is like a whole side of things i always was wanting to explore but never came around to.
So like i said,looking forward to it :-)
A great first try. Some of my first designs ~25 years ago were fireworks controllers using a similar serial shift register driving relays design. I had a system that worked really well and seemed very reliable. That is until I had a firing module sitting next to a 4" aerial shell rack. When the first shell was launched, strangely everything in the whole rack launched straight after. What should have been 15 shells all launched throughout the show, launched basically at once. Looked amazing! At first I thought the firing module had suffered a major failure. All the smaller fireworks worked fine. Back at the workshop and I couldn't get it to fault, with the exact same setup (same cables, same everything). My theory was there is a huge pressure wave when large fireworks are launched, and the shock wave might have caused the relays to trigger. It only takes about 1mS for the squib (electric detonator) to fire. So I tried it again on the next show. Same problem. I also tried it just with some squibs (no fireworks) and kicking the firing module. Everything went off! Since then all my designs have been solid state (MOSFET) based. No issues ever since, and I have firing modules sitting right next to 12" shells.
Also be wary of what happens on power up. How are you guaranteed that all the relays are OFF!! What is happening before the raspberry PI is loaded? Is there some fail safe there? Feel free to contact me if you have questions, I've designed many fireworks controllers over the years, mostly all wireless these days.
it would be kinda neat to see a similar cirtuit/application, and to take that design and redesign it for various common power levels, and show how increasing the operational power level changes a design
Oh yeah , this is good !!! Keep doing content like this !!!
I had a very similar issue when I tried such a circuit. As Dave explained, those are all valid things than can can the issue, with my design I had most of them (signal noise, no schmitt-trigger, power delivery issues). But a great explaination and good solutions. I had to learn it the hard way back then (in the mid 90s). Also another thing is safety. If this is used as a firework controller or in general controlling something dangerous and someone/thing (like a firecracker) damages the signal wire(s), everything will keep the current state (on, in some cases). This can cause nasty things. Always add at least a "green light" signal that turns off everything if going low. Also feed back the output of the last module to the controller to detect signal/wire breaks. If you want to get more secure, add a wire with a pulse signal (like 1 Hz) and a watchdog circuit on the board. If the signal does not toggle for 2 seconds, turn everything off.
Double-buffering seems like overkill... I think the Schmitt buffer at the input would deal with both the slow edge transitions, and would also easily power both the couple of chips of this board and the cabling heading to the next board. And the Schmitt buffer can do logic level translation for you, rendering much of the adding-a-3V3-regulator discussion irrelevant.
Yes, true, it could also drive the following board.
I haven't noticed anyone point out that Raspi GPIO is 3v3, but the board seems to be designed for 5v. That would obviously cause issues without level shifters.
Edit: Just got to the end of the video and you finally point this out.
I do enjoy the occasional video on your channel every now and then, But I'm gonna parrot others and say that I'd love to see more videos like this. I feel like I learned more during this video than I did in the last couple of months, and my project has nothing to do with fireworks :D
Yes, correct PS bypassing on each IC is a must, even with a power/gnd plane ... and don't forget 'buffering' for long lines.... just hooking a bunch of chips together doesn't mean it's is good design practice.... it's the little items that turn into 'gotchas' .....
I like this kind of video and these could be very helpful to learn to do things properly by following someone who has been in the industry for a long time. However, it would be great if you reviewed some more complex boards/designs or tackled more complicated mistakes/issues. Thanks for the video!
A comment about the supply bypassing. The 2803s don't gulp those 100mA from vcc, they're open collector drivers. Local bypassing won't help, the loop is through the supply for the optocouplers on the relay board, through the 2803, through the gnd pins back to the relay board. You can get gnd bounce so a low impedance gnd is the only thing you need.
You actually noticed that in the video later
A series like this would be great not just for young players but areas you don't usually work with. Microwave/RF engineers working on striplines may not appreciate the design challenges of nanoAmp measurement guarding and vice versa. IGBTs and DIN rails may be unfamiliar to designers working with twisted pair and coax Comms. Etc.
I think you blew his brain, and you are right.
You must have your fundamentals done! :)
Hope he follows through with your advice.
Design review is soo helpful thanks
Daisy chaining will introduce ground bounce on signals as well to screw the ignal waveforms going along the chain. Note the >100mA driver spikes will assuredly apply glitches on the chaining of signals board to board.
Add me to the cacophony (I hope?) of voices asking for more of this. Identifying pitfalls makes it possible for us ignoramuses to start asking the right questions, if nothing else, and you brought up quite a few here on a relatively simple circuit.
'Dave does your homework' would be a great title for this kind of video
Nothing useful to say other than nicely done. Signal integrity at any data rate can trip up anyone, including experienced engineers.
Simple thing to try on a circuit like this prior to final design are test ports on those outputs or add in very small leds to watch the outputs. You dont need thousand dollar logic analyzer youre just trying to see the circuit state.
I use Eagle CAD when reverse engineering boards we do not have schematics for, and need to repair regularly. Some of the boards I work on have a 10 to 30 ohm resistor in the VCC line to each of the logic chips followed by the 10nF capacitor at each logic chip, just to decouple the sensitive chips from dirty power on the board. Don't forget the noise on the ground circuit if the relay boards each are powered from the same supply. High currents to multiple relay boards and multiple logic boards will cause local variations in the potential on each board's ground. This change in the ground potential, will cause problems with the logic levels clocking the boards.
Dave: Didnt prepare and just turned on the cam and started waffling
Me: Holy shit... quality content.. I couldnt do that if I had 20 years to prepare
Good video :)
this video deserves more than one like
The whole topic is around the legendary say said ( Work in Analog - Think Analog , Work in Digital - Think Analog ) but the new generations of EEs have become merely software engineers specifically .. So I damn the people who made this era of new EE done with ready made modules ..
Aside from all the signal integrity problems we should also question the wisdom of using this setup to trigger fireworks (which is the ultimate purpose of the board). One small glitch and you fire something unintentionally. There are lots of safe ways of triggering pyros but this isn't one of them!
I agree, As An electronics designer of Pyrotechnic Firing Systems, I highly recommend NOT TO USE RELAY's for outputting firing current, Best to use N-Channel Mosfets.
If you fire large Shells, the blast from them can trigger other relays. I have seen this happen. Plus relays take up alot of space and have a slower response time compared to Mosfets. YOU can drive many mosfets directly from the 595's I ve done this myself
Loved it Dave more vids like this pls pls pls!!!
Superb video! Dave is Legend
Those relay boards support an independent supply for the relays from the signals inputs, that's what the optocouplers are for, it is brigable though for one supply.
Hey Dave grate video, like to see more like this in the future if you are willing. vary cool
Some of those 595's have Schmitt trigger and slow rise input filtering as well (the TI part with the same model above does at least).
Hi Dave,
Speaking about the topic you've missed or topic suggestion; I noticed that I couldn't find in your videos talking about strategies of driving a motor. Maybe as simple DC motor, like what PWM frequency to use (got a personal experience where I needed to drive beyond a frequency or the motor will be a ringing noise, I didn't know about this at all and no one writes about it or maybe I was just dumb). And maybe also the relation between torque and the current draw.
Anyway, good series :D
A detailed video with design for EMC/EMI compliance for outdoor applications would be great!
It's not easy to find relevant (well structured) information
I think another problem is the pi giving 3v3 signals while the shift registers use 5v without schmidt-trigger inputs is realy bad. A levelshifter with a schmidt-trigger input will help to get consistent results.
Oh just seeing at min. 30: when the minimum voltage for high is 3.15v and the pi supplies 3.3 that is only 0.15 Volt over minimum, which is fairly low and tends to invite bad signals...
So the buffers are minimum, at least with level shift capability and s-trigger...
TI recently came out with the SN74HCS595 that has Schmitt-trigger inputs.
Further to SeanBZA's point, and completely aside from the Viewer's question here, focussing instead entirely on the Relay Module Board: can anyone here contrive a reason for why the relay board needs/benefits from having optocouplers on it? Relays provide all the galvanic isolation you could reasonably want, right? And because there are still ground and 5V connections going through to the Arduino/whatever, there's no real galvanic isolation anyway, right? Am I missing something?
Nope, you aren't missing anything. There is no need for the isolation, and you could remove it all for a simpler lower power system design. You wouldn't of course go buy new boards given he already has these ones, but if you wanted to mod them then that takes time and effort.
You could conceive of a medical application where an extra level of isolation would be required to protect the patient from any single isolation failure.
However, I wouldn't expect this design would be allowed anywhere near that sort of medical application as they have completely screwed up any isolation benefit of the opto-couplers with the PCB layout stacking the opto-couplers nose-to-tail so any creepage distances will be minimal.
I think they have the optos so these board are "more robust", ie glitches, over voltages on the inputs do not damage them. In the end blowing the LED inside the opto is "not easy task" compared to blowing the input of a ULN200x.
In the board Dave showed, the relays have 12v coils. So the optocouplers make it easy to drive the relay from a lower voltage (same for 5 volt coils being controlled by 3.3v). One thing not mentioned was to be sure to size the power supply for the relays. They take between 1/3 and a 1/2 watt each...
@@libertywool Wrong, the darlington transistors take care of translating from lower voltages to 12V coils. The optocouplers are not necessary for this.
I loved this! More please.