Тёмный

#190 

Ralph S Bacon
Подписаться 54 тыс.
Просмотров 12 тыс.
50% 1

The 555 is the most popular integrated circuit ever manufactured. As of 2003, it was estimated that 1 billion units were manufactured every year. And we are using it this week in this timer watchdog that power recycles your Arduino (or other µController of choice) if it hangs up.
JLCPCB Only $2 for PCB Prototype any colour jlcpcb.com/
Special offer for SMT assembly.
00:00 Welcome Back!
02:03 Reasons for MCUs hanging
02:55 JLCPCB PCBs $2 - How to generate files for PCB assembly
05:10 End of JCLPCB walk through
05:58 Circuit diagram from the article
06:29 Whiteboard: 555 Timer
08:42 Whiteboard end
12:18 Measuring capacitor charge
13:22 Oscilloscope trace of trigger
17:21 EasyEDA modified circuit layout
21:37 Where to buy the components
24:41 Combined shipping costs from Banggood
25:23 Engineer's Mini Notebook: 555 Timer IC Circuits (Forrest M III Mimms)
27:22 PCB Layout example
27:39 Holiday Destination Calculator
List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/RU-vidVideoList-RalphB...
=============
INFORMATION
=============
Elektor Magazine Article (Wolfgang Borst)
UK: www.electronics-lab.com/free-...
DE: www.elektormagazine.de/news/k...
www.elektormagazine.com/news/...
Engineer's Mini-Notebook: 555 Timer IC Circuits - 1 Jan. 1989
By Forrest M Mills III - He's only 76 now, actually
amzn.to/3eGOUdS
Latch up protection - Microchip
ww1.microchip.com/downloads/en...
Avoiding latch-up in CMOS chips
www.embedded.com/avoiding-lat...
555 timer IC
en.wikipedia.org/wiki/555_tim...
===========
HARDWARE
===========
10pcs NE555 NE555P NE555N 555 Timers DIP-8
www.banggood.com/10pcs-NE555-...
CJMCU-4599 Si4599 N and P Channel 40V (D -S) MOSFET
banggood.com/CJMCU-4599-Si4599-N-and-P-Channel-40V-D-S-MOSFET-Expansion-Board-Module-p-1350610.html?p=FQ040729393382015118&
10pcs 2N7000 N-Channel Transistor Fast Switch MOSFET TO-92
www.banggood.com/10pcs-2N7000...
If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite journey
My channel, GitHub and blog are here:
------------------------------------------------------------------
/ ralphbacon
ralphbacon.blog
github.com/RalphBacon
------------------------------------------------------------------

