#50 TP4056 UPS - protect from power outs and brown outs

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • New! https:/ralphbacon.blog
    So your fantastic Arduino project is up and running, then POW! The lights go out and so does the power to your Arduino project. Even a very quick power drop, aka a Brown Out, can cause your Arduino to reset, potentially losing data it is collecting.
    But if you implement a VERY simple and cheap UPS (Uninterruptable Power Supply) using just three components you can protect your Arduino so it can continue with data logging or monitoring or whatever is supposed to be doing.
    In this demo I use a (spoiler alert!) TINY battery that can keep an Arduino project running for a long, long time (over an hour in this case but totally dependent on what power you're drawing in the remainder of your project, of course).
    Best of all, the TP4056 module board I'm using here has been updated so that it has battery protection circuitry built in, so there's no danger of either over-charging your battery nor or over-discharging it either. And it's totally automatic. Brilliant!
    If you have a solar cell that can generate 5V then it can also be used for that, so your battery is charged when there is sufficient sunlight but falls back to battery power when it's dark. Use a larger capacity battery than I am using here and it could run all night.
    It's an interesting (not to mention cheap) introduction into rechargeable battery technology so give it a go. I've not included a sketch because it is just a slightly modified 'Blink' sketch - the video contains all the details you'll need!
    Battery: bit.ly/2blrZKn
    5v LiPo Charger: bit.ly/2boKtDu
    Step up converter:ebay.eu/2bFK3hA
    (note that this last item was not where I got it from - he is not currently listing items for sale. However, this is an identical item - many sellers have this).
    Simple Schematic:
    www.dropbox.co...
    If you like this video please give it a thumbs up, share and if not already subscribed please do so :)
    And my channel is here:
    -----------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?

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

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

    Hi, I am trying to achieve the same thing using a super capacitor instead. Once there is power loss, I just need to save a few parameters to EEPROM and send one SMS. The GSM module SIM900 claims to consume up to 2 AMP at the time of sending an SMS. Any recommendations. I am of the opinion that I need a 4F 5.5V Super cap with ISR < 1ohm.

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

      I'm guessing that super caps should work too, but there must be a formula to determine how much current they can supply when the power fails before they are depleted. Also watch for inrush current; an empty capacitor of that magnitude is like a short circuit!

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

    Nice video Ralph. I would expect when the supply is present the battery just gets charged and is disconnected from the load so that it stays charged fully until it is needed. I think this is a good video for a part two that uses a 18650 battery pack to power the circuit when the supply drops out.

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

      Yes the Li-Ion is topped up as required when connected to power, Joey, and used when the power fails. Quite simple in concept but a real life saver (not literally, I hope) when the power fails!

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

    You've earned a subscriber! I'm desperately trying to setup a similar UPS setup. But the problem with these is how the load is being powered from the actual battery when there is a 5v input being supplied, so the constant discharge / recharge kills the battery quite fast. Do you know by chance if there are any other PCBs on the market that would charge the battery, then when fully charged just power the load off the 5v input?
    I've searched for hours and hours but have found nothing. Thanks again for the videos.

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

      Hey Justin! Welcome to my channel! Now the thing about these USB battery chargers is that they are supposed to power your load (Arduino etc) from the incoming 5v supply until that stops then it will switch to the battery seamlessly, just like your phone does. Some do this better than others, but I've found that in general the cheap Far Eastern ones do work quite well (they are based on more-or-less the same chip and circuit).
      That said, even if (some of) the power is supplied by the battery and some by the incoming 5v then I don't think that should kill your battery any day soon. The Li-Ion battery will take several hundred *full* charge/discharge cycles and probably several thousand partial ones. So if plugged in 24x7 it will last for at least 3 years I estimate (funnily enough about the same time as your phone's battery tends to die).
      Whilst I can't recommend one module over another, it's worth checking all the Far Eastern suppliers (AliExpress, Bangggood, GearBest to name just a few) to see whether it mentions anything special about their particular Li-Ion charging module. But remember these places are mainly just sellers with a modest appreciation of the things they sell, so they tend to just repeat what's on the data sheet.
      Well, probably not the in-depth, definitive answer you were looking for but I hope it helps anyway, and thanks for posting!

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

      Thank you so much for this information. Really appreciate it!

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

    Hello Ralph! Thank you so much for the last 3 minutes of your video.
    I am designing a 12 volt 3S2P UPS for my Raspberry Pi 2 device with actuators. And of course the output will be stepped down for the RPi2.
    I have figured out the charging power sources for the TP4056's have to be isolated for a series arrangement. What I did not know was what would happen when the battery and charge element switched. Whether I'd be left with a whole where the battery was charging or would the charging element power source take over.
    Now I'll be able to power the RPi2 and actuators until the batteries wear out. This is a much safer method than just wiring together 2 balanced 12 volt SLA batteries.

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

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      So glad it helped you Thad, that's great news!

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

      @Thad oviatt, seems good solution, can you please share more detail or demo of your solution? That would be helpful

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

    Hi Ralph, nice video! Can you give me your opinion? I'm trying to build UPS with same design as yours, except I want to use two 18650 3.7V batteries in parallel. I've seen some people saying connecting many batteries in parallel directly would cause problems and recommends using TP4056 for each battery then connect the output in parallel. But if I were to use just two batteries with exactly same model, do you think I can still use a single TP4056 for both batteries parallel without problem? thanks.

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

      Ah ha! I see the (potential) problem. Even if the two batteries are as identical as you can make them, the chances are they will charge at different rates (or might do so in the future). This means that one battery would either become over-charged or the other under-charged. This is why, in the case of (for example) cordless vacuum cleaners, each 18650 battery is monitored and charged separately. You _might_ get away with it, although frankly I'd use a charging module that allows more than one battery to be _independently_ monitored or use two TP4056s. I hope this helps (even if it's not the answer you were hoping for).

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

      @@RalphBacon This answer definitely helps. Thank you so much for clear explanation!

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

    how much big (as in battery capacity big Ah) battery can i charge with this tp4056

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

      You need to look at the datasheet for this sort of information, I'm afraid.

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

    Hello! Thanks for sharing.
    Im working on a PCB design with this module.
    But I have a question
    It says on the datasheet to discomnect the load when charging. Can you tell me how to do it? And why we have to do that? Is thst really needed? Thank you!

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

      From what I can remember it got a bit confused if the load was still attached - it didn't seem to know whether the cell was drawing current or the load (hazy memory). If you do need to disconnect the load whilst charging, though, feed the voltage via a relay, controlled by the Arduino (or whatever you're using) so when it detects that the cell is being charged it will switch off the load (and vice versa). Good question, thanks for posting.

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

      Ralph S Bacon Thanks a lot!

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

      Yes, a mosfet is usually used as a switch. The gate of the mosfet is usually connected to the normal supply to keep the p channel mosfet off when supply is present. Also there is a resistor to from gate to ground for discharging the gate. There is also a diode between the normal supply and source of the mosfet. It is forward biased when the supply is present and reverse biased when the supply is not present. The battery connects to the drain of the P channel mosfet. Hopefully you have got your circuit to work by this time as a year has passed since this comment.

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

    Ralph, you have got to change the charge rate resistor on the module to use it with that battery. What you have shown is distinctly NOT safe. You are horribly abusing that battery and it will eventually burst into flames. The max safe charge rate for normal lipo batteries is 1C, you are charging it at 10C. You need to reduce the charge rate down to a max of 100mA. Please add a warning to this video before someone has a nasty accident.

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

      Before I press the PANIC button, Andrew, which circuit are you referring to? The one underneath my video description or another. Whilst you clarify, I've looked at the TP4056 module again and and can confirm that the whole point of the module is that you just connect the battery *directly* to the board - hence my confusion over your concern. I've used the module with a tiny LiPo battery for some months (on and off) now and there's been no noticeable degradation nor temperature increase in the battery whilst "on charge". Let me know the details exactly where your concern is and I'll take a look.

    • @andreweastland9634
      @andreweastland9634 7 ปีที่แล้ว

      Hi Ralph, All of those modules using the TP4056 chip are delivered with a 1.2K resistor connected between pin 2 (prog) and ground. This sets the charge current at 1000mA. The battery you are using is rated at 100mAh, the maximum safe charge current for a 100mAh battery is 100mA ie 1C. As you have it configured you are charging that battery at 1000mA which is 10 times it's safe maximum charge rate. If you take a look at the TP4056 datasheet there is a table listing RPROG resistor values to set various charge rates. The minimum charge rate listed uses 10k which is for a 130mA rate, which is still theoretically too high, but will probably be ok. You could try a higher value resistor but it may be that your battery is just too small for the 4056.
      What you are doing is basically what Sony, Apple etc were doing which is why their LiPo batteries were bursting into flames. You may be lucky so far and have a particularly robust battery, but someone else following this will not be so lucky.

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

      OK, Andrew, this is what I have discovered. This really only applies to *tiny capacity batteries* like the one I was using in my demo. The (allegedly, marked as) 3000mA LiPo battery I otherwise use should have no issues. So...
      So, I checked the charge current on my little 100mAh battery and it charged (initially) at 500mA but dropped in a more-or-less linear fashion to 180mA as the battery voltage rose towards 4V. This is still quite a charge for a little battery like this although it remained cool to the touch throughout.
      So I removed the surface mount 1K2 resistor to pin 2 (marked as R3 on the board I was using) and replaced it with a 10K. After discharging the battery a bit, I reconnected the charger and the battery then charged at 120mA (which is 1.2C, far safer & acceptable) until the battery voltage reached about 4.15V at which point it started reducing, which it still is doing as the experiment is still running. I expect it to reduce further (now at 50mA) and switch off the charging current in about 30 minutes.
      [UPDATE: charging completed, charge current now zero. Final battery voltage 4.17V]
      Now, all those drone flyers wanting to charge their monster batteries quickly in the field will have no problems charging their umpteen thousand mA/h batteries at the default of (up to) 1000mA (1A). But those with smaller capacity batteries (like mine) would do well to replace the 1K2 R3 (or whatever resistor goes to pin 2) and put in a more suitable one. The spec sheet gives a chart. If in doubt use 1K2 which limits the charge current to 120mA with my battery (spec sheet states 130mA).
      I *might* do a mini-update, interim video on this, as Andrew is quite right to point out the issues that Samsung, Sony et al have had with charging batteries too quickly (especially as we are not monitoring battery temperature on this board, although the chip supports it).
      Thank you, Andrew, for your observations and bringing this to our attention. :)

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

      Absolutely spot on Ralph. LiPo batteries have had a lot of bad press which is not really deserved. If you treat them properly then they are a great advance over the older battery technologies. I also fly model aircraft and quads and have been using LiPo batteries of all sizes without problem for a few years now. They are fine if treated correctly but will bite back if you abuse them, this is why it is important to use something like the TP4056 charge controller when charging. To be clear about the details, this issue only applies to batteries (cells?) of less than 1000mAh capacity, anything bigger is fine with the stock 4056 board. Thanks for the great videos, keep em coming pls.

  • @69danielei
    @69danielei 8 ปีที่แล้ว +1

    Regarding the last piece of the video when everything is charged up and battery is being connected and disconnected all the time, don't you think it will eventually kill the battery ?

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

      +daniel ei
      Well, I see what you mean, but I think the charging module was getting a bit confused about the load current vs the battery charging state. When no load was attached it charged normally then the blue light went on and it stayed like that. It's only when a load is connected does it flip between red (charging - but is it really, or just supplying current to the load?) and blue (charged up).
      I guess it *might* have an effect, long term, on the battery but I'm happy to install it, as it stands. I just need to find a project to do so.

    • @69danielei
      @69danielei 8 ปีที่แล้ว +1

      see what you mean, ordered 10 for $4, I have a few raspberry pi, 2 of the SD corrupted due to power loss, this could be a savior for me:-) thanks !

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

      @@RalphBacon is there any solution that works like, upper and lower limit for battery charging. Example, mains supply will only charge battery if voltage falls below lower limit(4.2 V) reached.
      Waiting for your reply.

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

    Ralph S Bacon is there any solution that works like, upper and lower limit for battery charging. Example, mains supply will only charge battery if voltage falls below lower limit(4.2 V) reached.
    Waiting for your reply.

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

      There are several modules that so all this for you, Kevin. Just plug the module (with LiPo, such as an 18650) into 5v (eg phone charger) and it will keep it charged within the limits you mention whilst producing either 3v3 or 5v. Look at the start of video #115. I'm using that battery pack all the time for my experiments and it works very well indeed. Any good?

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

    I forget where I ran across the reference to them, but I did acquire some of those modules a while back. Then I stripped a few laptop batteries of their 18650 cells, and found out which ones were still good (most of them). I haven't got a specific project in mind just this minute, except for maybe DIY power banks? I not only got those modules, but also some cell holders and such. I've also got some no-longer-used bluetooth headsets, and am thinking about scavenging the batteries out of those (which will probably need me to change the resistor as noted), but it allows for all sorts of possibilities. Those little modules are neat! :-)

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

      Yes, agreed, the modules are very clever in keeping things running for quite a while if the (mains) power is removed. It sounds like you have all the bits you need to try this out!

  • @daveh7914
    @daveh7914 8 ปีที่แล้ว

    A friend experienced problems with his Raspberry Pi project using one of a batch of Boost modules I had purchased recently - same specification and physically looked the same module as in the video. - different supplier though (and 5 for £1.30).
    Out of interest I did some quick regulation tests:
    With an Arduino Uno (load current approx 52 mA) reducing input 4.0V, 3.0V, 2.0V from a bench supply, output voltages were 4.94V, 4.91V, 4.7V.
    Increasing the load to 104mA, output voltages were 4.86V, 4.73V, 4.38V (I forgot to measure at 2.4V input - sorry).
    So probably still OK. With increased loads though it would be worth "keeping an eye" on the o/p volts at low input voltages.
    Still - a very useful module (and some modules may be better than others?)
    The advertised maximum load was 500mA (fantasy-land figures ! )
    Regards
    Dave

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

      +Dave H
      Interesting results you got there with those output voltages; in some ways a tad disappointing (I would hope for closer to the 5V mark with that sort of light load) but then again, it's quite amazing it does it at all (especially at 5 units for £1.30 - unbelievable).
      I think your experiments and my experiences of these modules is that they are useful and can make all the difference as to whether you get corrupted data (eg. when using an SD card) - and if the project is THAT important, then as you say, it might be better to pay a bit more for a 'better' device that delivers more consistent output voltages for a wider range of input voltages and/or higher current rating. I tend to work at bargain basement prices though!
      I'm definitely keen to implement my unit with the Li-Ion battery etc, just need a project that really demands it. Something will turn up, it always does.
      Thanks for much for posting that information, it's really useful not just for me but for everyone reading this thread (and my readership is climbing so the value of this information goes up too!).

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

    ok, great idea. let me ask you one thing, what´s happens when you 5 volt source for the battery charger is the same that you use for the arduino, the battery will reself power in? if it is plugged to the wall and lights goes out?

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

      I can't remember exactly, this is quite an old video. I'm pretty sure the power in will power both the Arduino _and_ the battery, if it needs charging.

  • @daveh7914
    @daveh7914 8 ปีที่แล้ว

    On the subject of Li-On battery charging: Whereas some battery suppliers say "Can be charged at 5C or 10C or whatever I feel they do this so that RC enthusiasts happily get their models back in the air, on the water, on the track asap. So whilst they CAN be charged at those rates, long-term battery life may be reduced. This was confirmed by the battery section at my last place of work , and who suggested 1C or less for long life. Certainly, repeatedly charging a 100mAh battery from fully discharged at 1 amp (10C) seems a bit brutal. For the UPS application demonstrated it is likely to be mostly on a trickle charge so this shouldn't be an issue.
    The charging rate can be reduced by increasing the value of R3 on the module (the TP4056 datasheet has a table of (Rprog) resistor values for different charging currents). I've reduced the current on my existing two modules and tolerate the longer charging times.
    Great video as always Ralph - and I've now got some of the boost modules on order!
    Dave

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

      +Dave H
      Yes, there certainly is a worry that rapidly charging over the 0.8 - 1C rate may reduce lifespan - but then again, reduced by how much, compared with waiting in a field waiting for the battery to recharge! Batteries are moderately priced so I'm sort of guessing users may accept a shorter life for more convenience? The other thing is that some battery manufacturers claim that it's better (less stressful) if you don't charge to full - about 80% of max seems 'ideal' but, of course, gives a reduced run-time. If you use the battery immediately, I'm thinking no real harm will befall it. But don't charge it up to bursting point and then stick it in a drawer 'ready for next time'!
      Interesting point you make about adjusting that resistor - pity it's not a programmable charge-rate, really. But manufacturers are trying to get a discharged battery charged up in minutes (think electric cars) so the technology is moving forwards.
      Gosh, what a long reply! But so interesting to discuss with a like-minded Arduinite! Thanks for posting, others will read it too and think about your comments - only they can decide what is most important to them, of course.

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

    Hey man nice vid. I wanted to ask if I can power a servo by the powerbank by using a usb breakout on the powerbank cable.

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

      You can get dual USB cables (2 x sockets from one plug) so you can take two supplies from it (is that what you mean?) rather than a breakout.

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

    Thank you great little video. I have subscribed and will watch your other videos.

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

      You are most welcome David Hadley, I'm glad you like the video. Nice to hear from you and thanks for the sub. You are now an official Arduinite! Welcome!

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

    Really thanks, you saved me with this circuit

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

      Glad to hear that!

  • @andreweastland9634
    @andreweastland9634 7 ปีที่แล้ว

    Hi Ralph, as an alternative you may also like to look at running this project without the USB step up converter. It is not needed. The 328p will happily run at voltages down to below the TP4056 module cut off voltage, so you can just feed the module output voltage directly to the 5V pin on the Arduino. The USB chip may not run depending on what chip is used, but it doesn't matter because to use it for comms you need to connect a USB cable which immediately restores full 5V power. Of course there may be other peripherals connected which do require the full 5V in which case keep it as is.

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

      It's certainly an idea Andrew, although I am unsure how stable it would all be. And what about the analog inputs which require a 5.x reference voltage? It certainly might work just fine in some projects, I will have to test this out and see what happens as the voltage drop. Thanks for intriguing me (again - you are giving me lots of work), good to hear from you.

    • @andreweastland9634
      @andreweastland9634 7 ปีที่แล้ว

      Hi Ralph, I am already doing this with a couple of projects, it works fine although to be fair I don't use a full uno board, normally I just use a bare 328p chip with a resonator. One of these projects uses an analogue input and it works fine so long as you use the same VCC as your reference. As VCC drops so does the analogue input so it still works out correctly.
      As an experiment try connecting your unos 5v pin to your bench psu and then turn it down until you reach below the TP4056 cut off voltage...

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

      That's a good way to test this and I will! I shall have to re-read the 328P spec sheet to see what the official voltage range is too. Thanks for the suggestion Andrew.

  • @daveh7914
    @daveh7914 8 ปีที่แล้ว

    Just to follow on from Daniel's comment about corrupted SD cards. When the voltage of the Li-Ion battery gets to the minimum input of the boost board (0.9v), the output of the board drops from 5V to 0V instantly. So if the device - Arduino/Raspberry Pi etc , is writing to removable media (SD card etc), it is almost certain that the FAT (index) on the media will get corrupted and all files will be inaccessible. It will need to be re-formatted.
    Don't ask me how I know :( !
    A nice touch, in addition to a general alert that the main input supply has failed, would be to monitor the back-up battery voltage and , if it drops close to 0.9V, to trigger a 'gentle' shut-down for the Arduino.

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

      +Dave H
      Dave thanks for sharing. What you say is true about the voltage dropping off the edge of a cliff.
      Just a couple of things to bear in mind here. The Battery Charger module (not the step-up booster) I'm using here won't let the Li-Ion battery get anywhere near 0.9v, that's fatally low and it may never recover. It will cut it off at about 2.4v or thereabouts.
      And the idea is that the Arduino senses (via pin 8 in my demo) that the 5v supply has failed and should take the appropriate action to save / close files and not do further logging until it has been restored. In effect, although the battery could last for ages (dependent on the current consumed by the entire circuit) it should be treated as a safety net and just used to ensure things like SD cards don't get corrupted.
      Of course, if you have tested your project and know, for example, that it can run safely for 30 minutes on battery power, then your code logic can take this into account and only finally stop logging (or whatever) at the last possible moment.
      This is certainly a fascinating subject and I still intend to build in the Li-Ion battery and all the other gubbins into a future project that requires it (eg, one that has SD card logging, for example).
      Once again, thanks so much for posting here and getting everybody thinking about things like this.

    • @daveh7914
      @daveh7914 8 ปีที่แล้ว

      Hi Ralph,
      I may be a bit 'off track' here but if there is no input to the charger, the boost board (and battery) will continue to power the Arduino until it is flat? So, in that case the safe route would be that the input to pin 8 should always do a 'gentle' power down.
      Dave

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

      +Dave H
      Hi Dave! What happens is that the Li-Ion TP4056 charger disconnects the battery electronically once it has determined that the minimum safe level on the battery (2.4V-ish) has been reached. The battery's negative terminal is not connected directly to the circuit, only via the charger module.
      Whilst you could do some sort of Arduino power down before that happens, I wouldn't do that. I'd close all files etc then go into a loop until power was restored (by checking pin 8 every so often, perhaps flashing some sort of alarm LED whilst doing so). If the files on the SD card have all been saved and closed then, should the power (from the battery) fail, no harm will come to the SD card at all. It's no different to switching off the power via a switch at that point really, except it's the charger module doing it for you.
      Does this all make sense?

    • @daveh7914
      @daveh7914 8 ปีที่แล้ว

      All understood. For some reason I overlooked the disconnect at 2.4V part of the video, and your comments re. closing files and supply monitoring before that time are taken 'on board'
      Cheers.
      Dave

  • @sergioarielfernandez8217
    @sergioarielfernandez8217 7 ปีที่แล้ว

    Hi Ralph, this video is great!!!! thanks a lot for share your knoledge. Can you give me an opinion¿? I want to use the tp4056 with a li-ion battery, to be the UPS from a datalogger based on a ESP8266. That is allways with the power supply connected, the battery is only for the moments that the power supply turns off. So my concern is if there is any problem to have the TP4056 and the battery t long times plugged with the principal power supplay? I'm from Argentina so, i'm sorry about my basic english. Thank you very mutch!

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

      Hola Sergio, y tu Ingles es estupendo! You can connect the battery for long periods (forever) as the charger will stop charging the battery once it reaches 4.2v. Note: If your battery's capacity is less than 1000mAh (1Ah) you will need to remove one of the resistors and put in a higher value one to prevent over charging - see the comments in this video from others and my reply to find out how / if you need this.

    • @sergioarielfernandez8217
      @sergioarielfernandez8217 7 ปีที่แล้ว

      thank you Ralph. I saw the other comment. And I asked Pedro, if he trieded it. My concern is that, as you show in the video, when the charge is complete, the circuit start consumming from the battery, not from the power supply, so after few seconds de battery charge falls a bit, so start chargging again. That behavior is not bad for the battery life? or it is the correct thing?
      Thank . you again for your time.
      Best regards

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

      I understand your concerns, Sergio. But if you think about it, why would the battery supply current when it is at a lower voltage than the supply (charging) voltage? I think the input supply (not battery) will supply the current for the circuit. Maybe the battery voltage does fall a little over time (nominal 3.7v) and then gets "topped up" - no harm will be done (think of how your phone charges up). That's my general feeling on this. Does this help you?

    • @sergioarielfernandez8217
      @sergioarielfernandez8217 7 ปีที่แล้ว +2

      Ralph, yes, this helps. I will do it this way and see what happend, I thought the same you said about de current, but i think that also depends on how thas the TP4056 charger manages the current when the battery is full charged. I keep doing tests, thank you again.
      Best reggards.

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

    Why did you not change the resistor R3 to adjust the milliamp output. To the Lipo?

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

      Yes, I think this is mentioned in another comment too, Bill, I most certainly should have done that. My bad, as we Brits never say. Thanks for posting, good to hear from you.

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

      I do like your videos. I am working on your coffee cup holder.

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

      And I'm still using it, Bill! Still working, never had to amend the code or anything. Yes, I'm as surprised as you are!

  • @maxximumb
    @maxximumb 8 ปีที่แล้ว

    Ralph, great video, but PLEASE get a non conductive pointer. I was wincing each time you got close to the circuit. You could just use a cheap chop stick after giving it a whiz in a pencil sharpener.

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

      +Maxx B
      I must admit to laughing out loud when I imagined you cringing expecting sparks to fly any second! But your suggestion is superb - I'll certainly do something (I wanted to do better than a ballpoint, a pencil or my fat finger and the letter opener seemed ideal). Watch the next video to see if I manage it (UK Bank Holiday not withstanding) :)

    • @maxximumb
      @maxximumb 8 ปีที่แล้ว

      I forgot about the bank holiday.

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

      I've ordered something - will it arrive for the next video? Possibly the one after that... we shall see.

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

      Phew, I can sleep at night now!

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

    Thank you for another great video

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

      Thanks for watching!

  • @squalazzo
    @squalazzo 8 ปีที่แล้ว

    great! could you please add to description the links to the modules you used? thanks!

    • @squalazzo
      @squalazzo 8 ปีที่แล้ว

      and a little schematic, if you can... thanks :)

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

      Hello! I've now added links to the modules I used (although the seller for one of them no longer lists it). Great that you're finding this useful. Thanks for posting.

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

      This will have to wait until I get home over the weekend, I'm afraid. Remember that the video does contain a schematic of sorts so try that whilst you are waiting for me to upload!

    • @squalazzo
      @squalazzo 8 ปีที่แล้ว

      no problem, thanks, very kind :)

    • @squalazzo
      @squalazzo 8 ปีที่แล้ว

      hi, any update? thanks in advance :)