#123

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ค. 2024
  • Building on the experiences of recent power-saving videos, I thought I would try as an experiment whether we could switch off the Arduino itself as well as any surrounding circuitry - and then switch it back on again via some external stimulus.
    All data sheets, code examples and similar are on my GitHub:
    github.com/RalphBacon/Arduino...
    And it can be done very easily and with minimal external components. Just two MOSFETs (possibly a single MOSFET and an NPN transistor might be enough) and a couple of resistors and we're done.
    The circuit and a breadboard example are all included in this video along with some chat about the MOSFET and what you must NOT do to them if they are to survive.
    I admit I was feeling pretty pleased with the whole project - until I discovered, pretty much by accident, that this sort of thing has been thought about by others (who knew?) and they have all pretty much come up with the same circuit concept. Darn it! And there was me thinking I was being all creative and original...
    But it's an interesting mechanism to save power and we can experiment with the MOSFETs a bit too. You don't HAVE to switch off the Arduino itself - you can use this same circuit to just switch off everything else instead and then put the Arduino into Deep Sleep. We cover this in the video too! Now, there's flexibility for you!
    ---
    If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so :)
    My channel and blog are here:
    ------------------------------------------------------------------
    / ralphbacon
    ralphbacon.blog
    ------------------------------------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 204

  • @tonyeezi7315
    @tonyeezi7315 5 ปีที่แล้ว +8

    Another well put together video Ralph, there's always a lot to learn from you so thanks for sharing.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for that, Tony Eezi, nice to hear from you.

  • @ShishakliAus
    @ShishakliAus 5 ปีที่แล้ว +3

    You absolute legend! I've spent maybe 100 hours trying to find and understand a solution for this, and even though I found very similar solutions, there was always something missing in the explanation which meant it wasn't working for me. Your sketch and explanation filled in ALL the gaps.Damn good show old chap!
    Hope your eye is better soon!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +2

      Wow! A legend you say, ShishakliAus? I like you! I just feel sad you had to spend 100 hours searching for a solution - but all the more satisfying because of it, I hope? Thanks for posting, nice to hear from you, and yes, thank you, my eye is steadily improving too!

  • @ajayjoseph4626
    @ajayjoseph4626 5 ปีที่แล้ว

    Brilliant as always. Thank you Ralph!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      You are most welcome Ajay Joseph, I'm glad you like the video. Nice to hear from you.

  • @Roamor1
    @Roamor1 5 ปีที่แล้ว

    Very informative as usual. Thanks for these videos; I really learn a lot from them.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for your post, Niels Winters, good to hear from you.

  • @howardsmith8771
    @howardsmith8771 2 ปีที่แล้ว

    Thanks Ralf. I got this to work with the CJMCU-4599 circuit board. My NRF24L01 DIY garage door remote was powering from the 5 volt supply on the Nano which ignored any processor sleep mode and flattened the batteries in double quick time. The solution was to add an on/off switch to activate the nano before pressing the button. However my wife would forget to switch it off afterwards and I'd end up replacing another 9 volt battery. Now I can squeeze these items into the box, delete the switch, then when the button is pressed, bingo, the unit will power up, the garage door will activate and the entire thing will go back to zero volts. Fab. I'm a total novice who is keen to learn and find your videos very informative. Thanks

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I'm delighted this works for you, Howard. I'm using it too, in a recent project, so that my storage container bin-lids switch off the device _completely_ when closed but wake up and send out a radio signal to warn me when open, then sleep for 8 seconds. Like your project, it "just works".

  • @gordonpayne8601
    @gordonpayne8601 2 หลายเดือนก่อน

    Thank you for this circuit Ralph! Works great! I was having issues and determined 1. The P channel MOSFETS I ordered from AliExpress were all bad (you get what you pay for - FYI - 6020Ps are now obsolete and discontinued. I wound up using an IRF4905 instead - no heat issues in my use) and 2. The NPN transistor was backwards. Once I resolved that, it worked as advertised! Now to incorporate it in to my project. Thanks again! Gord

    • @RalphBacon
      @RalphBacon  2 หลายเดือนก่อน

      Great news, Gord, pity about the dodgy components. I found that just touching a MOSFET's leads can cause it to go foo bar. Static electricity and all that. Anyway, good you got it going. 👍

  • @philowen2755
    @philowen2755 5 ปีที่แล้ว

    Another interesting video. Thanks Ralph.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for your post, Phil Owen, glad you liked it. Good to hear from you.

  • @andymouse
    @andymouse 5 ปีที่แล้ว

    Interesting as always Ralph......MOSFET's are fabulous little devices, never new they were quite so static sensitive, I will be more careful in future !

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Indeed, I killed a couple a year or two back just by touching them. Thanks for posting andymouse123.

  • @stompreaper
    @stompreaper 5 ปีที่แล้ว

    Great project Ralph, I really liked the discussion/speculation on time triggered eventing.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for your post, Stephen Thompson, good to hear from you.

  • @F5VMJ
    @F5VMJ 5 ปีที่แล้ว

    Great video. Super explained thanks. Instant subscribed.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Appreciated, Paul, I'm very glad you like the video(s). Welcome!

  • @christianerance
    @christianerance 3 ปีที่แล้ว

    Thank you sir. Much appreciated. Will this work with the WiFi rev2 Uno board? and a regular on/Off switch instead of a push button.. That would result in the P Mosfet being held to ground, much like you holding that button for a long time.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I'm somewhat confused by your question, Edward! It will work with a regular Uno Wifi board but why would you want to keep the P-MOSFET at ground via a switch? But if you look at my video #195 (Reverse Polarity Protection) and ignore the fact that the MOSFET is connected "in reverse", you will see that I connect the Gate of the P-MOS to GND permanently - so, yes, it will work!

    • @christianerance
      @christianerance 3 ปีที่แล้ว +1

      @@RalphBacon My apologies, In retrospect, I woke up this morning and realized that I was overthinking my application. In the end all i need is a simple switch between my 9V battery and Arduino. Right now I only need the program to run when manually switched on. This is what happens when you stay up all night teaching yourself new stuff at 50. The application is a simple wifi application that will only need to be manually activated every week for no more than a minute or two and thats it. Then I want the switch to be manually turned off. (for now I need confirmation of On & OFF by a person). At first I was trying to leave the arduino on all the time with all kind of indicators from batteries and realized that the power consumption was too high to last 6 months.(I wanted to walk past it and see that it was connected to the wifi . So I just have to go on faith that the program does its thing when powered and wait for the result on the other end... lol( TCP Client Application to another Arduino that will always be powered on as a server. ) Once I get a handle on all this programming I may switch to an ESP8266 for a smaller footprint and play around with the sleep state and then do a little bit for automation. BTW I thoroughly enjoy your videos.

  • @stickboy23mdf
    @stickboy23mdf 5 ปีที่แล้ว

    BTW, thanks for all of your videos.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      You are most welcome Mickey Fox, I'm glad you like the videos. Nice to hear from you.

  • @gvalsan1
    @gvalsan1 3 ปีที่แล้ว

    Amazing video and explanations. Thank you for that. I'm new to Arduino and my question might sound silly. Is there any way, starting from your schematic diagram, to use the same button to not only turn on the Arduino, but also to turn it off?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, indeed. I'm pretty sure I've covered this elsewhere but here's how:
      1. Connect the anode of 1N4001 or IN4148 diode and a 300 ohm resistor (in series) between a pin on the Arduino (I'll use A1, aka GPIO 15, for our example)
      2. The other end of the resistor goes to junction of the Gate of the MOSFET and the 100K resistor.
      In the Arduino Code, specify your GPIO pin' mode as INPUT PULLUP.
      eg pinMode(15, INPUT_PULLUP)
      When the pin goes LOW (by you pushing that button and bringing A1 to GND) you can, via code, then bring pin A0 (as per the circuit diagram) LOW to turn off the entire circuit.
      if (digitalRead(15)== LOW){
      digitalWrite(A0, LOW);
      }
      Circuit diagram here:
      github.com/RalphBacon/Arduino-Auto-Switch-Off
      (see file Auto Switch ON and OFF)

    • @gvalsan1
      @gvalsan1 3 ปีที่แล้ว +1

      @@RalphBacon Thank you so much for taking the time to answer me in detail. I will remap the schematic diagram and try it. Also, when I finish I will come back with the results, for other to use them. Thank you once again and have a great new year!

  • @boblewis5558
    @boblewis5558 5 ปีที่แล้ว

    Hmmm. Nice job Ralph, and for low voltage circuit switching, probably the cheapest albeit not the simplest as I think you rather discounted a relay somewhat hastily.
    I get the feeling that MANY people take a similar view through either a lack of knowledge or a lack of understanding. HOWEVER, there are occasions when say 240v mains at up to several kW may need to be switched on AND off but STILL require a zero current operation whilst in either state.
    Enter the "standard" bistable or so-called "latched" relay. This works by using TWO coils and the relay "locks" into either an ON or OFF state by a short power pulse to the opposite coil to get it into its present state. There are MANY room thermostats for underfloor heating for example. I am in the middle of repairing one of mine presently which runs for years off two standard AA cells and switches up to 16A AC (that's the relay rating at least) without problem and with minimum power consumed (the two batteries run an LCD control and status screen).
    Using an ESP Module with such a relay (there are units on eBay up to 4 channel (!!) that can do this off the shelf for low cost) means ONLY the ESP deep sleep current is required and everything else gets switched on or off with a single pulse! This includes single to many multiple separate voltage circuits if required (including opposite voltage polarity ones) with no further power required for the relays after switching.
    Here are a few links: bare relay, eBay single relay Arduino et al compatible latch mode and the same but 4 channel mode ones. Hope that helps people looking for yet another low cost but even more flexible method of Arduino power switching.
    rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F111693028611
    rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F112894899424
    rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F183450093994
    Also found this one:
    rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F142120866564
    Further edit:
    5v version of above.
    rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F121837751571

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Some very interesting points you make there, Bob.
      I don't like the idea of a _standard_ relay because it takes too much power (it has to stay latched by energising the coil, obviously). However, your bistable relay sounds fascinating and I never knew they existed. You can get them for 99p from one of those links you posted. Guess what I'm buying next to investigate further?
      Oh, and I definitely didn't mention the dreaded "mains voltage" as I'm very wary of encouraging my viewers to mess about with mains, I can't afford to lose anyone. Seriously, though, mains voltage is lethal and inexperienced viewers may not take the required precautions when using it. Kids, for example. But you are, of course, totally correct in saying that relays are sometimes the best way of controlling mains voltage. I'd use an optocoupled relay for that, like the one in my video #18. I keep meaning to do an update including SSRs. ONe day...
      Thanks for those links, they will educate and help many who read your post, me included!

  • @PaulCavanagh69
    @PaulCavanagh69 5 ปีที่แล้ว

    A very interesting topic. Just a note if you use a reed switch and magnetic to trigger the turn on of the device i think it would be best to have it inverted so when the reed switch is opened it will activate the device.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      My immediate thought when reading this, was Why, Paul. My thinking was that the reed switch would replace the push switch in this circuit diagram. Hardly any current flows through the reed switch. So, if you could elaborate that would be great to assist my understanding of your suggestion.

  • @GranVlog
    @GranVlog 4 ปีที่แล้ว

    WOOW. just what i was looking for. im using a PSU module that steps down high voltage to 5v, and if i connect the load end first, it fries my electronics, but doing it like this, i could add a small button to power it up, and prevent myself from ever having a load on it before plugging into power. thank you!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Sounds like you have found a solution! Thanks for posting.

  • @alanesq1
    @alanesq1 4 ปีที่แล้ว

    a changeover reed switch is a good way to trigger this type of circuit (on a door etc.). I used one of the cheap ebay relay boards (switching the ground connection to the esp board). Not as elegant as mosfets but much easier to wire up and as long as you remove the power LED it seems to draw zero current when off (I have had a 18640 connected to one for two years now and it is still at 4.2v (it has only been triggered a hand full of times).

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Thanks for that, alanesq, nice to hear from you.

  • @gpTeacher
    @gpTeacher 2 หลายเดือนก่อน

    Hi Ralph. This is a great circuit! Just what I need.
    Ideally I'd like to run the whole ATTINY85 and mp3 module device off a 3v cr2032 button cell. Would the Ao4606 work in that application?
    If needed I could run it off 3 cr44 1.5 volt button cells for 4.5 volts total.
    Am I to understand that the AO4606 has an n channel AND a p channel in the same enclosure and I just wire to the pins as needed for your circuit? Thanks again for your help Ralph! Gord

    • @RalphBacon
      @RalphBacon  2 หลายเดือนก่อน

      Possibly. At those low voltages you really need to check the Gate threshold voltage etc. Try it on a breadboard! FWIW I think it would work but it might be borderline at 3v.

  • @richardattenborough5360
    @richardattenborough5360 5 ปีที่แล้ว

    Ralph, Excellent video. I plan to make use of the external shutdown circuit BUT at 33:11 in your video you state that there is a "deliberate error with a corrected circuit diagram ... on Github". I have looked at the diagram on Github and it matches exactly what is on the video. (with some sections on the diagram looking like they have been corrected but they match the video. Is the diagram in the video correct or is there an update coming?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Oops.
      The circuit diagram for the split power supply has a short circuit around the 100k resistor. Obviously, it should not be like that, I just drew it wrongly. I have now updated the image in my GitHub. I had to do a hard refresh in my browser to see the updated image but it is definitely there now.
      I've also added a link to Jose Baars' excellent alternative hardware solution (two MOSFETs in one tiny package).
      Thanks for letting me know this, Richard, no-one else seems to have spotted this, so you win the *Eagle Eyes award* this week! Kudos!

    • @richardattenborough5360
      @richardattenborough5360 5 ปีที่แล้ว

      @@RalphBacon , need to confirm, is the file IMG_20181014_192514.jpg the corrected graphic? It looks the same as when I looked at i on Oct 22nd. Thanks!

  • @boldford
    @boldford 5 ปีที่แล้ว

    Hi Ralph
    You comments on protection against electro-static discharge could be a prompt for a video wholly on that topic. I was trained in the "equi-potential" school. I.e. where the idea of earthing is considered unimportant but everything' including you. the 'stat mat and the PCB being worked on is bonded to be at the same potential. Even making sure the conductive foam is brought into contact with the 'stat mat before removing sensitive components. Whatever you feel is correct will be disagreed with by some who insist that everything is firmly bonded to deck.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      A valid point of view, Brian; we could (theoretically) all sit on a high voltage pylon cable running an Arduino without ill effects. It's when the potential of one part of that scenario is different (you dangle a foot too close to the ground, for example) that problems arise. Thanks for highlighting this point, good to hear from you.

  • @charlesdorval394
    @charlesdorval394 3 ปีที่แล้ว

    Very interesting video, thank you!
    I know I'm late to the party, but I made a DS3231 library that's a drop-in for the DS1307RTC library for the time library that adds up the alarm and other additional functions available on that RTC. It's on my github /deskwizard/DS3231RTC . Quite a coincidence I stumbled on that video whilst I'm actually using it hehehe
    Just a heads up, it might not work as-is for ESPs, the current workaround is to comment Wire.begin() in the CPP file and call it yourself with your selected pins in setup() before using the RTC. I'll get to it I promise... :P

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I just found it on GitHub, Charles, and in case others are interesting go find it here: github.com/deskwizard/DS3231RTC

  • @colepdx187
    @colepdx187 4 ปีที่แล้ว

    Yes! This is exactly what I had in mind. One little bit of confusion I have--is it the drain of the IRL3705 that is connected to the gate of the NDP6020?

    • @colepdx187
      @colepdx187 4 ปีที่แล้ว

      Ok. I got it worked out by a closer look at the circuit as you laid it out on your breadboard. Once I realized your bus strips have 2 isolated halves it was much clearer.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      There's more including a circuit diagram etc on my GitHub:
      github.com/RalphBacon/Arduino-Auto-Switch-Off

    • @colepdx187
      @colepdx187 4 ปีที่แล้ว

      @@RalphBacon I ordered the dual mosfet module from bangood from the link you gave me. I wired the circuit according to your diagram and it works marvelously. The only issue now is my nanos ( i got them dirt cheap ) have the 'old' bootloader and it takes 2 full seconds for the nano to set the output high whereas my mega and uno take only about 1/2 second or less. I was thinking that I wouldn't need to resort to a bare bones uno for the project since with this circuit the batteries should last and last. I don't know if I can upgrade the bootloader on my 'old' nanos? Going to google that now. Thanks Ralph.

    • @colepdx187
      @colepdx187 4 ปีที่แล้ว

      @@RalphBacon I watched video #177--again--and that gave me what I needed. I loaded the Uno bootloader onto the Nano and now the time from button-press to arduino output-high is 'nearly-ish indistinguishable' from instantaneous.

  • @SThomas1972
    @SThomas1972 5 ปีที่แล้ว +1

    Could the momentary switch not be on a GPIO pin on the second circuit it could trigger a test loop of the other part of the circuit then power it back down.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Yes, and I did briefly mention this at some point of the video, Simon, really I did!
      If the Arduino is permanently powered (albeit mostly in Deep Sleep) then it could be woken by an interrupt using a push switch. Or some other mechanism (a timer of some sort).
      Good to hear from you, thanks for posting.

    • @SThomas1972
      @SThomas1972 5 ปีที่แล้ว

      Ralph S Bacon missed it some how.

  • @josephchamness9915
    @josephchamness9915 3 ปีที่แล้ว

    Could you put a resistor from the drain of the P channel to the gate of the N Channel to latch it on as soon as the button is pressed, then only use the Arduino to turn it off?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Trying to get my head around this, Joseph. You want it to power on automatically (no Arduino involved) but let the Arduino power it off? Then what? The Arduino dies (power off) and it auto powers up again? Please explain!

    • @josephchamness9915
      @josephchamness9915 3 ปีที่แล้ว

      @@RalphBacon
      Yea, with the auto on being the switch, alarm, RTC etc.
      I could be wrong but I thought it should work like the following?
      When the Arduino powered the circuit(at 4:00) off there would no longer be any power coming from the Drain of The p channel to latch the power on so it should stay off until the button is pushed again. (Maybe you would need a Diode before the 5V pin on the Arduino to stop it from back powering the circuit?)
      Lets call the P channel MOSFET Q1 and the N channel Q2
      So with the resistor in my post above added:
      1: You push the button, turns on Q1
      2: This then powers on(5v) to Gate of Q2 (through the added resistor)holding the power on by pulling the gate to Q1 low.
      3: To turn off you pull the Q2 Gate(with an IO pin, A0 here) low hard enough to override the resistor from Drain(output) of the Q1 than was holding it high.
      4: (As long as the switch is not still on overriding Q2) the gate to Q1 should go to 5v volts turning off the power.
      5: As the voltage at the Drain(output) of the Q1 is now low(at least low enough to be less than the turn on voltage of Q2) the resistor should help keeping the circuit off rather than holding it on at this point?

  • @Mp-bs6nc
    @Mp-bs6nc 4 ปีที่แล้ว

    Hi ralph im your new subs..im dummy in arduino..ive a question abt in&out voltage..what if i using more than 5v..9v or 12 v maybe? Is arduino can handle it? Or are there components should be replace? Sorry my english.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Welcome to my channel, Ay. The Arduino Uno _board_ can handle anything from 7-16v via the barrel connector, or 5v directly to the Vin pin. But the _bare chip_ can only handle 5.5v absolute maximum so to use a higher voltage you need to use a 5v LDO chip - it only has 3 pins, Vin, Vout and GND and you need a 100nF capacitor on the input and output to make it stable. Like this one: uk.farnell.com/on-semiconductor/ncp1117lpst50t3g/ldo-aec-q100-fixed-5v-1a-sot-23/dp/2627989

    • @Mp-bs6nc
      @Mp-bs6nc 4 ปีที่แล้ว

      @@RalphBacon thanks for fast respond sir..i hope can learning arduino specialy from your channel

  • @paulpkae
    @paulpkae 4 ปีที่แล้ว

    You could do with a capacitor across the switch to keep the Mosfet alive long enough for the Arduino to boot. That way, you wont need to hold the switch down for too long. Also, by use of a couple of Diodes, the same switch can be utilised as a button input on another I/O pin.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Excellent suggestions, Paul! I might try both those as I am using this circuit in a project I'm doing.

  • @robertingersoll5289
    @robertingersoll5289 3 ปีที่แล้ว

    Ralph
    You did this video quite a while back, but I found it while Googling for my new project. My project is a DIY solar backup battery box where I monitor the battery voltage and shut down the whole box if the battery voltage goes below 10 Volts.
    I struggled for about a week trying to cut the power off at the tail with a single Mosfet - like you showed in your beginning sketches. And sure enough it doesn’t work but the reasons are not very obvious to me. Why is there leakage? And weird stuff happens to the ESP8266 ground. Apparently cutting someone else’s legs off is pretty easy and works, but when you try to cut your own legs off it doesn’t work very well.
    You glossed over the fact that it didn’t work, but if you have time (and find it worthwhile), I would love to see your analysis on what happens, why the tail mosfet doesn’t work.
    I am sure many hobbyists around the world fall into this trap every day.
    Great Channel. Thanks for posting such good stuff.
    Mat

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Trying to control power in the ways I showed (that failed) is in some ways like trying to pull yourself up by your own bootlaces. Either the thing you're powering isn't powered (so you can't issue a "power up" signal either) or the ground keeps changing relative to the VCC and the electronics gets very upset. The 100% reliable way to do this is with the final circuit I showed using two MOSFETs. If you buy the (quite cheap) Si4599 dual MOSFET chip it does it all with minimal connections (and it's small but can carry significant current). I use this in quite a few circuits and it's brilliant.

  • @duncancampbell9742
    @duncancampbell9742 2 ปีที่แล้ว

    Do you think the SI4599 could supply both the N & P channel for a relatively low power circuit running from battery power ?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      When you say "supply both the N & P channel", I'm just wondering what you mean there. 🤷‍♂️
      Does your battery powered project unusually requires a +ve and -ve supply?
      Or do you mean just supply "the battery power" to a battery powered project, in which case that's exactly what I do with my storage container lid-monitors.
      I can tell you more, one way or the other, if you clarify your meaning a tad, Duncan. And describe your project a bit so I can get a better feel for what you are trying to achieve 😜

    • @duncancampbell9742
      @duncancampbell9742 2 ปีที่แล้ว

      ​@@RalphBacon Apologies, I should have been a bit clearer. Your solution uses both P and N channel MOSFETs to provide power to an Arduino and associated circuitry. It is normally off, on when a pushbutton is pressed and off again when the Arduino decides it's no longer required. I want to make my own A/C Remote control to replace a faulty one rather than just buying a replacement - and I have a basic prototype using an Arduino Nano that works perfectly in terms of controlling the A/C, but I want the ability to power On/Off the Arduino and associated circuitry in the same way you have done. I was just wondering if it might be feasible to use the SI4599 you mentioned in another (later) video as it provides both N and P channel MOSFETs in a single package - albeit with lower power capabilities, but maybe enough for my requirements

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      In that case, YES 👍🏻
      I am doing this right now with my storage bin monitor. It's the same circuit as in video #123 (wow! that was a long time ago) and using the P- and N-channel MOSFETs in either the Si4599 or the (cheaper) AO4606 which I've found are drop-in replacements.
      Current for the Si4599 is 6A for P-channel and a bit more for the N-channel. More than enough for an Arduino on/off.
      Any questions, let me know. Have a great Easter 2022! 🐰🐣

    • @duncancampbell9742
      @duncancampbell9742 2 ปีที่แล้ว

      @@RalphBacon Thanks Ralph - you too

  • @gavinsmalley1513
    @gavinsmalley1513 5 ปีที่แล้ว +1

    Hi Ralph, I commented on your blog post with the same theme so thank you for doing a video and proving the P-channel works in the high side as well as the N-channel in the low side that I had used. You do need to be careful about assuming that there is a full off - as I found out through the forums after much hair-tearing mosfets have a small leakage current when "off" (seen in the datasheet as Idss).
    In your final circuit you have the Arduino permanently powered, of course it can also be powered from a 5V supply derived from the 12V one and thus send itself (and the regulator powering it) to sleep in the same way the first circuit did - so the 12V one can have a 0uA draw so long as the correct mosfet is chosen. Often mosfets with a low Idss have a slightly higher RdsOn but I have found this to be a better trade off given that most circuits designed this way are intended to spend much more time off than on.
    Incidentally the Amazon dash doesn't use this technique - they draw a continuous 2-3uA when in their standby state slowly depleting their inbuilt unchangeable battery. Mind you the battery will actually self discharge at a higher current than that but still...

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Ah ha! So that was you, Gavin, a bit backwards (you know what I'm referring to). And yes, it's a small world, we're all doing very similar things. So instead of me being trail-blazing, it appears that there is nothing new under the sun.
      But to return to your post there, it appears that this circuit would work just fine for an ESP8266, would it not, even at 3v3, as the N-channel MOSFET doesn't have to be fully on to bring the gate of the P-channel MOSFET low (I haven't tried this but it seems probable). Just buy a few of those P-channel MOSFETs (I mean, how cheap can these things go?) and have a go!
      And yes, the 5v can be derived from the 12 volts, I'd use a buck converter for efficiency though, not an LVR as they just waste power.

    • @gavinsmalley1513
      @gavinsmalley1513 5 ปีที่แล้ว +1

      @@RalphBacon Hi Ralph, yes it was me. I have it working very well with an ESP8266 with an N-channel in the 0v line. I'm using 3xAAA batteries so nominally 4.5v (dropped to 3.3 with an LDO-LVR because I haven't room in the enclosure for anything else and it's only on for 5 seconds per day) driving the mosfet with the 4.5v using an opto-coupler on the ESP. Not because 3.3v isn't enough to turn on the mosfet but because the ESP was still running when I drove it directly - I discovered that the ESP can run without GND attached if there is a GPIO attached to 0v which was happening through the pull down on the mosfet gate.
      I had ordered some IRFU5305 p-channel mosfets from AliExpress but when they arrived whilst they were badged as International Rectifier IRFU5305 they were actually some as yet unknown n-channel devices with the pins in a different order from the 5305. Now I have seen your video I have ordered some of the p-channel ones you used - looking forward to more experiments when the boat arrives from lands afar.
      Thanks as always for your video - always makes my day when I see a new one from you.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      All is clear, I hope you have fun with the (cheap or what?) MOSFETs when they arrive (watch out for those static handling techniques). Thanks for your support too, much appreciated.

    • @gsge
      @gsge 4 ปีที่แล้ว

      @@gavinsmalley1513 Hi Gavin,
      Can you provide your schematic Please ?
      Thanks.

    • @gavinsmalley1513
      @gavinsmalley1513 4 ปีที่แล้ว

      @@gsge See first post of www.esp8266.com/viewtopic.php?f=160&t=18590 but replace the IRLZ44N with a BS170.

  • @marcobenecke7326
    @marcobenecke7326 5 ปีที่แล้ว

    I really love to try this out, but i own only the IRLZ44N (which should be ok for this task) but no P-Channel FET on stock. Is it really that easy to switch to a PNP Transistor?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      It won't work properly using a PNP transistor instead of the P-Channel MOSFET because the resistance of the transistor will be much higher; thus it could get hot and/or not provide sufficient current. That said, as a proof of concept it might work (eg, using a simple LED as the load would be fine). As you saw in the video, MOSFETs are cheap (from the Far East, anyway, and not a King's Ransom from eBay UK, actually. I hope this helps.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Regarding the RESET pin, I believe that was just an arbitrary pin assignment for the Adafruit library use (to reset the CAP1188 on startup, probably).

  • @lint2023
    @lint2023 2 ปีที่แล้ว

    Do you think a capacitive touch switch like TTP223 could be used to power up an Arduino and then the Arduino trigger the TTP223 off? (some hack of the TTP223). I like the approach you show but I want to eliminate the somewhat long hold of the momentary switch.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      You could use the same Auto switch on/off as I show here but with the TTP223 wired to the Gate of the *N-channel* MOSFET. When you touch the TTP223 the signal output will go HIGH, thus turning on that MOSFET which will then turn on the P-channel MOSFET and power your Arduino.
      No need to hack the TTP223 because the Arduino's first job is to keep itself powered up by keeping the Gate of the N-channel MOSFET high just as the demo shows. I use the auto on/off circuit with a tiny Si4599 (or equivalent such as the A04606) and it works just fine.
      Be aware that the TTP223 takes 6μA in standby (ie not supplying a signal) so that might be important if you're running on batteries.
      I've done other videos on this topic so do check the schematics for them.
      bit.ly/TH-camVideoList-RalphBacon

    • @lint2023
      @lint2023 2 ปีที่แล้ว

      @@RalphBacon Thank you. I'm going to get MOSFETs and do this. My worry about startup time is because I recently moved a sketch from a Nano to a Pro Mini 3.3V, 8MHz. Along with seemingly starting slower I discovered the delay function operates more like a counter. I had to cut the delay times in half for the sketch to give the same operation as in the 16MHz mcu.
      Now that I have hit full retirement age (happy and sad) I hope to expand my knowledge and experience with this fun and useful stuff.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      If your 8MHz chip is counting delays half as quickly as the 16MHz device then you have not loaded the correct "fuses" to it, to tell the chip how quickly the (internal?) clock is running. The delay, and millis() will always run the same regardless of clock speed.
      Try using the MiniCore board description and then specify the clock speed you're using etc - it will then work exactly the same as a Nano.

  • @eriklaken1025
    @eriklaken1025 5 ปีที่แล้ว

    Also Nice, boot up signal from ds3231 timer do your thing and set A0 HIGH with 220ohm and 2n2222 transistor to reset ,rebooting And go to deepsleep waiting for a signaal from ds3231 timer to boot up again. You can do delay to give esp8266 power for x time. Only deepsleep power from arduino nano mini is used in the time between. Nice for data collecting to MQTT. With battery and solarpanel no power required.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Thanks for your post, Erik Laken, good to hear from you.

  • @robotboy3525
    @robotboy3525 4 ปีที่แล้ว

    Hi,
    Is there any significant difference in using
    other mosfets such as the 30N06L and 47P06 or
    it is mandatory that i use the irlz44n and irl3705n ???
    also what makes the mosfets with S or Z sign at the cathode side so special compared to the other mosfets ?? 🤔

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      You can use any MOSFET you like here (just ensure you have one N-channel and one P-channel) but the bit you really need to read up on is the RDSon value (resistance between Drain and Source when on) and the Gate threshold voltage.
      A P-channel MOSFET has a higher RDSon value than an N-channel so if you get it below 1 ohm for a P-channel you are doing well.
      The GATE voltage on the N-channel should be 5 volts or less, otherwise it will not completely switch on and may cause the entire circuit to malfunction. Gate voltages can vary, from 1.8v to 10v so check the datasheet carefully.
      I'm using a dual MOSFET chip in my current project which works very well; its an Si4599 and you can get them from Banggood pre-mounted on a tiny development board. bit.ly/370qI2N

    • @robotboy3525
      @robotboy3525 4 ปีที่แล้ว

      @@RalphBacon
      Thanks for the reply, would you give a schematic of how you wired your Si4599 to your project ??
      sorry, I'm very new to this.
      the Si4599 board has NS1 NG1 PS1 PG1 etc etc example PG = power ground ??

  • @flemming2jacobsen911
    @flemming2jacobsen911 5 ปีที่แล้ว +1

    What about adding a cap parallel to the push button?
    This should allow you to keep the PMOS on for a while (via the 100K charging resistor).

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Yes, it should. Are you suggesting this so that the switch only has to be closed very briefly and the PMOS is kept switched on because the cap has not charged sufficiently to switch the PMOS off again - thus allowing the Arduino the chance to turn its GPIO pin high?

    • @flemming2jacobsen911
      @flemming2jacobsen911 5 ปีที่แล้ว +1

      @@RalphBacon Yes, that was the general idea. With some tuning, it could allow USB to be connected without issues.

  • @xyntaxxian7615
    @xyntaxxian7615 2 ปีที่แล้ว

    Hi sir. At tried to do your circuit from github but I did the one where you could read the state of the button. When I measured the current consumption with everything turned off, from my multimeter there's a 1.1-0.7~ uA . Is this normal? I used the si4599 and in4148, is this the ones that affect the consumption?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Well, there will be a few _nano_ Amps leakage but not as high as a μA I would not have thought.
      The diode will _prevent_ current flow into the μController. You have the anode connected to a GPIO pin?
      Did you use a 100K resistor on the base of the P-channel MOSFET to +ve? That _could_ allow up to 50μA leakage although it should be blocked by the N-channel MOSFET.
      You will have to measure where the current is flowing using a multimeter at various points to see what is allowing that current to flow.

  • @iantcroft
    @iantcroft 2 หลายเดือนก่อน

    Hi Ralph, thanks for the vid, I am hoping to give this circuit a go but my project voltages are slightly different.
    I have made a little gps speedo using a 3.3v pro mini with onboard led and regulator removed, a 3.3v oled and a 3.3v gps (Quectel L80R).
    The above 3.3 voltages are regulated by a separate LDO (MCP1700) powered by a small LiPo battery through a TP4056 protection board and small on/off slide switch. It works surprisingly well!
    I would like to remove the on/off slide switch and replace with a circuit which can be powered off by software rather than my memory, and the protection board preventing over-discharge.
    I would also like to monitor the LiPo voltage between the cutoff circuit and the modules/load and display it on the oled plus auto shutdown if the voltage gets low, much before the protection board kicks in!
    Ideally, I would like to press the same power-on button to turn the power off. Although, a separate button wouldn’t be the end of the world.
    Is this something you have already conquered, and with LiPo (3.7v) - to 3.3v logic?
    Any help / advice is welcomed!

    • @RalphBacon
      @RalphBacon  2 หลายเดือนก่อน

      And do you want to make your morning coffee, with optional toast? 😃 OK, let's start!
      I've made the following assumptions:
      1. Your TP4056 board charges the battery and powers the circuit with 4.2v when connected to USB, otherwise the battery powers the circuit with up to 4.2v (but averages around 3.7v).
      2. Your switch is in-series with _the battery output_ to turn off the circuit, but the battery could still recharge with the switch in the OFF position.
      3. Your 3v3 LDO is in-series with this switched (up to 4.2v) battery output.
      I would put the P-channel MOSFET in place of the switch. The Gate of the P-MOSFET is controlled by two things: the N-Channel MOSFET and a momentary switch to ground. Push the switch, the P-MOSFET starts conducting.
      Your circuit should immediately, as the very first thing, bring a GPIO HIGH that is connected to the Gate of the N-MOSFET. This ensures the circuit now latches on and you can let go of the button. My projects take between 0.01mS (Arduino) to about

    • @iantcroft
      @iantcroft 2 หลายเดือนก่อน

      @@RalphBacon
      You are a gentleman! I am more of a tea man myself 😉
      Your assumptions are mostly correct.
      1. When charging, I disconnect the load so it can terminate properly.
      2. My switch is between the tp4056 (out+) and the mcp1700 3.3v regulator.
      3. See above (2.)
      Thank you for describing your robust solution, and using an all in one mosfet sounds great, it looks pretty small though! Do you think the through hole AOP605 would do? Could be easier to breadboard.
      Was wondering if any other components were needed, resistors, caps etc?
      Have you possibly created a video on this circuit, I have been searching but have not found one? 🫤
      I think many people would find this circuit useful.
      Thanks again for your help and advice.

  • @dafpnp
    @dafpnp 3 ปีที่แล้ว

    Wow, reminds me on 3 phase motor starters :)

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I've never used 3-phase power but I'm happy you understand that!

  • @ytfp
    @ytfp 5 ปีที่แล้ว

    -31 milliamps!! And they say free energy is a farse!
    This is a great alternative to say a TPL5110 being limited to maximum of 2hr intervals, or could be a lifesaver of a circuit for those who only purchased a TPL5111 and were meaning to turn their Arduino off, not merely trigger a pin. What sort of power are we talking about here? I know its "off" but since you are really getting into the low power stuff, do you have a Ucurrent(eevblog) or newer current ranger(lowpowerlab) to measure your projects down to the nanoamp range? I think this would be a great investment if not. Getting the power down below the current popular low power champion (TPL5110) based solution and using a ds3231 looks to be a much more desirable solution for the longer off times (and from the looks of things cheaper).I am equally interested putting the Arduino or bare chip to sleep and just trying to get all peripherals (screens, sensors etc.) on a system like this as I am in having a real time clock dictate the whole power of the project. A nice hybrid would also be desirable to have an RTC turn on the Arduino and the Arduino from there, determining what pins to trip to trigger then in the on status. A robot for instance is tripped by the RTC, arduino starts up, triggers a single sensor, perhaps temperature, if temps is okay, there is no need to power up the screen to notify anyone visually. These screens and such, often have vampiric loads even when not being powered and it would be great to turn their power off completely. Ideally an arduino with 10 sensors would take no more power than an Arduino with none.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      If we assume that my meter can accurately measure µA (as shown in my barebones Arduino demo) then I can only assume that any current leakage is below 1µA - I reckon that's below any self-discharge (internal battery leakage current) so probably has no (negligible) effect on battery life. Which is where I stop as there's no point in finding out, IMHO, for example, that it actually consumes 10nA. YMMV of course.
      Your example of something being triggered by an RTC is exactly one option that I mentioned briefly, it's probably the way to go. the DS3231 has flexible alarm settings, enough for this purpose and consumes no power from the main battery.
      Good to hear from you ytfp, it's nice to see that we're all thinking along roughly the same lines, with lots of "what ifs".

  • @zaprodk
    @zaprodk 5 ปีที่แล้ว +1

    I don't think i have ever seen a MOSFET in TO220 housing without the metal tab being connected to the drain - do they even exist? All the devices i have opened, the center pin and the metal tab is one whole piece of metal.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      I haven't either, but I suppose there might be some exception. Is the tab still connected to the drain (not the source) on a P-channel MOSFET? I haven't checked. But in general, yes, the tab is connected to some pin or other.

  • @louislee1269
    @louislee1269 ปีที่แล้ว

    I am trying to use a 5V Arduino UNO to switch on and off the power source to a 15V device, with the circuit you draw in 32:52. I would like to add a diode (1N4001) between the drain of the P-channel MOSFET and the ground. I read from elsewhere that a diode can protect the Arduino from voltage spike as the switch turns off.
    Do you think that adding the diode is useful? Thanks!

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      A diode can protect electronic circuitry if what you are switching off is inductive; that is, it contains a coil like a motor or relay. As the power is switched off, the coil's magnetic field collapses and that generates a high voltage within the circuit that most certainly will kill any electronics (eventually, not immediately perhaps).
      However, the diode has to be places _across_ the device that is the motor, relay coil or inductor. So that it doesn't conduct under normal circumstances, obviously. The cathode should be connected to the positive side of the device, anode to the negative side. Only when the high voltage is generated (because the relay was switched, for example) will it conduct and protect the attached circuit.
      Using a diode _in series_ as you are suggesting will merely drop the voltage available by about 0.7v without providing any specific protection.

    • @louislee1269
      @louislee1269 ปีที่แล้ว

      @@RalphBacon Many thanks! Such a detailed answer!

    • @louislee1269
      @louislee1269 ปีที่แล้ว

      @@RalphBacon Just another very quick question about protection diode. I have read the corrected circuit diagram of split power supply (IMG_20181014_192514.jpg) from your Github page created for this video. Lots of useful information on your Github.
      I am implementing this latch so that my Arduino UNO can switch on and off the power for a 15V device. What I worry about is that my 15V power supply will damage the GPIO pin on the Arduino. Is it possible that 12V current flows through from to the drain to gate of the N-MOSFET, through the 180 ohm resistor, and finally reaches the GPIO pin? Or is it just an unnecessary worry?
      Should I add a diode, perhaps a schottky diode or 1N4148, in order to protect the GPIO pin against 12V flowing into the Arduino? Sorry for any ambiguities in my question. Thanks in advance.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Understood 😀. So your Arduino should not be connected in any way to a 15v supply. If you are using the MOSFET circuit to switch it on, that's fine because the Arduinos GPIO pin is the only point of contact (apart from a common GND). Use a Schottky diode in series with the GPIO pin, just as you first suggested for full circuit protection.

  • @emililie2244
    @emililie2244 5 ปีที่แล้ว

    Thanks, I'll use something similar.
    At IRLZ44N Vgs (th) is maximum 2V, at 3.3V is open, it works perfectly also at Raspberry. The current is below 10 A

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Good to know that, Emil, at least Raspberry Pi users can consider this a MOSFET to add to their component list. Thanks for posting.

  • @shvideo1
    @shvideo1 2 ปีที่แล้ว

    What pin of the Arduino is receiving the power? I thought Vin accepted between 7 and 12 VDC. You may not have an Uno though. It is a bit confusing!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      In this demo, Daniel, I'm assuming the switched power goes to the +5v pin of the microcontroller (yes, an Uno or similar). It therefore bypasses the on-board voltage regulator. But this circuit can tolerate a higher voltage, in which case it would then go to the Vin pin (and then to the on-board voltage regulator).

    • @shvideo1
      @shvideo1 2 ปีที่แล้ว +1

      @@RalphBacon Thank you Ralph for clarifying this. Your feedback is much appreciated. This is how we learn from each other. Great health to you!

  • @jacobhn2
    @jacobhn2 5 ปีที่แล้ว

    I soldier old cat 5 cable to my component if they are not able to get down in my breadboard

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      A great idea. I use hookup wire that I buy in 2m lengths, probably 23swg; lasts a long time. Thanks for the suggestion.

  • @thesimbon
    @thesimbon 5 ปีที่แล้ว

    Hi, I already wrote other times but if you use the right components you can make a wireless node that can send sensor data on regular or dynamic intervals with just 4 or 5 micro amps; if you keep the arduino in sleep mode, your sketch will keep its state while if you power it off when it gets power back it will have to start the sketch from beginning, initialize radio and sensors, establish a communication and so on. Real life scenarios are different than a proof of concept on the bench. If you want to see what I have been talking about, pls visit mysensors.org forum

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Well, I haven't seen _any_ device running on 4 or 5µA (I got about 20µA in my Arduino Deep Sleep test) but more to the point we need an ESP8266 if we are to send messages OTA.
      As you saw in my ESP8266 Deep Sleep demo, it starts again from the beginning when woken up, just as if you had plugged it in the first time - including making a wi-fi connection (although it's quicker if you keep a static IP address rather than using DHCP).
      So I will have to take a look at that website link to see if we really can do what you are suggesting! At least it's got us all talking about this, so thanks for posting, interesting post.

    • @thesimbon
      @thesimbon 5 ปีที่แล้ว +1

      @@RalphBacon you need to remove voltage regulator from the pro mini and also the power led and use low power sensors. About ota, mysensors supports it either through custom bootloader or by adding a spi flash

  • @rico-s3752
    @rico-s3752 5 ปีที่แล้ว

    Hi, i'm a beginner, i just discovered your channel, it's a great resource! You deserve more subs, as far as i'm concerned from now on, i will spend my life on your channel!
    This is a great project, which i had been looking for a long time, but right now i'm unable to start it yet, for two reasons:
    - How i can integrate your proj with an UPS? Because i made a door lock,
    with a 9v power supply and, a lil UPS with some parallel battery, in case of blackout...
    perhaps, i should let pass a minimum of current, so that the power supply is always kept slightly busy (using a capacitor between power supply and UPS?) and that the UPS starts, only in the complete absence of power? Sorry if I'm saying stupid things, i have not been able to study electronics, i'm learning along the way ...
    - I don't have the same mosfets as the ones in the tutorial, i have salvaged some others, but, i'm not entirely sure that they can be good as substitutes, and unfortunately, i live on an island ...i should wait looooong time for a delivery, so i ask you...
    Comparing mine and project mosfets datasheets, what characteristics should i keep in mind to get mosfets similar to those you proposed?
    Thank you so much for your work!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Welcome to my Arduinite world, Rico-S! Let me answer your last question first, regarding MOSFETs. Any MOSFET will work as long as it requires "TTL level (5v) level" gate voltage. What does this mean? It means that the MOSFET will turn fully on with just 5v being applied, such as from an Arduino. MOSFETs that are not TTL compatible will still turn on at 5v but only partially and will get very hot indeed, negating the whole point of them. Always read the datasheet for the particular MOSFET and find the RDS(on) parameter. That will tell you (if the description hasn't already) what the resistance is between the Gate and Drain at various Gate voltage levels. It should have an entry for 5v. If it also has an entry for 10v be very suspicious!
      Regarding your UPS question, I'm slightly confused. A small UPS normally supplies _household_ (mains 240v or 110v) from a battery (or set of batteries). What you are describing is a battery backup for a 9v supply which is also very common these days (although usually using a lower voltage and one or more 3.7v lithium ion batteries). The 9v supply will continue to charge the battery until it is full and then switch off and monitor the battery voltage; if it falls it will charge it again. There should be no need to keep things "running" to keep the battery topped up. It's important that the battery voltage is actively monitored by a charging system to avoid over-charging (and possible fire). Some Li-Po 3.7v batteries have a protection circuit built in to achieve this. There are many such battery charger/monitors available, I think I mention one in video #115.
      Thanks for posting, good to hear from you.

    • @rico-s3752
      @rico-s3752 5 ปีที่แล้ว

      @@RalphBacon WoW quick answer, thanks a lot.
      About the mosfets, very helpfull, i had imagined it, thanks to your answer now, i now have more knowledge and confidence.
      Now i will reading a lot about mosfets.
      About the "UPS" :|
      I wanted to call it backup, then reading on net many people called it UPS, and i let myself be dragged, to amaze you with big words :D ...
      I confess... i only made a small backup with some battery :( , but not rechargeable. Above all, i also explained myself badly.
      My perplexity remains, your project turn off Arduino, mine starts the backup batteries to keep Arduino active, wouldn't that create conflict?
      I don't want to to bother you, but if you suggest me a project to follow to create a power backup, that can be compatible with your project, i would be very happy.
      Thanks again for taking the time to answer me personally, you are one who cares about its users, it's a rare, and very important thing.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Happy to help, Rico-S!
      OK, here's a suggestion: bit.ly/5vUPSArduino
      A single 18650 battery can be charged by 5v (eg phone charger) which also powers your Arduino via the Vin pin (max 5v - check!). If the power goes off, the battery continues to supply power to your Arduino as if nothing had happened. Then the relay on/off works as I described it, the power just comes from a "UPS" - well it might be called that now as it is "uninterruptible", right? What do you think, a solution to your problem?

    • @rico-s3752
      @rico-s3752 5 ปีที่แล้ว

      @@RalphBacon
      I had seen a video about this object. I will buy it, being on an island, i will see it in loooong time :D, meanwhile i realize your fantastic project, then i will integrate that "UPS".
      Once again, thank you very much.
      I have recommended your channel to my friends.

  • @mrtom64
    @mrtom64 5 ปีที่แล้ว

    I may be missing something simple here but how are you isolating the power from the USB?
    In other words, why doesn't the Arduino power up when the USB cable is plugged in?
    Its clear the +5v in the schematic is from an external supply, (and goes through the ammeter), but I cannot see how the circuit on the breadboard can control the USB power.
    I'm not familiar with that flavour of Arduino so it may be just a quirk of that board but even so, I'd expect it to power up via the USB regardless of any exterior circuitry. (Unless +5v is shorted to GND but that would use power, wouldn't it?)
    I appreciate that normally the USB cable wouldn't be plugged in but as you demonstrate operation when it is It got me thinking why the Arduino didn't just power up when you plugged in the USB cable. (Unless its data only?)
    Thanks for all your hard work, its been very useful on many occasions.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      The Arduino won't power up because the P-channel MOSFET is held OFF by the 100K resistor. We're not powering the Arduino board *directly* via the USB port, we're supplying power via the 5v header pin, fed from that MOSFET. The MOSFET acts very much as a single pole switch. Until we turn that P-channel MOSFET on (by grounding its gate) no current will flow. Does that make sense MrTom? Ask more questions if anything is unclear.

    • @mrtom64
      @mrtom64 5 ปีที่แล้ว

      Hi Ralph, thanks for the reply, appreciated.
      I'm with you all the way on what you've done and why and how etc etc.....and its great stuff....this is not a question about the external power or circuit.....It's all great!
      My question is about USB power, and I'll say again that I appreciate this topic is not about power from USB but an external supply...which is fine, switched by a MOSFET etc etc yeah got ya, I totally understand...
      ...BUT...
      At 26:42 you plug in the USB cable. (Its plugged in at the start too!)
      USB supplies +5v DIRECTLY to the board.
      USB power does NOT go through your external circuit...it is NOT switched.
      At this point the board should power up (REGARDLESS of any external circuitry) but it does not.
      My question therefore is why not?
      Do you see my point? You should get a power LED when you plug in the USB cable....right?
      I'm just curious as to how the power from the USB is switched...you say yourself at the top of the video that there is no power to the Arduino and yet the USB cable is plugged in....which supplies power....and is NOT switchable....it doesn't go through any MOSFET or any other switching device....ya know?
      I'm not good at explaining without sounding like a complete arse, I'm sorry If I do, hopefully I've explained it better and you can now understand my question....when you plug in the USB the arduino should power up....regardless.
      Thanks again for all your videos....they really have been a 'goto' resource.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Ah ha! Thank goodness you included that time-stamped point in the video. YES, the cable is a *data-only* cable, I've cut the positive lead in the cable so I can do stuff on the Arduino IDE but don't power the Arduino by through it. Here's the funny thing: I had actually videoed all this but had to cut chunks out because it really was a bit long, and I guess this explanation is still on the cutting room floor! Quite ironic. But at least now we can all understand what's going on here. Phew! Glad you like the videos, and thanks for posting, appreciated.

    • @mrtom64
      @mrtom64 5 ปีที่แล้ว +3

      Excellent! Thanks for the explanation, I thought I was going mad for a moment!
      Video's are superb....only one complaint...not enough of them!
      Thanks again for taking the time to make them, I appreciate how much time it takes.

  • @adamhall7077
    @adamhall7077 3 ปีที่แล้ว

    What about using a for loop for the countdown?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I'm not totally clear in what you mean, Adam, (it's been a while since I did this video) but a loop for a countdown should be fine. Actually, a near future video will be using the Auto Switch Off circuit so keep tuned.

    • @adamhall7077
      @adamhall7077 3 ปีที่แล้ว

      @@RalphBacon I meant you used while loop for the countdown instead of a for loop.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      In this instance i don't suppose it makes much difference, but a "while" is more for monitoring a condition, whereas a "for" is a simple count. Thanks for clarifying what you meant!

  • @peut
    @peut 5 ปีที่แล้ว +2

    Hi I'm considering the IRF7317, an SO-8 package containing botn an N-Channel and a P-channel mosfet.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Yes, this would work, Jose; a couple of things to consider:
      1. This is a surface mount item so harder to solder but of course not _that_ difficult if you have a PCB - not good for stripboard
      2. You can't attach a heatsink even if you wanted to (certainly not easily; it's not meant to have one)
      3. The RDS(on) resistance isn't quite as good as the individual MOSFETs in this demo but probably makes no difference at the currents we're talking about, it will still work very well
      4. I haven't compared to the other MOSFETs in their datasheet but the leakage current for this item is specified as 1µA (Drain to Source). That might mean nothing, and compared to self-discharge rates of batteries is still very low indeed.
      5. They are very cheap from AliExpress!
      If you go down this route it would be good to post back here as it might be a very neat solution indeed.

    • @peut
      @peut 5 ปีที่แล้ว +1

      I will do so in a while.

    • @peut
      @peut 5 ปีที่แล้ว +2

      Success! See here: github.com/gitpeut/IRF7317-selfextinction/blob/master/README.md

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      This is EXCELLENT work, Jose. And the fact you could detect no current flowing (just like my demo) when it OFF indicates a very viable solution. I may mention this (and your excellent work) in a future video. Is it OK to put a link to your GitHub on my own GitHub in the meantime?

    • @peut
      @peut 5 ปีที่แล้ว +2

      Thanks for your kind words. You can link to my GitHub,, of course.

  • @eriklaken1025
    @eriklaken1025 5 ปีที่แล้ว +1

    It,s work,s.... A0 HiGH, A1 with electronic Relais to reset 0,5 second with timer ds3231 . Arduino nano mini sleeps hole day, does a thing once a day connects ESP8266 for one minute,turn it off and lot,s of power saving, haha thank you so much!

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Glad you found this useful, Erik, congratulations on getting it working. And thanks for letting us all now, appreciated.

    • @eriklaken1025
      @eriklaken1025 5 ปีที่แล้ว +1

      Ralph S Bacon Thank you, I am learning a lot from you.:)

  • @danharold3087
    @danharold3087 5 ปีที่แล้ว +3

    I think, not sure, I seen a voltage regulator with a built in sleep timer someplace.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +3

      Indeed, Dan, there is (as an example) the Texas Instruments' TPL5110, which is a " Nano-Power System Timer for Power Gating". You can get this from most Chinese warehouses (but not Banggood) but at £6 - £7 ($7-$8) they are not cheap. The MOSFETs are much cheaper and robust too, I expect, apart from the static precautions you must take. A simple CMOS 555 Timer running off a button battery would be just as simple, probably! Good memory you have, thanks for posting.

    • @danharold3087
      @danharold3087 5 ปีที่แล้ว

      Good points. The price for the tpl5110 ic is under $1 US here from Farnell, Mouser, etc. I am not a fan of the 555

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Wow! At that price, I would be tempted to experiment too. I shall keep an eye on the price over the next few months to see if it drops. I mention the CMOS version of the 555 timer as it uses µAmps of power (about 50µA) from a 1.5v button cell, and being CMOS can have HUGE time periods. Much better than the standard 555. But it was just a suggestion, no worries. Thanks for posting, Dan, nice to hear from you again.

    • @davidvukovic
      @davidvukovic 5 ปีที่แล้ว

      For those interested: www.ti.com/product/TPL5110

  • @asagk
    @asagk 5 ปีที่แล้ว

    In the ON state the FET turns some of the current passed to the arduino into heat dissapated.
    Is that really less power cunsumpotion over time than the few uA when the Atmel processor is in deep power down by it's own integrated sleep mechanics?
    I am not so sure about that one... perhaps only when the Arduino powers on extremly rare occasions?

    • @arinka62
      @arinka62 5 ปีที่แล้ว

      30mA through 0.03 ohm you may do the power dissipation calculation yourself. Is your question still valid?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      It's µW of power though. Not enough to really influence the overall battery life. And, as I said, you _could_ put the Arduino to sleep but power off the rest of the circuit. Best of both worlds, perhaps?

    • @asagk
      @asagk 5 ปีที่แล้ว

      @Arno Dekkers --- Yes, the question is still valid. The sheet tells ~0.02 Ohm for a duty clycle of less than 2% and pulse width of

    • @arinka62
      @arinka62 5 ปีที่แล้ว

      When the arduino is switched on the dissipation in the MOSFET is about 60 Micro Watt. An arduino chip in deep sleep consumes 30 micro Watt continuesly.

    • @andymouse
      @andymouse 5 ปีที่แล้ว

      Yes, but we are still only talking tiny numbers and as Ralph pointed out the two techniques in conjunction with each other add up to a quiescent current state of next to nothing...:)

  • @stickboy23mdf
    @stickboy23mdf 5 ปีที่แล้ว

    Okay, since you say it wasn't so original, here's the challenge, then: Use the power on circuit to ultimately power a Raspberri Pi, then, once boot has completed on the Pi and amperage draw has gone back down, use the duino to open a charging circuit to a small supercap - maybe a 2.7v 40 farad X 2 - to reach 5.1 v min - supercap - bank which will then activate and provide a short term power source for a safe Rasb Pi safe shutdown (along with a signal to the Pi to initiate the shutdown) in case of power removal (either inadvertent or intentional - pulling the plug).... which avoids the need for batteries.
    What do you think?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Supercaps are fine, MIckey, but expensive, as well as being quite low voltage if you want to actually run something like a Pi from them. 3.7v Li-Ion are cheap and the technology has matured so that they no longer explode too often. I've often looked at supercaps but got put off by the cost. Maybe time for a revisit?

    • @stickboy23mdf
      @stickboy23mdf 5 ปีที่แล้ว +1

      Thanks for the response. The reason for the supercap and not a battery is long-term stability in an industrial application where we don't have to worry about battery maintenance.
      Batteries are a good answer, but they do have limited charging cycles, etc. and, for use in a safe shutdown application, where you are looking to preserve your OS on the SD card, you need to run a safe shutdown of the OS.... somewhere in the 30 seconds or less power requirement - not a standard UPS, just enough to get us over the hump and safely exit...

  • @sebasdt2103
    @sebasdt2103 3 ปีที่แล้ว

    instead of pin A0 from an Arduino could like an esp32 power the MOSFET? Then the Arduino is controlled by an esp32. And thanks for making this kind of videos I learn a lot from them.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      It MIGHT work for the ESP32 - it depends on how sensitive the N-Channel Gate is. (Let me check... talk amongst yourselves for a bit)... OK, it says that the maximum voltage required on the gate to turn on the MOSFET is 3v so it should work with the 3V3 of the ESP32. Try it. If no luck, use a simple BJT as a MOSFET driver - so your ESP32 drives the BJT which in turn brings the MOSFET on.

    • @sebasdt2103
      @sebasdt2103 3 ปีที่แล้ว

      @@RalphBacon I have tried it but it's a little bit sketchy sometimes it turns on and then it doesn't. But for the BJT should I use a bd139 or a bc547 and the last question: Which resistor value is needed for turning the BJT on. Sorry for this but I don't really know how I could determine the value needed.

    • @sebasdt2103
      @sebasdt2103 3 ปีที่แล้ว

      I have found it and thanks for helping!

  • @ste76539
    @ste76539 4 ปีที่แล้ว

    Just for the information, you don't actually need anything like this for a Raspberry Pi - everything you need is already built in to the board, you just need to provide that external stimulus you mention. For instance for all my RPi's I have a wake up and shutdown/deep sleep button, it works with one GPIO plus ground pin, a momentary button and a simple Python script.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      The only "issue" with the Pi is that it doesn't start up automatically after a shutdown. Or after the battery UPS has died. But I created a simple auto-start for that situation and a Tiny85. Works just fine. It's described in video #124.

    • @ste76539
      @ste76539 4 ปีที่แล้ว

      The Pi will do whatever you tell it to - it's all in the software. You can just as easily tell the pi to reboot on that external stimulus rather than shutdown (the pi doesn't actually 'shutdown' per say, it just goes into a deep sleep low power state, which is why the same circuit will also restart the pi as in my example) The only reason this won't work is if you want the pi to go to sleep for a period of time, and restart later at a predetermined time. That could still be done with the same internal circuit and pins, you'd just need some form of timing or condition sensitive device to provide the stimulus in place of the button I described. An alarm clock/watch would work, or say a photoresistor for day/night operation. All you need to do is pulse the pin to ground for each transition - the thing that causes that pulse can be anything you like, and the script won't be any different.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      That's exactly what the ATTiny85 does to the Pi! Super simples. See, we are singing from the same hymn sheet!

  • @tenminutetokyo2643
    @tenminutetokyo2643 5 ปีที่แล้ว

    DOOOD!!!!

  • @robotboy3525
    @robotboy3525 4 ปีที่แล้ว

    Hi Ralph, I'm using the Si4599 which i ordered from banggood. I have wired it like this
    github.com/gitpeut/IRF7317-selfextinction
    the problem I'm having is that the circuit/arduino turns on when i press the button but the circuit doesn't turn off
    after the countdown. It does turns itself off but when it is not expected. kind of random.
    It wont turn off if the p channel gate doesn't go low but it will turn off when it goes low but it decides itself when to finally turn off.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Not the behaviour I have experienced. Your circuit diagram is a little difficult for me to follow as you have drawn the two MOSFETs as they appear in the chip rather than drawing them out separately. Anyway, you should be able to test all this without any Arduino. The P-channel will switch off the instant the gate is not held low (ie when you release the button). It is held off via the 100K resistor from the Gate to +ve.The N-channel MOSFET, with +5v on the Gate, will hold the P-channel Gate to ground (so keeping it ON) Once the N-channel Gate's voltage is removed it will turn off and thus turn off the P-channel too.
      Instantly.
      Get each bit working independently (using dupont cables to connect Gates etc). Then both MOSFETs and finally use the Arduino to control the N-channel Gate's voltage. It's what I have done and it does work absolutely as expected, so it's either your wiring or missed connection or similar.

  • @randalm7904
    @randalm7904 5 ปีที่แล้ว

    What you have discovered is a basic "Load" switch, of which there is a whole world of them. They have integrated these discreet mosfets into a single package (sot-23 and smaller). Examples, www.ti.com/power-management/power-switches/load-switches/overview.html.
    www.ti.com/lit/an/slva652a/slva652a.pdf
    www.ti.com/lit/pdf/slva887

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      I do like the pdf link you give here, Randal, very informative. And, of course, the term "Load Switch" nicely encapsulates exactly what we're doing here, electronically rather than manually.
      Quote from the TI pdf:
      ...load switches are electronic switches that can be used to turn on and turn off power supply rails in systems, similar to a relay or a discrete FET.
      Quite so. Pretty much the point this video is making, although not as explicitly as TI have in the PDF.
      I'm sure others will find that useful too, thanks for posting, most appreciated.

    • @randalm7904
      @randalm7904 5 ปีที่แล้ว +1

      @@RalphBacon
      Another interesting article on integrated load switches vs discrete MOSFETs.
      www.ti.com/lit/an/slva716/slva716.pdf
      www.digikey.com/en/articles/techzone/2018/mar/take-advantage-of-ic-load-switches-features-to-safely-minimize-power-consumption

  • @stompreaper
    @stompreaper 5 ปีที่แล้ว

    Dave on the EEVBlog has a related scheme for soft power off - th-cam.com/video/Foc9R0dC2iI/w-d-xo.html

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      OMG, yet another one who has explored all this. Mind you, you say "related scheme", perhaps it's different. I might skim that video...

    • @stompreaper
      @stompreaper 5 ปีที่แล้ว

      The difference in this soft button power toggle from yours was to latch the on press to keep the power switched then change the function of the button to be used to force it off. In your case where you want the arduino to power itself off the latched button functionality would be your output GPIO pin instead. I think the latching on technique could be helpful to avoid your long on button press issue and then wire in the GPIO pin to force the off which I think overcomes the slightly glitchy behavior Dave’s circuit was having when turning off.

  • @daviddoidge1252
    @daviddoidge1252 4 ปีที่แล้ว

    Hi Ralph, I am unable to find the information on the "DS3231" to enable the switching of the NDP6020P. Some people in the commects have mentioned it but none have explained how to wire and code it. Can you help please ?
    update: found it here github.com/JChristensen/DS3232RTC

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Oh good you found it, that's fine then and thanks for posting the links for other too.

  • @julianlesterthoresson7887
    @julianlesterthoresson7887 4 ปีที่แล้ว

    Hello Ralph, first of very nice video, it helped me a lot with my project so far! Just one question, why does it have to be so complicated? I made the same thing with only one switch and one N-Channel Mosfet (Like the first idea in your video) and it works: Picture and Video in this dropbox link: www.dropbox.com/sh/wyw129byssvnoo2/AABTY4WE-yasUOpPgu8bj5y3a?dl=0
    Although the circuit is a little bit different as the supply is actually 4V and then I go into a step up converter from where I power the arduino. Thanks for your answer!!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      If it works for you, Julian, then that's great. I'm pleased that you got it working.
      However, your use of an *N-Channel* MOSFET in the supply line is not standard practice. The Source should be at GND potential with the load between the Drain and +VCC. I suspect your circuit works because you are powering an entire board with it, with all the LEDs, LDOs and so forth, so the MOSFET can "see" GND. If you tried that with a bare 328P I doubt it would work because the MOSFET would not like the potential difference between the Source and GND and would not switch on.
      If you look at my circuit, we use a *P-Channel* MOSFET to interrupt the VCC to the load and use another MOSFET (although a BJT works here too) to switch that MOSFET on and off (the GATE must go to ground, ie LOW, to switch on, hence why we cannot control it directly from the Arduino chip). This is the standard way of supplying power to a load, with the load between the Drain and GND of a P-channel MOSFET (or a PNP transistor but far less efficiently).
      Incidentally, even though your circuit works for you, you should at least have a 10K-100K pull down resistor from the GATE to GND to stop spurious triggering - but that might upset the delicate balance you have achieved!
      I hope this reply has helped you understand MOSFET a bit better but I'm very glad you had a go and got your board running to your liking - and now you know _why_ it works for you too!
      Thanks for posting, great to hear from you, keep experimenting!

    • @julianlesterthoresson7887
      @julianlesterthoresson7887 4 ปีที่แล้ว +1

      @@RalphBacon I see what you mean, I tried it with a different circuit and the MOSFET would not stay "open". I guess I have to apply the more complex solution. Thanks for your advice and please keep up your great work!!

  • @msevland
    @msevland 5 ปีที่แล้ว

    Have you testet the TrigBoard? I got it this week, but have not been able to play with it yet. He provides the Schematic on his page
    www.kevindarrah.com/wiki/index.php?title=TrigBoard

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      I'm afraid I've had no chance to play with this at all. Probably about time I read up on it though... thanks for the heads up.

  • @grindel80
    @grindel80 5 ปีที่แล้ว

    Dear Sir Bacon, what do you think about the TPL5110? (here a Breakout board for this chip: www.adafruit.com/product/3435)
    Greetings from Germany

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Servus Frank! Und Willkommen! I've not actually looked at it, although I know what it is supposed to do. The main "issue" is that people seem to think it acts as a switch or relay when what it actually does is provide a _signal_ to the receiving module (and expects one back too). Now that might be enough to wake a device in Deep Sleep, for example, but it won't do what the MOSFETs do here, which is actually switch the power on.
      I really should get one just to try it out (to make sure my understanding is correct) but trying to find one at a decent price (including postage) is quite hard (Banggood who sometimes give me stuff to evaluate don't stock this item). We shall see.
      Also, alles gute und mit freundlichen Gruessen aus England, bis dahin.

    • @grindel80
      @grindel80 5 ปีที่แล้ว

      Dear Sir Bacon, thanks a lot for the quick answer.
      1. "but it won't do what the MOSFETs do here, which is actually switch the power on." I think this is exactly what this adafruit board does. If you send a pin high from the arduino, it switches the circuit off. And you can either switch it on by a signal or with the inbuild timer (i think a IC 555). a good video from adafruit -> th-cam.com/video/-cRiN8sxQ5k/w-d-xo.html
      2. andreas spiess (the guy with the german accent) had rebuilt some kind of amazon dash button: th-cam.com/video/nbMfb0dIvYc/w-d-xo.html and today he was using a special board with a inbuild TLP5110 and a ESP. See th-cam.com/video/a2MiyFGWnU0/w-d-xo.html
      3. the chip itself is about 1 $ on aliexpress. the adafruit board is around 5 € in germany.
      4. thanks for the greetings in german. i don´t know that you speak german :D

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      I've ordered a couple, I need to experiment and tell everyone else! Thanks for the heads up, Frank. And yes, I speak German, my family lives im Schwarzwald. Just little old me, on my own, in the UK.

  • @timvonr2802
    @timvonr2802 5 ปีที่แล้ว

    Nice idear,
    Somwhat simmilar to www.kevindarrah.com/wiki/index.php?title=TrigBoard

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      OMG every man and his dog has had this idea before me! I must be behind the times...

  • @robotboy3525
    @robotboy3525 3 ปีที่แล้ว

    Hi Ralph, I'm trying to build a reverse polarity protection circuit which operates at 3.7V 3600mA and i intend to use
    a mosfet of this rating
    VDS 20 V
    VGS ±12 V
    RDS(on) max
    (@VGS = 4.5V) 11.7 mΩ
    RDS(on) max
    (@VGS = 2.5V) 15.5 mΩ
    ID
    (@TC (Bottom) = 25°C) 12
    RDS(on) Static Drain-to-Source On-Resistance 9.4 11.7(max) mΩ VGS = 4.5V, ID = 8
    RDS(on) Static Drain-to-Source On-Resistance 12.4 15.5(max) mΩ VGS = 2.5V, ID = 8
    www.infineon.com/dgdl/irlhs6242pbf.pdf?fileId=5546d462533600a401535663a52d25a9
    I was wondering if this would do just fine. I'm completely lost in understanding exactly what is all the RDS and VGS conditions. It's driving me nuts!!! please! elaborate :(

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Did you watch my video on MOSFETs (th-cam.com/video/5FHLWGZ_FUQ/w-d-xo.html ) and on Reverse Polarity Protection using a MOSFET (th-cam.com/video/eS4_6XQi74c/w-d-xo.html ) which should answer your questions? As the VGS(TH) for this particular MOSFET is just 1v1 (max) it should work pretty well.

    • @robotboy3525
      @robotboy3525 3 ปีที่แล้ว

      @@RalphBacon
      Ingenious!! Thanks I will watch the two video!

  • @gpTeacher
    @gpTeacher 2 หลายเดือนก่อน

    My project using your power latching circuit is finished! th-cam.com/video/a3CBE8MWuds/w-d-xo.html Thanks again for your help and inspiration Ralph! Gord

    • @RalphBacon
      @RalphBacon  2 หลายเดือนก่อน

      I've commented on your channel but it was so good (the project, not my comment) that I will say Congrats! again, looks very cool. 👍

    • @gpTeacher
      @gpTeacher 2 หลายเดือนก่อน

      That's high praise from you Ralph! Thank you very much!

  • @AngryRamboShow
    @AngryRamboShow 5 ปีที่แล้ว

    Why do DIY hobbyists seem to be obsessed with Arduino? Is it just because Arduino is a buzzword or what? Because if it's about capability or price I don't see many reasons to choose Arduino over the competition. When I do the math I don't see why Arduino has so much hype and attention put on it. Atmega chips are slow as fuuuuuuuuu

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว +1

      Hmm, I may be wrong but I'm guessing you're not an Arduinite :)
      When you say "the competition" I wonder what you mean? PICs? Raspberry Pi? ESP8266s? All of which are very capable but I would not describe any of them as the competition, more of an alternative platform depending on your requirements.
      The ATMEGA chips have opened up a whole world of hobbyist (and commercial) embedded electronics. Makers, hobbyists, teachers, engineers all have a platform on which they can experiment (what if...?) very easily. Cheaply too. Using an industry standard language (albeit somewhat simplified if you use the Arduino IDE).
      As for speed, I think 16MHz is pretty nifty for most things an Arduino ATMEGA328P would be used for. If it _is_ slow in a particular application then the wrong chip was selected. Horses for courses.
      As it happens many can see the writing on the wall for the humble Arduino Uno-style boards. Whilst they will be around for many years yet, newer, more capable chips and boards have arrived (with built-in wifi as a minimum, faster, multi-cored processors, more memory and so on) that are just as cheap and easy to use (and the Arduino IDE is being constantly modified so they can be programmed just as you would an UNO).
      You won't convince many that the UNO is just a fad. It is an excellent introduction into embedded computing and many hundreds of thousands of users (possibly millions) have made them sing and dance doing wonderful things.

    • @AngryRamboShow
      @AngryRamboShow 5 ปีที่แล้ว +1

      @@RalphBacon I've attempted to write back twice, but TH-cam seems intent on not sending it to you. I've got a lot to argue about how MCU's like the Teensy or STM32, STEM21, etc, are just about completely ignored by the DIY community. Learning about them is arduous without all the projects that you find with Arduinos. But suffice it to say, I'm glad channels like yours exist; I'm dropping a like and a sub.