Наука

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 213   
@neildarlow
@neildarlow 4 года назад
The input circuit is a differentiator. It's purpose is to make the 555 trigger on an edge of the supplied pulse not its level. Without the differentiator, if your Arduino were to hang leaving the trigger output high then the circuit wouldn't operate correctly. It would keep the load powered all the time. I agree the diode is oriented incorrectly. It's there to clamp the falling edge of the input waveform to 0V.
@FunkySpunkyJunky
@FunkySpunkyJunky 4 года назад
Ahhh thank you. I was wondering what would happen if it hung in high state. Ralph didn't answer this in the video. The input circuit makes sense now.
@rodneyvinen1594
@rodneyvinen1594 4 года назад
Brilliant. Thank you and thank you Ralph, this little circuit is a great find.
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
4 года назад
Hi Ralph. Thanks for your videos. Are you sure is a good idea to remove the capacitor? For me the goal of this part of the circuit is to insure the Arduino is not stuck *including during sending the pulse*. Without the capacitor, il the pulse stay high, the NE555 will never trigger and Arduino will stay frozen. With the capacitor, the Arduino will restart in both cases (pulse stay low or stay high). I'm wrong?
@RalphBacon
@RalphBacon 4 года назад
Yes, absolutely. Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@cmuller1441
@cmuller1441 4 года назад
The capacitor role is to differentiate the signal. The problem is that if you keep the input signal high for too long it charges. When the input signal goes down that creates a negative voltage at the gate of the mosfet. That's why there's a diode (that should be in reverse, the schematic is wrong). Your problem comes from the fact that you drive the input high with your button but you are not driving it down like a mcu would do. You just let the input float. Actually if you put the pull down resistor at the input, the input will go down. The discharge of the input capacitor is done through the 2 pull down resistors (before and after it). To properly simulate the Arduino you should use a 2 way switch to select 0 or 5V at the input. To use with an Arduino I would remove the useless input pull down and I would add a 1k resistor in series with the diode to limit the current during the capacitor discharge.
@cmuller1441
@cmuller1441 4 года назад
BTW input capacitor differentiator is there for a good reason: if you directly send a pulse to the mosfet to reset the 555 but the Arduino crashes (unluckily) when the pin is high then the 555 stays continuously reset and you don't power cycle the Arduino.
@BusyElectrons
@BusyElectrons 4 года назад
@@cmuller1441 I had this exact same thought.
@richardcrook3427
@richardcrook3427 4 года назад
Yes, my thought too. The Arduino could stop with an output pin either high or low.
@RalphBacon
@RalphBacon 4 года назад
Since the video I've got it working 100% with the capacitor accepting a gazillion pulses (well, several in quick succession, anyway) so I will leave those components in, with the diode in the correct orientiation (cathode to input signal, not ground). And yes, many of you have suggested the reason for the cap, makes perfect sense.
@jenskaa4044
@jenskaa4044 4 года назад
Tnx for intetesting video. You need the input circuit to ensure a Restart if the input trigger stays high due to a failure in your Arduino sw or hw
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@Toro-Tor
@Toro-Tor 4 года назад
“And Welcome Back” that’s when you get a like from me, although i haven’t watched the rest. Thank you Ralph for all your efforts and great Videos !
@RalphBacon
@RalphBacon 4 года назад
My pleasure! You have a lot of catching up to do with my videos!
@familyplans3788
@familyplans3788 4 года назад
watchdog timers are one of the most neglected aspect of microcontrollers ! basically every microcontroller needs a seperate wdt , and yes people will say that arduinos have a built in wdt but if the arduino hangs then its no good this is one of the clearest videos i have seen on wdt's
@RalphBacon
@RalphBacon 4 года назад
Glad you like it! I'm designing a simple PCB as it can be made really small and retofitted into almost anywhere, like my fridge door alarm that had hung again this morning.
@familyplans3788
@familyplans3788 4 года назад
@@RalphBacon looking so much to seeing it
@meetthefloccers8112
@meetthefloccers8112 4 года назад
Is the front end circuit protecting from a arduino lock up high? What happens if the arduino goes high and stays high? I think the front end circuit protects this.
@melissa.merritt
@melissa.merritt 4 года назад
I was thinking the same thing 🤔
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@melissa.merritt
@melissa.merritt 4 года назад
@@RalphBacon thanks, this was very helpful information 👍
@allanyoung4510
@allanyoung4510 4 года назад
Hi i had the same 555 book many years ago it was fantastic! Keep up the good work.
@RalphBacon
@RalphBacon 4 года назад
Thanks, will do!
@markday3145
@markday3145 4 года назад
I really enjoyed this video. The circuit's level of complexity is a very good fit for me. I spent an hour or two to really understand what it was doing (especially the input part), and then several more hours simulating it and tweaking values to see what effect it had. As a result, I learned a lot.
@RalphBacon
@RalphBacon 4 года назад
Glad it was helpful!
@mrwonk
@mrwonk 3 года назад
I believe the additional circuitry was to reset the MC in the event the hang happens when the button is in the 'pressed' state. Without that, it looks to me like the modified circuit only acts as a watchdog when the pulse isn't engaged for a few seconds. if I'm alternating the pulse in my Arduino loop every second, the Arduino is just as likely to hang in the pulse state as the non-pulse sate.
@RalphBacon
@RalphBacon 3 года назад
Yes, that is true, David. I did an update with the extra components explained and included in my schematic in video #194 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-WpihLPvY9Ac.html
@mirkohaeberlin
@mirkohaeberlin 4 года назад
I really enjoy watching your videos and especially your humor :D
@RalphBacon
@RalphBacon 4 года назад
Glad you like them!
@mikescott58
@mikescott58 4 года назад
The reason for the resistor and capacitor on the input is in case the circuit locks up with the input MOSFET on, the 555 will not time out and it will not do its job.
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@jerryeiting5367
@jerryeiting5367 4 года назад
Very timely video. I was just thinking of adding a watchdog circuit to a project for work, involving testing of a capacitor bank board as it comes off of a wave soldering machine. I can see with the currents involved in testing it where it might lock up the arduino used to test it. I think I'm going to use this technique! Thanks!
@RalphBacon
@RalphBacon 4 года назад
Glad it was helpful!
@karens-jclark4199
@karens-jclark4199 4 года назад
Hey Ralph . I made up one of these circuits onto some perf-board . Works great and perfect as a minder for dealing with hang-ups when you cant always get to the MCU. Was so happy with this cos it fit into a project of mine , so much so that I ordered 10 NE555 chips (£2.70 , bargin) cos I know ill implement this design into a number of projects . A nice way to deal with hang-ups , cheap , easy to follow video of yours to make it and easy to assemble. Thank you for showing us this :) .
@RalphBacon
@RalphBacon 4 года назад
Glad it worked out for you, Karen. For me too, as my (rather smaller than expected) mostly-SMD PCBs have arrived and it all worked first time. I was as surprised as anyone! I'll be showing the fruits of my labour as I also panelised the board which also worked. I know, it just gets better and better.
@karens-jclark4199
@karens-jclark4199 4 года назад
@@RalphBacon Thats cool , I look forward to seeing them and glad they worked first time . I designed a board on Easy EDA and may well order some , was more learning the software . My hand made board is about 2cm x 3cm , I used a DIP NE555 and SMD resistors and caps , apart from the electrolytic cap . Again , many thanks for the videos and I am glad you got your eye fixed .
@RalphBacon
@RalphBacon 4 года назад
If you are UK based you can request via email a PCB. If you are not UK-based, my commiserations (on so many levels).
@karens-jclark4199
@karens-jclark4199 4 года назад
@@RalphBacon Yep uk , in kent ... Request from you or the PCB company ? Hope you are well Ralph .
@michaelhyde9971
@michaelhyde9971 4 года назад
Great video. Holiday destination is definitely right. Thanks
@RalphBacon
@RalphBacon 4 года назад
It really is! And home is where the heart is. Or is that hearth? Anyway, who want's to go to some Covid-19 riddled foreign location anyway? Oh. I see. Next year then.
@ronalddhs3726
@ronalddhs3726 4 года назад
Hi Ralph, that holiday calculator is very cheeky math trick (it could've said take any number multiply it by 9 and prove that is divisible by 9) :) loved it...Great video about watch dogs; looking forward to the next one.
@RalphBacon
@RalphBacon 4 года назад
Happy holidays! Oh. Never mind, next year.
@RalphWLundvall
@RalphWLundvall 4 года назад
I found Volume 1 "Timer, Op Amp ..." ( Green cover ) on eBay for under $6 shipped. I took it to Kinko's and had it spiral bound so it will lay flat when opened. Great projects.
@RalphBacon
@RalphBacon 4 года назад
Sounds great! So much info in those books. Good idea to spiral bind them too.
@RalphWLundvall
@RalphWLundvall 4 года назад
Update: a USA seller (theclassicarchives) out of Tennessee is selling a $9.99 CD of scans of most of the Radio Shack series. 555 timer, Op Amp circuits etc etc. Some pages quite yellowed but even those print ok. 62% reduction when printing handles some problems I found. "Math for electronics students" included.
@schluderjupp
@schluderjupp 4 года назад
Nice Video Ralph! You almost gave me a heart attack at 26:42 as I frantically tried to catch my iPad because I thought it was falling from the table. 😃
@RalphBacon
@RalphBacon 4 года назад
Ha ha! Sorry to cause you any worry there, Christian, but I could see how you might have thought that. I'll have to use that effect again... keep you on your toes.
@schluderjupp
@schluderjupp 4 года назад
Ralph S Bacon with that effect you surely will. 😃🤣
@vaneay
@vaneay 4 года назад
maybe the capacitor and diode on the input is to account for a hang on high level in order to not block the watchdog
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@marcolokker911
@marcolokker911 4 года назад
the book can be found on the Internet archive, archive.org/details/Forrest_Mims-engineers_mini-notebook_555_timer_circuits_radio_shack_electronics
@RalphBacon
@RalphBacon 4 года назад
Amazing! (Is this legal?) You can see this circuit is just a modification of someothers in that book.
@tablatronix
@tablatronix 4 года назад
Awesome this is exactly what I have been looking into this week! Looking into the simplest WDT, either a 1 ic solution , 555, or a rc loop
@RalphBacon
@RalphBacon 4 года назад
Glad it helped! I'm getting a PCB design together too, might help.
@whitefields5595
@whitefields5595 4 года назад
Ralph, This was quite timely. The Watchdog timer on the Arduino Pro Mini causes it to hang up. The Pro Mini was developed by Sparkfun and it does not use the OPTIBOOT bootloader as the other 328P based Arduinos. You have to re-load the bootloader. So items like this, using dedicated external circuits, is very useful. More of this please!
@RalphBacon
@RalphBacon 4 года назад
I'm glad you think this is useful, Mr Whitefields. I'm designing a simple PCB so it can be retrofitted in some circuits or used in brand new ones too. I still haven't received my Triac dimmer components BTW, just so you know! Slow boat from China indeed.
@whitefields5595
@whitefields5595 4 года назад
@@RalphBacon Ralph, I get most of my bits from this guy www.bitsbox.co.uk/index.php?main_page=login&zenid=5l1k5o3h6tfl5o4esi3nh7iti7
@RalphBacon
@RalphBacon 4 года назад
I've used them! And my triac dimmer arrived today! So much to do!
@whitefields5595
@whitefields5595 4 года назад
@@RalphBacon .... I'll be watching!
@andymouse
@andymouse 4 года назад
Hi Ralph, There's always room for a 555, the little darling of the elecy world, and us Arduinites should not forget that ! and yep I think with the diode the right way round you just have some basic input filtering that's not critical....cheers.
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@wires4auto
@wires4auto 4 года назад
Thanks Ralph for trying to revive the 555ic! It is still the first IC I teach kids about🥰 it's got a special place in my 💛 too but unfortunately I would rather have reduced component count and use good programming skills to ensure no hang ups. Your other video on using the internal watchdog timer is my resource for programming "anti hang up" 😇 I would love to see a video about teaching people your thought process for a project. The idea Block diagram, idea to paper Software development/ skatch Prototype build on breadboard Testing! Lots of testing! PCB design/refining Ordering parts/ parts in stock/ trying to order common parts. Build and test 😀 obviously not in one video shoot 😂 Thanks again for another educational video 👍
@RalphBacon
@RalphBacon 4 года назад
Most popular IC ever produced, that 555. Sigh. Those were the days. No null pointer errors or anything! My thought process is flawed however: Idea #1 Block diagram on paper. Idea #2 and #3. Block diagram on paper. Prototype of idea #3 as it was most recent. Idea didn't work because I followed the block diagram for idea #1. Order components anyway. Idea #4, #5, #6. Block diagrams of ideas #5 and #6. Forgot idea #4. Components arrive, can't remember which idea they were for. Idea #7 and #8 (which was the same as idea #2). Can you see where this whole process is flawed?
@wires4auto
@wires4auto 4 года назад
@@RalphBacon 😆 we have similar thought process, mines is worse as I don't write it down, if I do it's all on separate bits of paper 😕. Even if you tried to teach us a smart way of doing it. Like when writing code don't have everything in the main loop. Have other void statements to help simplify. I get asked alot how to join two plagiarized sketchs together 🙈 My other mistake, I ordered PCBs before I had tested my prototype properly because I was so confident. Then I realized I needed to bodge a resistor and a cap onto it😣. Thanks,
@JamesFraley
@JamesFraley 3 года назад
Great Video!
@RalphBacon
@RalphBacon 3 года назад
Glad you enjoyed it
@ManfredAckermann
@ManfredAckermann 4 года назад
Why enforce a pulse hardware wise? I imagine because the Arduino doesn't produce a pulse. It produces a change to high and a change to low. What happens if the Arduino freezes before the high-to-low change and the trigger (IN uC) stays on all the time and NE555 has no chance to flip and turn off the Arduino. Am I wrong?
@RalphBacon
@RalphBacon 4 года назад
You, Manfred, and just about everyone else who has commented here, has determined the use of that capacitor! And, in the interim, I've got it working with many pulses too, so those components remain in my final design.
@richarddalling913
@richarddalling913 3 года назад
I think you need the filter on the beginning of the circuited because if the reset ping hangs high the cap will never charge up and reset the micro
@RalphBacon
@RalphBacon 3 года назад
Yes, the cap was definitely required so that if the pulse stayed high (the μC just happened to latch at that point) it would not reset. PCB design includes the cap. Works really nicely.
@MrCaptianCrunch
@MrCaptianCrunch 3 года назад
@@RalphBacon Correct me If I'm wrong, but You could just put a bigger cap in there (220n or something) to make the pulse longer.
@MrCaptianCrunch
@MrCaptianCrunch 3 года назад
@@RalphBacon Or go overkill and add a single shot 555 triggered from the micro....
@MUHAMMADYAWARIFRAHEEM
@MUHAMMADYAWARIFRAHEEM 4 года назад
Very informative video
@RalphBacon
@RalphBacon 4 года назад
Glad you think so! Nice to hear from you, Muhammad.
@stephaneshm3043
@stephaneshm3043 4 года назад
thanks for this solution, i use a DS1232 for wtachdog with powersupply control.
@RalphBacon
@RalphBacon 4 года назад
Ooh, a purpose built chip! Looks interesting but I wonder if that could "hang" itself? That's the beauty of this design, the 555 is not intelligent enough to be able to hang up - no offense, 555! datasheets.maximintegrated.com/en/ds/DS1232.pdf
@willofirony
@willofirony 4 года назад
I do remember the Engineer' Mini Notebook very well. For pre-millennial viewers: this and most of the English books published by Babani was what makers used before the internet. Yes, there was a time when all URLs were error 404. Creeping elegance forces me to wonder how easy it would be to make your circtuit also offer the option of auto power-off. Great video, ralph. As family plans has written, watchdog timers are a neglected subject. Anybody expecting the internal watchdog timer to be "job done" is mistaken unless the sketch is totally independant of external resources.
@RalphBacon
@RalphBacon 4 года назад
I devoured his books (the series I bought from Tandy in Aylesbury, UK, long gone) in the 1990s before I got into µControllers. In fact it was just as I was getting into web design in my day job. Those books were really cool and I tried out several circuits. Then PICs came along and the rest, as they say, is history. But I still do like the 555.
@willofirony
@willofirony 4 года назад
@@RalphBacon I too have a soft spot for the 555. The schematic of the internals looks deceptively simple, but by having most of the passive components external, they achieved an incredible flexibility. I last used one in monostable mode to add a "switch on, wait 30 seconds then switch back on again" action for a "wall wart" PSU for my router. Nowadays, that is redundant because the capacitors tend to discharge quicker nowadays. Nevertheless, the 555 worked time and time again without any problems. In two years we can celebrate its 50th birthday. So, it must have been doing something right.
@imstubby6844
@imstubby6844 4 года назад
In depth brilliance as uaual, just having problems with a nano that hangs in a battery management circuit, when it does the mosfets get very hot this could be the answer!
@RalphBacon
@RalphBacon 4 года назад
This could indeed be the answer! And you can change the delay by adjust the capacitor (a bit) like I did.
@vonries
@vonries 4 года назад
Have a great day Ralph.
@RalphBacon
@RalphBacon 4 года назад
You too! Nice to hear from you, Steven.
@ricardogava1604
@ricardogava1604 4 года назад
So... in the past I had some issues with an ESP8266 and I created an external watchdog with an attiny13. It worked like a charm, but there was a problem wich I solved with a new code. The ESP8266 sometimes just break up the pulse with state HIGH! Yep... So this part you want to remove from the circuit is actually a genius idea. I know that ESP8266 have an internal watchdog, but it needs some pins states that was not good for my application.
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@deepakjos2000
@deepakjos2000 Год назад
Other way around, all microcontrollers have a reset pin, one can reset it by connecting output of LM555 to the reset pin.
@deepakjos2000
@deepakjos2000 Год назад
This will avoid the two mosfets on output.
@RalphBacon
@RalphBacon Год назад
If I recall correctly, this wasn't about just resetting the microcontroller, but more about doing a hard power-cycle to reset everything. But your observation is correct, we could reset the μC the way you suggest (bring the RST pin LOW).
@RobB_VK6ES
@RobB_VK6ES 4 года назад
you should model the input network in spice. You might be surprised by the results. Oh and in the interest of being green, use the cmos version of the 555 :)
@RalphBacon
@RalphBacon 4 года назад
I have used the CMOS version 7555 previously, as it takes far less power, but also a bit static discharge sensitive too? In this case I'm not sure the benefits outweigh the disadvantages. Thoughts?
@ChagoiSteve
@ChagoiSteve 4 года назад
Great Timing Ralph. I'm experimenting with 555's for an idea with multiple door bells, Some wired, some RF, want one bell push to drive both via 555 timers and relays. Problems with exiting system of button bounce for RF units not reacting quick enough so 555 will created a delay and the relay drive the RF transmitter. Well that's my plan Maybe mosfet!, Wired door bells 12v ac mains! so again hence relay's! Engineer's Mini-Notebook: 555 Timer IC Circuits fab very interesting read
@RalphBacon
@RalphBacon 4 года назад
Sounds great! If you read the comments here you will find links to download his 555 book - he has a switch bounce circuit in it.
@ChagoiSteve
@ChagoiSteve 4 года назад
@@RalphBacon yeap found the links for download thanks. Is it possible to have a bistable 555 circuit trigger an astable 555 circuit that runs for a set time or a set no of pulses? I've tried but failed so far.
@RalphBacon
@RalphBacon 4 года назад
Timing would be critical. Bu tI believe there is a pulse counter circuit in there somewhere?
@PIXscotland
@PIXscotland 4 года назад
The rapid pressing was not allowing C1 to discharge so the DC pulses got lost. Try putting a discharge resistor across C1, maybe 1M. As long as it can discharge a reasonable amount before the next pulse the circuit will work properly. C1 is needed to ensure a hung input isn't going to block a reset. Not having C1 will allow +V DC to stop the reset pulse.
@RalphBacon
@RalphBacon 4 года назад
Pasted reply: Yes, the cap, resistor and diode are all there to ensure that should the input pulse "stick" at high, the MOSFET will still remain off and reset the power. And the diode is to clamp the cap correctly, as many of you have stated. I've got it all working 100% now, no matter how fast the input pulses arrive. Update (including PCB) in a future video.
@CTCTraining1
@CTCTraining1 4 года назад
Great video... very retro IC selection, although I was brought up to think that all circuits worth building could be achieved with a 555 timer. Feels a bit like the rest of the world trying out what it was like to live in the late 60s / early 70s.
@RalphBacon
@RalphBacon 4 года назад
Yes, exactly, Chris! Before I got into µControllers every problem looked like a 555 solution would fix it. Ha ha!
@JamesFraley
@JamesFraley Год назад
Is there a sufficiently inexpensive micro-controller that could be added to a project to perform this task? I've seen some videos of 10 cent RISC microcontrollers. Program one of those as a watch dog in some way? I think it could add a lot of flexibility and the cost of a little power.
@JamesFraley
@JamesFraley Год назад
Sorry, I should have waited until 10:46 when you explain why not to use a microcontroller!
@RalphBacon
@RalphBacon Год назад
I'm glad you watched that bit, Jim, as that was what I was going to tell you!
@shermluge
@shermluge 4 года назад
Ralph !!! My Alexa said she could not find the "work shop lights", Next time say "Office Light", That will work. Thanks Sherm
@shermluge
@shermluge 4 года назад
Also great circuit.. I've got an ESP8266 in my greenhouse that could use this..
@RalphBacon
@RalphBacon 4 года назад
I'm going to say "Alexa, send Ralph Bacon the first thing on his wish list". Will that work too, Sherm? 😂
@shermstebbins1751
@shermstebbins1751 4 года назад
@@RalphBacon Oh yes!!! Its underwear for my wife :)
@RalphBacon
@RalphBacon 4 года назад
Oh. Alexa, Send Ralph Bacon the first item on RALPH's list. That's is not underwear for your wife, I assure you!
@PL-VA
@PL-VA 4 года назад
Do you have materials or a video where you discuss the advantages of using an external WDT vs. the internal one? Same principle but no need for additional hardware? I was planning to use the wdt library for my next project, so if there's things that could make me reconsider using the internal WDT I'll like to know.
@RalphBacon
@RalphBacon 4 года назад
I've used the internal watchdog too, but there are differences between that and an external one, Peter. I'll put some links at the bottom of this comment. "Internal watchdogs are a good step towards building a robust embedded system, but on their own they don’t provide a very robust solution. In order to really up the ante with respect to robustness, developers need to consider external watchdogs." - Digikey The internal watchdog can only reset the µController. There may be situations where items other than the µC need resetting too and that can only be accomplished by a proper power cycle. We all know that sometimes a phone / PC / digibox all work better when they have been powered off and on again. The µC can occasionally latch up. That is, it's got itself into a situation where the electronics are stuck in a particular mode and a soft reset won't clear it. I've had SPI or I2C peripherals that don't respond and the code just sits there forever waiting. Now whilst the internal WDT will reboot the µC the SPI/I2C device is still sitting there not responding and will just cause another hang up. A full power reset is required in situations like this. Although not a concern for hobbyists, commercial manufacturers find it beneficial to be able to point to a piece of circuitry and say "That's our watchdog" for certification reasons. Totally independent from the µC, it will power cycle the entire device. Anyway, if you search Google for "why use external watchdog for microcontrollers" you will get the same results as me and here are a couple that caught my eye: www.digikey.com/en/articles/improving-iot-system-robustness-using-watchdog-timers#:~:text=When%20a%20system%20needs%20to,from%20the%20microcontrollers%20oscillator%20circuit. electronics.stackexchange.com/questions/406925/necessity-of-an-external-watchdog-timer/406927
@PL-VA
@PL-VA 4 года назад
@@RalphBacon Thanks for the links. I did see some of this already, but I have to admit that vendors who have a vested interest in me buying more equipment aren't typically high on my trust list when it comes to this kind of recommendation. EE's who are using their experience to make a choice is - hence my question. When I read Arduino's datasheet it seemed to indicate the subset of situations where the watchdog reset would not work was very small - so I guess it come down to experience with a particular device and use-case. Thanks for this video though - as you can see it made me think and that's always good.
@EricTViking
@EricTViking 3 года назад
My reason for considering an external watchdog like this is I'm controlling a heater from an Arduino, and would like to be able to externally kill the power to the heater in the event of a loss of watchdog from the microcontroller. The thing being heated is quite expensive and sensitive and could be destroyed if the heater stuck full on. So for me I'm interested in killing the power to the Arduino, and some of the things it is controlling.
@richardbarker8636
@richardbarker8636 11 месяцев назад
Very useful - thanks! Have you tried this circuit with a CMOS version of the 555? It may behave better with 3.3V MCUs. Also, do you have any calculations for the timing components?
@RalphBacon
@RalphBacon 11 месяцев назад
Yes I have, as it can have _really_ long delay periods too! Calculations are easy to find on the internet eg bit.ly/47uN7VK
@cheetahkid
@cheetahkid 4 года назад
I got that book, 1989 probably about right, wow 31 years ago.
@RalphBacon
@RalphBacon 4 года назад
Time flies when you're bulding 555 circuits, hey?
@FredBedderhead
@FredBedderhead 4 года назад
you need the extra component to keep it from locking the power on if the arduino lockup with the pulse in the high state, the cap will not let a continuous high though
@RalphBacon
@RalphBacon 4 года назад
Yup, several viewers have put me right on this, Fred, and I've included those components in the PCB.
@fabriziovirdone7228
@fabriziovirdone7228 4 года назад
Hi Ralph, thanks for the video. I am trying to build a pulse rise time and duration measuring system (to measure camera shutter speeds) by using an Arduino and a 555 but I guess it is too much for me. I wonder if this can be one of your projects in RU-vid?
@RalphBacon
@RalphBacon 4 года назад
Have you got an oscilloscope, Fabrizio? I think it will be necessary to be able to see the pulse in order to test any circuit.
@fabriziovirdone7228
@fabriziovirdone7228 4 года назад
@@RalphBacon thanks for your reply. I don't have an oscilloscope unfortunately. Using Arduino would be cheaper and also more portable. My understanding is that the Arduino resolution alone is not sufficient to measure the rise and fall times at high shutter speeds (greater than 1/250 sec), but perhaps the 555 could make the measures and Arduino collect and visualize them. Another options could be by using a faster microcontroller, blue pill for instance, but I have never worked with it.
@SodAlmighty
@SodAlmighty 3 года назад
I'm still a little confused as to where the "ass table" comes into the proceedings...?
@RalphBacon
@RalphBacon 3 года назад
You can use it for sitting on, I suppose?
@cheetahkid
@cheetahkid 4 года назад
ah yes, good old 555 timer, I am still using this since 1977, yep I am old.
@RalphBacon
@RalphBacon 4 года назад
Not just you, many people used (and are using) this chip.
@daveholden3935
@daveholden3935 4 года назад
I guess you considered the CMOS version - 7555. Pin compatible with the 555 but 0.1mA supply current cf.2mA for the 555. Not an issue for your phone charger but useful if low power requirement or battery operation is important. Not as cheap as the 555 though. Fakes available from China ! (As I found out - re-branded 555s !)
@RalphBacon
@RalphBacon 4 года назад
Did the fakes have the name written on them with typewriter correction fluid, Dave? A bit of a giveaway if you ask me. Regarding the 7555 I don't think we need a low power unit in this circuit but you could use one, of course.
@RSP13
@RSP13 7 месяцев назад
What if the microcontroller freezes just as it turns its GPIO high? The capacitor will not charge even though the microcontroller is stuck.
@RalphBacon
@RalphBacon 7 месяцев назад
And so the external watchdog will reset the micro controller. The capacitor in the input circuitry only allows a pulse to be delivered to charge the capacitor, regardless of how long the Gpio stays high for. So a continuous stream of pulses is required to prevent the 555 resetting things. Clear as ditch water?
@RSP13
@RSP13 7 месяцев назад
Crystal clear! Thanks, man.
@colepdx187
@colepdx187 4 года назад
Looks like a NWO vacation calculator. :) I'm wondering, could a 555 be used to trigger the auto-power-down circuit from video 123 every few minutes and would that take less current than putting the micro-controller into deep sleep and waking every few minutes? I haven't the experience or equipment to figure it out myself yet. If only I had more time to just sit at home studying and learning...
@RalphBacon
@RalphBacon 4 года назад
Deep Sleep on the ATMega328 retains memory (variables) but not so on the ESP8266. So Deep Sleep might work better (easy logic). But you could use this to turn it off but the Arduino can do that all by itself in video #123.
@gordselectronicshobby3853
@gordselectronicshobby3853 4 года назад
Forrest M Mims is well known in the United States as one of the best writers for Electronics Hobbyists. I have all his books and use them often.
@RalphBacon
@RalphBacon 4 года назад
He's not very well known in the UK but those particular series of books was carried by Tandy (Radio Shack) here which is how I got to see them. Goldmines of information.
@kevingrimshire7462
@kevingrimshire7462 4 года назад
Brilliant video and a very clever design. Are you marketing this as would be a wonderful product?
@RalphBacon
@RalphBacon 4 года назад
I'm not, but I am getting some PCBs made which might make their way into my viewers' hands... if they work.
@stevetobias4890
@stevetobias4890 4 года назад
My holiday destination is "Stay Home". Appropriate for the COVID-19 epidemic
@RalphBacon
@RalphBacon 4 года назад
No! Really? I'm going to Italy. And Jamaica. Oh, hang on, my maths is not really great... what's 3 x 17... plus 3... Drat! Drat! I'm staying at home too! How disappointing.
@kbwaldron
@kbwaldron 3 года назад
Ralph: Did you consider using the alarm output from a RTC to trigger the power off rather than a 555? That way you are not dedicating a pin to the watchdog timer. Instead you just keep changing the alarm time.
@RalphBacon
@RalphBacon 3 года назад
I didn't but they way you suggest it, it would mean the μController would be constantly updating the RTC to reset the alarm; my way means it is 100% independent and will never ("never") go wrong! But there are many ways of accomplishing this, and yours is as good as any,
@kbwaldron
@kbwaldron 3 года назад
@@RalphBacon Good point Ralph. I will point out that by saying never ("never") you have challenged the great God Murphy. Be prepared.
@ninjatrader6624
@ninjatrader6624 2 года назад
A similar functionality could be achieved with a 4093 replacing the 555 and Q1. The number of discrete components will be reduced as well.
@RalphBacon
@RalphBacon 2 года назад
It doubtless could, but the 555 is so cheap and easy to configure I think this was easier to understand even by those whose knowledge of electronics was not in-depth. Even Q1 is just a few pennies these days. KISS is my mantra!
@tlangdon12
@tlangdon12 Год назад
The most important reason for using a 555 and not using a 4093 is that the 4093 is a CMOS device and can hence suffer from the same latchup problem that the MCU can suffer from. If you pick a bipolar 555, it should never latchup.
@patprop74
@patprop74 4 года назад
Why not just use a TA31095p IC ?
@RalphBacon
@RalphBacon 4 года назад
Well you could, but that is a bespoke chip whereas the 55 is a general purpose oscillator that is being used to do something useful and I thought it would be interesting! So cheap too!
@normcaissie5598
@normcaissie5598 4 года назад
My Alexa said "Sorry I didn't find a device called Workshop lights"
@RalphBacon
@RalphBacon 4 года назад
But MY lights went off then, Norm, so it was YOU!
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
why not just use the Ardunio internal watchdog timer. Also it should be noted it takes a bit of thinking of where to kick the dog. As most problems are caused by everlasting loops and so there is no point if you kick the dog in an endless loop. nearly all uC's have watchdogs, which most people just disable. I think the Arduino dog has a muzle up as default. So note that the external watchdog might reset while your loading your porgram in. So you might need to disable it during loading. Have fallen fail of this before where a few extra lines of code and we could not program the chip anymore. after that we had a watchdog disable link on the programming header no problems after that.
@neildarlow
@neildarlow 4 года назад
There are rules of programming in using circuits such as these. You should not trigger them from within Interrupt service routines or from regularly repeating loops. It is better to implement "pass points" at strategic points in the code. These are checks that execution has proceeded correctly. The result of these checks can be used, cumulatively, to enable triggering of the watchdog timer output pulse.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
@@neildarlow We used to have a watchdog set of flags which was checked every so often. if all flags had been set they were cleared and all was good. if a flag was clear then a path must have been missed in the last cycle, flags saved and reset triggered by not kicking the dog. At least it falls over if stuck in a loop with the watchdog command in.
@RalphBacon
@RalphBacon 4 года назад
The WDT works fine (most of the time) but not during latchup. And it never fires in my experience during sketch upload. Then again, I always use quite a long period of 8s so maybe I just got lucky?
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
@@RalphBacon mabe that's because the watchdog is to break software lockups just by hitting the reset and not hardware latchups. h/w latchups should be fixed in the circuit design, as there are greater issues if you are griving inputs to the point they cause a latchup. quite often h/w latch up is cause by the pin going above the VCC of the chip.
@ricardogava1604
@ricardogava1604 4 года назад
PS: use the output to pulse the reset pin.
@RalphBacon
@RalphBacon 4 года назад
The problem there is that if the µC has really hung, the reset pulse won't work (otherwise the WDT would be enough). A power cycle is required.
@fredflintstone1
@fredflintstone1 4 года назад
I thought all that noise on the Scope was all of us clapping:-)
@RalphBacon
@RalphBacon 4 года назад
Ha ha! Kind of you to say, Fred Flintstone but I suspect the real answer is that I have multiple electronic devices running whilst videoing and that all creates background noise. A bit like my dog, Dougle.
@largepimping
@largepimping 4 года назад
My holiday destination was "1`7" (one-backtick-seven) which is the US. But I already live in the US, so I don't think your holiday calculator works correctly.
@RalphBacon
@RalphBacon 4 года назад
Check your maths (and the instructions again). It works every time, if you do it right.
@largepimping
@largepimping 4 года назад
@@RalphBacon I didn't get 17, I got 1`7 (you had a silly typo in the graphic).
@RalphBacon
@RalphBacon 4 года назад
Nope, not right. Try again. With various numbers. they all have the same result. (Hint: it's a trick, look closely at the list of destinations).
@StigBSivertsen
@StigBSivertsen 4 года назад
My next vacation will then be Canada.... BTW, If I'm not mistaken wasn't it the englishmen who invented all existing titles?
@RalphBacon
@RalphBacon 4 года назад
We Englishmen certainly don't have a shortage of titles, that's for sure, Stig. Countess of this, Duke of that, the list goes on. By the way, if you think that Canada is your next holiday destination I suggest you check your maths and try again.
@XenoTravis
@XenoTravis 4 года назад
Man, not enough room in my brain to fit all these circuit name haha.
@RalphBacon
@RalphBacon 4 года назад
If you watch the Bacon Bytes series of videos that might help you grasp some of the names and terminology used (it's done to confuse us all, I swear!)
@tubeDude48
@tubeDude48 2 года назад
The 555 came out in 1976
@RalphBacon
@RalphBacon 2 года назад
Oh no! According to Wikipedia (and my own experiences), "...The 555 timer was manufactured by 12 companies in 1972 and it became a best selling product." I used it extensively in the early 1970s as a young child!
@tubeDude48
@tubeDude48 2 года назад
@@RalphBacon - You are correct. I would have been, since I meant to hit the 2 and not the 6. I have a t-shirt that says 72 as well !
@scottstevens7569
@scottstevens7569 4 года назад
I thought the UK invented those numbers after names... you know, like the QEII or Henery VIII . ;)
@RalphBacon
@RalphBacon 4 года назад
Yes, they are simply to differentiate one Henry (or Elizabeth) from another. They are not direct descendents in the same family though. For example, Elizabeth I was around with Shakespeare, Elizabeth II is on the throne now!
@tubeDude48
@tubeDude48 4 года назад
Here's another one: upperbound.com/projects/555-watchdog-timer/ I buy *TS555* -- That's the *CMOS* version.e I have ALL 11 of Forrest Mims booklets.
@RalphBacon
@RalphBacon 4 года назад
That circuit generates a RESET when things go wrong. The trouble is, that reset might not be enough. A power cycle is often required. You have all 11 books, you say, from Forrest? Have you read (and digested) them all too? They are true gold mines of information.
@mutthunaveen
@mutthunaveen 2 года назад
Can you share the link of titles for all 11 forrest mim booklets please? I wish to read them for knowledge.
@tubeDude48
@tubeDude48 2 года назад
@@mutthunaveen - I have the actual booklets. As far getting them online, do a search...But I Don't know if you'll find them.
@mutthunaveen
@mutthunaveen 2 года назад
@@tubeDude48 I'll try with hope. 😎
@spotterinc.engineering5207
@spotterinc.engineering5207 4 года назад
PDF Online www.n5dux.com/ham/files/pdf/Forrest%20Mims%20-%20555%20Timer%20IC%20Circuits.pdf
@RalphBacon
@RalphBacon 4 года назад
His work has definitely spammed the Internet. Glad everyone found a copy though, very useful info on a now forgotten chip.
@cheetahkid
@cheetahkid 4 года назад
my destination is stay home, oh well
@RalphBacon
@RalphBacon 4 года назад
I can't believe it! Well, I can actually.
@OsoPolarClone
@OsoPolarClone 4 года назад
ARGH!!! It said “Stay Home”!!
@RalphBacon
@RalphBacon 4 года назад
No! Really! I am shocked! Who knew? Well, Benny did, And me.
@raymondheath7668
@raymondheath7668 4 года назад
Collin Mitchell put out an excellent 555 book that is on his website, talkingelectronics.com
@RalphBacon
@RalphBacon 4 года назад
Wow! A very retro feel to the website, but packed full of very useful information. I'll be sucked down that rabbit hole a bit later today, thanks for posting that link, Raymond.
@ChagoiSteve
@ChagoiSteve 4 года назад
Fab, There is an example of a mono-stable 555 gating an astable 555 in this book(actually described as door bell!). With a little tweaking I can get it to drive my relay module an in-turn the mains powered wired and RF doorbells I already have Lovely! Thanks Raymond/Ralph
@flemmingchristiansen2462
@flemmingchristiansen2462 4 года назад
My first thought was -oh dear, you got the balls to change an old and tested circuit, just becourse you don't understand it? - Cool" You might be right but it seems halfcocked without testing it. c muller (below) has a good explanation for that trigger circuit. I am not sure that the direction of the diode is wrong. If there is a errors in the book, the direction of the diode, wouldn't that be changed in a later edition?
@RalphBacon
@RalphBacon 4 года назад
But I thought I did understand it, Flemming. The pulse would be limited by the forward voltage drop of the diode (0.6v), thus giving tiny little pulses. And, indeed, when I tried this out, it only gave a very small pulse, even smaller than the ones I showed. I'm not even sure it triggered the MOSFET. But, I have got it working with the diode in the correct orientation (as per my demo) and a 10K bleed resistor across the cap, which ensures nice large pulses even if they come very quickly. This circuit was not in a book, it's just published on the Internet but was picked up by Elektor magazine as a "Look what we found that might interest you!"
@peut
@peut 4 года назад
@@RalphBacon I tend to agree with you Ralph. My non-educated quick analysis: The forward voltage of the diode, 0.8V if you are lucky , would clamp the pulse and I wonder if that is enough to open the MOSFET. The 2n7000 specifies Vgth as anything betweem 0.8 and 3 Volts.
@flemmingchristiansen2462
@flemmingchristiansen2462 4 года назад
@@RalphBacon I was trying to mess with you a bit, it was fun - at least in my head. I probably should pay more attention to what you are saying, just in case I am caught half sleeping in class.
@RalphBacon
@RalphBacon 4 года назад
WAKE UP FLEMMING! Got you!
@jameshibbs6506
@jameshibbs6506 4 года назад
Photo of the full set, I think. I must of bought these about the same time frame you mentioned.... 1995 - 2000 github.com/327jwolf/radio-shack-book-covers/blob/master/photos/20200605_203840Small.png
@RalphBacon
@RalphBacon 4 года назад
And there are links here in the comments where others can download them. I hope it's all legal.
@unknownhuman1000
@unknownhuman1000 4 года назад
The uk does have the nonsense of “bill gates the third” lol You had king Henry the VIII etc.
@RobB_VK6ES
@RobB_VK6ES 4 года назад
that is to differentiate a number of different monarchs with the same name but not necessarily related, certainly not father to son.
@RalphBacon
@RalphBacon 4 года назад
Rob B says it well. Of course, he might be Rob B III Snr but I wouldn't know that.
@JerryEricsson
@JerryEricsson 4 года назад
Ralph, I am going a bit off topic. I am perhaps one of your greatest fans, but now my old heart is broken. My wonderful wife, the woman I wed on the day that thousands of hippies and their lot gathered in Woodstock, in 1969 has been diagnosed with a very aggressive, rare cancer. We have opened the door to hell and looked in, this is indeed what it must look like. I sat with her through her first Chemo treatment, done under emergency conditions (I did not know such procedures were around) after being postponed for 3 damn months because of the COVID crap. Sorry for the side trip. The purpose of my post is to beg anyone who reads this, please, add my good wife to your prayers. Please, join me in asking God to give Judy the strength to overcome this horror. We have had 51 wonderful years together and I simply do not know what I am going to do without her. Sorry to bring religion to your great channel, but I need all the help I can get to make it through this challenge. She lays on the couch just a few feet from me, the cancer is eating her stomach, her liver and lungs and the drugs she must take are adding to the illness. She has cared for me so lovingly over the past decade since my accident, now the roles have reversed, and I must fight through the constant pain that has hammered my old body and try and keep her comfortable. I guess the only good thing my sinuses are clear now as tears cleanse them, and I have shed more tears now then at any time in my life. Please, if you believe in Jesus, if you worship the God of Abraham, if you believe in any God, or Gods, please ask them to give Judy the strength to make it through this horror.
@simonmerrett
@simonmerrett 4 года назад
Hi Jerry, I obviously don't know what the Lord's good plan is for you and Judy but I am praying for you both. I know that all the brokenness of this world will be taken away one day and that if you guys ask Jesus to be your saviour (which it sounds like you have), you will both find peace. I hope you can find fellowship with people at a church local to you, as they may be able to offer prayer, as well as the practical and emotional support that's not possible to provide over the Internet. Happy to help you try and find people if you want.
@RalphBacon
@RalphBacon 4 года назад
Jerry, my thoughts and prayers go to you and Judy. Words, at times like this, feel hollow but I feel your pain. Stay strong for her.
@NotMarkKnopfler
@NotMarkKnopfler 4 года назад
Dear Jerry, I can sympathise. I lost my mother far too young to this evil disease. Please know that there is someone in Aberdeen Scotland that is thinking of you, and your wife Judy and wishes you all the very best and a good outcome, and will include you both in my prayers. God bless.
@jcjensenllc
@jcjensenllc 3 года назад
Geez, Get to the point.
@RalphBacon
@RalphBacon 3 года назад
If it's all a bit too slow try running it at 1.25x or even 1.5x, I do that with a lot of videos. Remember that I'm aiming most of these videos at beginners who don't want things rushed.
Далее
I Built a EXTREME School Bus!
21:37
Просмотров 7 млн
#171 External Battery Monitor from your Arduino
29:32
Hacking a weird TV censoring device
20:59
Просмотров 3 млн
#BB4 MOSFETs - From an Arduino Perspective
15:10
Просмотров 22 тыс.
What if my Intel CPU explodes??
14:20
Просмотров 4,6 тыс.
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,4 млн