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.
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.
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 года назад+8
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?
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.
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.
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.
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.
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
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.
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.
Yes, that is true, David. I did an update with the extra components explained and included in my schematic in video #194 ruclips.net/video/WpihLPvY9Ac/видео.html
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.
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.
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.
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.
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.
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.
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.
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.
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!
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.
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.
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.
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.
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!
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. 😃
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.
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!
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.
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 :) .
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.
@@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 .
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.
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.
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.
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.
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.
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
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 👍
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?
@@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,
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?
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.
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.
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.
@@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.
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 :)
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?
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).
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
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 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.
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.
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.
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.
I'm not a beginner, Ralph, but I do like to watch your videos unfortunately I'm not sure why you'd want an 'external' Watchdog timer in the first place as most, if not all, Uc's have them built in and you can select what happens when they bite or timeout. My experience is that the watchdog period is usually in milliseconds not seconds and what you do whilst waiting for something is have a loop to kick it (yes, kick the watchdog' regularly to wake it up!). The trouble with the 555 is that the trigger input is ridiculously sensitive running the risk of false triggering also I don't think it's a Schmitt input either. The circuit that's presented is very complicated considering a re-triggerable monostable would do the job better with many fewer components. To end on a more positive note, of course you wouldn't have another Uc as a watchdog timer, that would be like the 'lunatics running the asylum'!
The problem with mission-critical uController projects is that if they "hang" (as mine did on an SPI command) then the watchdog hangs too. An external (hardware-based) watchdog ensures this does not happen.
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.
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 !)
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.
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.
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.
@@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.
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?
@@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.
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?
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!
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.
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.
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.
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,
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 RUclips?
@@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.
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...
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.
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.
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
@@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.
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.
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!
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.
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?
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.
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!
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?
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!"
@@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.
@@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.
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.
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!
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
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.
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.
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.
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.
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
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.
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.
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.
Brilliant. Thank you and thank you Ralph, this little circuit is a great find.
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.
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
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.
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?
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.
“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 !
My pleasure! You have a lot of catching up to do with my videos!
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.
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.
@@cmuller1441 I had this exact same thought.
Yes, my thought too. The Arduino could stop with an output pin either high or low.
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.
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
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.
@@RalphBacon looking so much to seeing it
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.
Yes, that is true, David. I did an update with the extra components explained and included in my schematic in video #194 ruclips.net/video/WpihLPvY9Ac/видео.html
Hi i had the same 555 book many years ago it was fantastic! Keep up the good work.
Thanks, will do!
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.
Glad it was helpful!
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.
I was thinking the same thing 🤔
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.
@@RalphBacon thanks, this was very helpful information 👍
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.
Sounds great! So much info in those books. Good idea to spiral bind them too.
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.
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.
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.
maybe the capacitor and diode on the input is to account for a hang on high level in order to not block the watchdog
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.
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!
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.
@@RalphBacon Ralph, I get most of my bits from this guy www.bitsbox.co.uk/index.php?main_page=login&zenid=5l1k5o3h6tfl5o4esi3nh7iti7
I've used them! And my triac dimmer arrived today! So much to do!
@@RalphBacon .... I'll be watching!
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.
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.
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
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.
@@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.
@@RalphBacon Or go overkill and add a single shot 555 triggered from the micro....
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!
Glad it was helpful!
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. 😃
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.
Ralph S Bacon with that effect you surely will. 😃🤣
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!
This could indeed be the answer! And you can change the delay by adjust the capacitor (a bit) like I did.
Great video. Holiday destination is definitely right. Thanks
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.
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 :) .
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.
@@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 .
If you are UK based you can request via email a PCB. If you are not UK-based, my commiserations (on so many levels).
@@RalphBacon
Yep uk , in kent ...
Request from you or the PCB company ?
Hope you are well Ralph .
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.
Happy holidays! Oh. Never mind, next year.
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.
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.
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.
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.
the book can be found on the Internet archive, archive.org/details/Forrest_Mims-engineers_mini-notebook_555_timer_circuits_radio_shack_electronics
Amazing! (Is this legal?) You can see this circuit is just a modification of someothers in that book.
thanks for this solution, i use a DS1232 for wtachdog with powersupply control.
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
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 👍
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?
@@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,
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
Glad it helped! I'm getting a PCB design together too, might help.
I really enjoy watching your videos and especially your humor :D
Glad you like them!
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?
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.
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.
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.
@@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.
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 :)
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?
Other way around, all microcontrollers have a reset pin, one can reset it by connecting output of LM555 to the reset pin.
This will avoid the two mosfets on output.
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).
Have a great day Ralph.
You too! Nice to hear from you, Steven.
Ralph !!! My Alexa said she could not find the "work shop lights", Next time say "Office Light", That will work. Thanks Sherm
Also great circuit.. I've got an ESP8266 in my greenhouse that could use this..
I'm going to say "Alexa, send Ralph Bacon the first thing on his wish list". Will that work too, Sherm? 😂
@@RalphBacon Oh yes!!! Its underwear for my wife :)
Oh. Alexa, Send Ralph Bacon the first item on RALPH's list. That's is not underwear for your wife, I assure you!
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
Yup, several viewers have put me right on this, Fred, and I've included those components in the PCB.
ah yes, good old 555 timer, I am still using this since 1977, yep I am old.
Not just you, many people used (and are using) this chip.
Very informative video
Glad you think so! Nice to hear from you, Muhammad.
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
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.
@@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.
Timing would be critical. Bu tI believe there is a pulse counter circuit in there somewhere?
I got that book, 1989 probably about right, wow 31 years ago.
Time flies when you're bulding 555 circuits, hey?
My holiday destination is "Stay Home". Appropriate for the COVID-19 epidemic
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.
Great Video!
Glad you enjoyed it
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.
Yes, exactly, Chris! Before I got into µControllers every problem looked like a 555 solution would fix it. Ha ha!
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.
Sorry, I should have waited until 10:46 when you explain why not to use a microcontroller!
I'm glad you watched that bit, Jim, as that was what I was going to tell you!
I'm not a beginner, Ralph, but I do like to watch your videos unfortunately I'm not sure why you'd want an 'external' Watchdog timer in the first place as most, if not all, Uc's have them built in and you can select what happens when they bite or timeout. My experience is that the watchdog period is usually in milliseconds not seconds and what you do whilst waiting for something is have a loop to kick it (yes, kick the watchdog' regularly to wake it up!).
The trouble with the 555 is that the trigger input is ridiculously sensitive running the risk of false triggering also I don't think it's a Schmitt input either. The circuit that's presented is very complicated considering a re-triggerable monostable would do the job better with many fewer components. To end on a more positive note, of course you wouldn't have another Uc as a watchdog timer, that would be like the 'lunatics running the asylum'!
The problem with mission-critical uController projects is that if they "hang" (as mine did on an SPI command) then the watchdog hangs too. An external (hardware-based) watchdog ensures this does not happen.
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.
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.
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 !)
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.
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.
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.
@@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.
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?
@@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.
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?
Yes I have, as it can have _really_ long delay periods too! Calculations are easy to find on the internet eg bit.ly/47uN7VK
My Alexa said "Sorry I didn't find a device called Workshop lights"
But MY lights went off then, Norm, so it was YOU!
Brilliant video and a very clever design. Are you marketing this as would be a wonderful product?
I'm not, but I am getting some PCBs made which might make their way into my viewers' hands... if they work.
A similar functionality could be achieved with a 4093 replacing the 555 and Q1. The number of discrete components will be reduced as well.
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!
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.
I thought all that noise on the Scope was all of us clapping:-)
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.
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.
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,
@@RalphBacon Good point Ralph. I will point out that by saying never ("never") you have challenged the great God Murphy. Be prepared.
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 RUclips?
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.
@@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.
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...
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.
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.
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
@@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.
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.
The 555 came out in 1976
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!
@@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 !
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.
Check your maths (and the instructions again). It works every time, if you do it right.
@@RalphBacon I didn't get 17, I got 1`7 (you had a silly typo in the graphic).
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).
What if the microcontroller freezes just as it turns its GPIO high? The capacitor will not charge even though the microcontroller is stuck.
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?
Crystal clear! Thanks, man.
My next vacation will then be Canada.... BTW, If I'm not mistaken wasn't it the englishmen who invented all existing titles?
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.
Why not just use a TA31095p IC ?
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!
Man, not enough room in my brain to fit all these circuit name haha.
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!)
I'm still a little confused as to where the "ass table" comes into the proceedings...?
You can use it for sitting on, I suppose?
@@RalphBacon Or talking out of? 🤣🤣🤣🤣🤣
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?
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!"
@@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.
@@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.
WAKE UP FLEMMING! Got you!
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.
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.
Can you share the link of titles for all 11 forrest mim booklets please? I wish to read them for knowledge.
@@mutthunaveen - I have the actual booklets. As far getting them online, do a search...But I Don't know if you'll find them.
@@tubeDude48 I'll try with hope. 😎
I thought the UK invented those numbers after names... you know, like the QEII or Henery VIII . ;)
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!
PS: use the output to pulse the reset pin.
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.
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
And there are links here in the comments where others can download them. I hope it's all legal.
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.
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.
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.
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.
my destination is stay home, oh well
I can't believe it! Well, I can actually.
ARGH!!! It said “Stay Home”!!
No! Really! I am shocked! Who knew? Well, Benny did, And me.
The uk does have the nonsense of “bill gates the third” lol
You had king Henry the VIII etc.
that is to differentiate a number of different monarchs with the same name but not necessarily related, certainly not father to son.
Rob B says it well. Of course, he might be Rob B III Snr but I wouldn't know that.
Collin Mitchell put out an excellent 555 book that is on his website, talkingelectronics.com
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.
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
Geez, Get to the point.
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.
PDF Online
www.n5dux.com/ham/files/pdf/Forrest%20Mims%20-%20555%20Timer%20IC%20Circuits.pdf
His work has definitely spammed the Internet. Glad everyone found a copy though, very useful info on a now forgotten chip.