Nice one Ralph, made me think for a minute till I realized the caps poles did not reverse, then it all fell sort of into place.
@RalphBacon
5 жыл бұрын
Yes, exactly, I suppose I should have emphasised that, George! Otherwise it would not last very long.
@BarefootBeekeeper
5 жыл бұрын
Brilliant! One to bear in mind for future reference.
@RalphBacon
5 жыл бұрын
Indeed, Phil, that's why I did this video, something to file in that part of your brain marked "For Future Reference"!
@ytytiuiu2590
3 жыл бұрын
This channel is way underrated .
@RalphBacon
3 жыл бұрын
Agreed!
@jwcolby54
5 жыл бұрын
You are the man Ralph. I love this diode pump thing.
@RalphBacon
5 жыл бұрын
Glad you like it John, pretty easy to use and understand, isn't it?
@MartinBgelund
5 жыл бұрын
Marvellous trick for getting a higher voltage!
@lezbriddon
5 жыл бұрын
if you keep adding more diodes and more caps you can get thousands of volts and run a tv tube.... just like they always have....
@MartinBgelund
5 жыл бұрын
That seems rather cumbersome. Just feed the higher voltage on the output side back into the input side. Then you'll have a loop that will spiral the voltage up to infinity. And then you can put a buck converter in parallel on the output side to take out the voltage you need, eg 12 volts.
@RalphBacon
5 жыл бұрын
If we do that can we then remove the power supply itself and have a perpetual motion circuit?
@MartinBgelund
5 жыл бұрын
Man, Ralph, why did you have to mention perpetual motion? Now a lot of "free energy with this perpetual machine" videos are popping up in my KZitem feed :-)
@whitefields5595
5 жыл бұрын
Ralph, the further you are from mains voltages the less anxious I become. While this is a well understood principle you present it well. Going back-to-basics is always a good thing to keep us all grounded (or do I mean earthed? ;)) More of these ‘energy harvesting’ things please!
@RalphBacon
5 жыл бұрын
OMG! A pun from you Whitefields! Wow! You must have really liked this simple video! I haven't mentioned mains electricity in a while (I couldn't face causing you more stress) but maybe I should revisit mains relays, mains SSRs, and my isolating transformer... just kidding, we'll leave that for when you least expect it! Thanks for posting. Good to hear from you as always.
@willofirony
5 жыл бұрын
Well. Benny, we're not in Kansas anymore!!! Awesome, absolutely awesome. Thank you for that video, Ralph. One application of this technique that springs to mind : a flashing LED to warn of low voltage. It could be improved with "port Addressing" and ExOr-ing the bits for the pump pins, this would result in the switching of the two pins instantly . Thus removing the , admittedly extremely short , time when both pins are high or low. I understand that this video was focusing on the diode pump circuit, so you were correct in avoiding muddying the waters with the additional complication of port addressing. Thanks again.
@RalphBacon
5 жыл бұрын
Awesome, you say, Michael! Wow! It's pretty simple though, don't you think. A slight change to a standard Diode Pump because we have an MCU that replaces the clocking we need. But I most certainly appreciate your kind words (Benny too!). Your summised correctly why I didn't do port addressing, which would have had the advantage you said. But, beginners seeing that would be confused whereas a simple digitalWrite is understood by everyone. Thanks for posting. Good to hear from you.
@gavinsmalley1513
5 жыл бұрын
You could achieve the same without port addressing simply by setting one of the pics to input mode (high impedance) before you flip them. That would also prevent a short without complicating the code.
@Hasitier
5 жыл бұрын
Nice idea to solve that Ralph. First I thought you would use the well known joule thief but this would need a transistor and a specially wound coil. If you have a microcontroller (or anything that produces an oscillating frequency like a 555) already in the circuit your way is much easier. I like that kind of video where you show such simple solutions to reoccurring problems.
@RalphBacon
5 жыл бұрын
Yes, Michael, that's why this particular method is so useful; if you already have an underutilized MCU then 3 components can get you a bright flashing LED from most battery-powered projects. Possibly a louder piezo too but I haven't tested that (yet). Good to hear from you.
@TheUnofficialMaker
5 жыл бұрын
you come up with the coolest project ideas! Well done.
@RalphBacon
5 жыл бұрын
You are very kind with your opinion of my projects, but it really is just a bit of simple physics - but still oh-so-very-useful to us Arduinites!
@vladhristov2316
5 жыл бұрын
Haha, that was funny. "Interestingly you asked"(13:54), I didn't ask. It is your briliant mind, who did it, man. Thank you for the video. I just needed that type of lesson for my circuit board.
@RalphBacon
5 жыл бұрын
Benny can read minds too, Vlad, and he told me you were thinking of this question, even though you didn't know you were.
@ronen124
5 жыл бұрын
That's a quality content Ralph this voltage multiplier can be achieved with the NE555 (low voltage version) or maybe even with passive components design only.. Please tell your boss (Benny) to give you a raise in salary starting next month 👍
@RalphBacon
5 жыл бұрын
I told Benny about the salary raise but he just purred and turned over to have his tummy rubbed. Sigh. Yes, a 555 timer will do this but you might as well use a single PWM pin in that case from the MCU! Thanks for posting, Ronen, good to hear from you.
@pfeerick
5 жыл бұрын
Very nice video Ralph... I'd always been intrigued by these voltage doubleer circuits, but they seemed like black magic of sorts... now I might be tempted to use it in a few low voltage projects! Thank you for the great explaination! :)
@RalphBacon
5 жыл бұрын
This one is great for lighting LEDs (for drawing attention) but for more current capability a buck-boost _might_ be a better bet.
@pfeerick
5 жыл бұрын
So perhaps not good for driving a NRF24? Damn! 😂😂
@electronicdiy3738
5 жыл бұрын
Great video about a quite voltage doubler circuit (if neglecting diode schottkey drop voltage), the circuit can get improved by a mirror circuit which drives the load alternatively in collaboration with the first. If choosing a proper frequency and adjusting the duty cycle, it will help to stabilize the output power. A prototype powering LED bulbs is a synonym to an economical application ...
@RalphBacon
5 жыл бұрын
I'm also wondering if it would increase the volume of some buzzers I have - some are magnetic but some just standard piezo so a nice pulse train of 2kHz might be louder than the standard voltage (whether that is 1.8v or 3v3v).
@electronicdiy3738
5 жыл бұрын
@@RalphBacon Yes large creations begin with small idea then grows such a seed germinating underground and transforms into a tree full of fruits. Since voltage range of piezoelectric transducers is 3V to 30V and optimal resonance frequency is 1kHz up to 5kHz, 3,3V that generates the circuit is a convenient supply voltage, also placing a piezoelectric buzzer as load with the mirror circuit would generates a quadruple power.Waiting to post a video about this project I wish you success.
@tabmaryland2333
5 жыл бұрын
"Back in the day" we used an LM3930 chip to do this job. Probably not quite as flexible, and you need another chip. Good Job Benny!
@RalphBacon
5 жыл бұрын
I'll see your LM3930 and raise you an LMC7660 - a charge pump, but it seems awfully complicated in today's world of simple and tiny Buck-Boost modules - and, like you say, yet another component.
@chiparooo
3 жыл бұрын
Very interesting. I think I can use this in one of my projects. Thanks for explaining and sharing!
@RalphBacon
3 жыл бұрын
Go for it!
@pileofstuff
5 жыл бұрын
You can stack this circuit many times to get a larger final voltage. It's a classic voltage multiplier that got quite a bit of use for high voltage low current supplies in tube (valve) circuits back in my younger days
@RalphBacon
5 жыл бұрын
Yes, they used (a variant of) this method to get the 10kV+ for the old cathode ray tubes that my grandad told me about.
@pileofstuff
5 жыл бұрын
@@RalphBacon your granddad... Now I feel old...
@GnuReligion
5 жыл бұрын
@@pileofstuff Did not know you ventured over here! My obsessive project for the last couple of years involves toggling Mosfet gates from a completely isolated control source. Have built up numerous multiplier circuits and their variants, to create a charge reservoir. I found challenging just to get a few mA (LED lighting) at 12V (3x) when using cheap, common ceramic 0.1uF caps. Helps to bump the PWM clock (and ~clock) to 100khz+. The wikipedia page shows high voltage designs, like the Cockcroft-Walton multiplier (have not made this one). Never personally made it over 55V because that is the point my ordinary caps bleed through, using the Dickson Charge Pump. en.wikipedia.org/wiki/File:Dickson_voltage_multiplier.svg If you want the AVR hardware PWM to run fast, need to look up which timer the pin uses, then set something like: "TCCR1B = TCCR1B & B11111000 | B00000001;" for D9/D10 -- to run at 31khz. Of course, you may need a line driver at some point if you enjoy this game.
@Nono-hk3is
5 жыл бұрын
Interesting coincidence. This week I used a variation of this circuit to generate *negative* voltage. Last week I was trying to use a P-channel MOSFET to switch power on the high side of a load. The MOSFETs that I had have a Gate to Source threshold Vgs(th) of -5V, and my circuit was running at 5V, so I thought I was all set. I'd pull the Gate to 5V to turn off the current flow, then pull it to 0V to enable current. It worked, but it wasn't allowing very much current... about a tenth of what the load typically drew at 5V. After some research, I learned that the Vgs(th) is just that, a threshold. It it doesn't mean the MOSFET is in saturation, so it basically was only open a little bit. If my circuit were designed for 12V this probably would have been the perfect MOSFET for the job. So I ordered some MOSFETs with a Vgs(th) value of 2V. (Which today I confirmed are perfect for my 5V circuit.) While waiting for those to arrive, I got antsy to see my if my project would work. So I found a circuit for a Negative Voltage Generator, which looks a lot like the one in this video, only with the diodes turned around. (I'm sure there are other changes but I don't have the circuit on hand to compare.) I used a 555 timer rather than an MCU, and an additional polarized capacitor placed across the new negative rail and ground for smoothing, *with the positive lead of the cap connected to ground*. The 555 was a little under 5V peak to peak, and I used standard diodes rather than schottkys, so the result was about -3.3V on my new negative rail. With 5V at the Source and -3.3V at the Gate, I was able to open up the P-channel MOSFET completely and get the expected current to my load. The correct MOSFETs arrived, and they work just fine using 0V at their gate. So I took the negative voltage components and put them on their own prototype PCB, which I will keep for future reference.
@RalphBacon
5 жыл бұрын
Sounds like you had a bit of fun! Negative voltage supplies are indeed just variants of the overall voltage doubling technique. But using a P-channel MOSFET in the VCC supply to a circuit is a well established technique. You MUST use TTL-level (5v) Gate MOSFETs though (like an NDP6020P), or, as you discovered, they only turn on a bit and get hot too. Connecting the gate to VCC with a 100K resistor is enough to ensure it has truly switched off. Bringing the Gate to GND will switch it on (usually via another N-channel MOSFET but a BJT will work too). Look at some of my videos on this subject, including the auto switch off project. kzitem.info/news/bejne/yGeoyH19a3SAY4o
@jimtron66
5 жыл бұрын
I immediately thought "Joule thief" as a solution but this circuit seems so more civilised.
@shermluge
5 жыл бұрын
Same here or an 805 chip (same thing..)
@RalphBacon
5 жыл бұрын
That's why I did this video, it's simple and just requires 3 components.
@JerryEricsson
5 жыл бұрын
The joule thief can now be made the size of a dime (well smaller, the size of a AA cell Top) using SMD inductor's, 2 of the little guys will easily replace the coil, no more winding and that sort of thing unless you are into making your own. I have tried it, found some inductor's on an old board that I was stripping for parts, tied it to a SMD transistor and SMD LED, and the size is, well micro and it does the same job as it's grandfather which was introduced to the world by our friend Big Clive sitting in his little lab on the Isle of Man.
@RalphBacon
5 жыл бұрын
What are the values of the inductors you used, Jerry. Simple µH chokes or something more chunky?
@JerryEricsson
4 жыл бұрын
@@RalphBacon I have tried a tiny bead with fine wire, of course that was a pain to make, but it worked, I have seen them now done with SMD inductors that are much smaller. The one I make at home are usually using torrid's with wrapped magnet wire.
@JerryEricsson
4 жыл бұрын
@@RalphBacon Oh, check out Big Clive's video on building these circuits he makes some neat ones and very small indeed.
@schluderjupp
5 жыл бұрын
Hi Ralph, really cool! I was thinking; why not add a capacitor parallel to the led? That is what they do with those color changing solar garden lights. That should keep the voltage steadier on the led and eliminate the flicker on camera. Another variation might be to drive the led with a solar led controller. A QX5252F (or similar) and a Inductor should be enough to drive the led from just one digital pin. Thanks again for another interesting video. Please keep them coming. 😃
@RalphBacon
5 жыл бұрын
There's probably lots of things we can do here, including driving the circuit from a clocked output instead of switching pins, but hey, where's the fun in that! Glad you liked it and Thanks for posting.
@superdau
5 жыл бұрын
Have you measured the peak current going into the cap? I'm not really chuffed about connecting a cap to a µC's output pins without a resistor. Kind of bad practice. The larger the capacity of the cap the more of a "short" it becomes when switching. I've way too often seen people misinterpret the datasheet's "max pin current: 40mA" as "current is limited to 40mA" and not as the correct "YOU have to make sure the current is limited to 40mA". So it can't be stated often enough in my opinion that you should always use a resistor. If you don't have a µC or pins to spare, I've built a voltage doubler (or inverter, which is almost identical) like that a few times using a 555 (use the CMOS version, which has kind of a rail-to-rail capability at the output, otherwise you lose another volt or two). Maybe not the most efficient for battery powered devices, but definitely one of the more robust and easiest to build ones.
@RalphBacon
5 жыл бұрын
I haven't, although I mentioned that there was (probably) a tiny surge in current as it charges that capacitor up. I don't believe for one moment that it would dump 40mA in that capacitor though. The Schottky diode and capacitor have some effective series resistance - whether it's going to be enough I haven't checked.
@avejst
5 жыл бұрын
Neat trick :-) Been used in DC/DC converters, since the MAX232, with analogs switches that is. Your circuit is less complicated. What is the current draw with an Amp. meter? Thanks for sharing :-)
@RalphBacon
5 жыл бұрын
I didn't measure the current accurately, Asger, but my PSU didn't even register 1mA. But the charge pulse is quick so it probably missed it. Mind you, even when it was (almost) permanently lit it still didn't register so I'm guessing that it must be low. Good question, sorry I couldn't be more precise. Thanks for posting.
@Steven_Bennett_YT
5 жыл бұрын
I agree with Alex, one output and the same 2 shottky diodes and a cap can produce 2 x 1.8 - 2(0.3) = 3v pules; using two outputs and 4 diodes and 2 caps can get you about 6v.
@RalphBacon
5 жыл бұрын
But at a reduced current, conservation of energy and all that jazz.
@eugenevladoff2758
5 жыл бұрын
Thank You, Ralph, it's very interesting!
@RalphBacon
5 жыл бұрын
I'm glad you found it interesting, Evgeny, thanks for posting.
@azyfloof
5 жыл бұрын
Looks like a single stage Cockroft Walton multiplier, but slightly different topology. Could be interesting to build one of them with several stages and see what sort of voltages you can get out of it :D
@RalphBacon
5 жыл бұрын
Off you go then, Azy, see what you get and report back here, please! It's certainly related to a Cockroft Walton multiplier, and as you know that, you know that we can triple or quadruple the voltage by a series of diodes and capacitors. But these days buck-boost modules have probably replaced them in that role.
@loptica62
5 жыл бұрын
pure genius....! I used to mess oround with Jule thiefs but this... this is great! I have a question though how do you get the arduino to work with 1.8V.... isn't the minimum 5V...
@simonmerrett
5 жыл бұрын
If you run it at a lower clock speed (say 1MHz) it is rated to run down to 1.8V.
@RalphBacon
5 жыл бұрын
Not genius, pure or otherwise, I'm afraid, just a simple demo of the laws of physics. The chip inside an Arduino board is the ATMega328P and runs from 1.8v (at reduced frequency, 1MHz, possibly 8MHz like mine in this demo) up to 5v and the full 16MHz. I chose 1.8v to show how low-powered battery projects could still light an LED even when running from such a tiny voltage. Glad you liked it! Thanks for posting.
@jimhough6233
5 жыл бұрын
Science and physics, man!
@RalphBacon
5 жыл бұрын
They do seem to go together rather well, hey, Jim?
@ricka1939
4 жыл бұрын
Ralph, I may have missed it in your explanation, but I am not clear on what causes the capacitor to discharge. Can you please expand on that? Thanks
@RalphBacon
4 жыл бұрын
The capacitor discharges (via the LED) because the "other end - cathode" of the LED is now at ground potential. We brought that GPIO pin LOW (aka GND) and the other pin HIGH to boost the voltage on the cap to about 3v. There is an electrical circuit to ensure the cap is fully in-circuit.
@oncledan282
5 жыл бұрын
Good day, Ralph! Great vidéo as always, my Friend. It reminds me of that simple old voltage doubler/tripler/quadrupler/.. we use to study while I was in technical school. One just can't beat simple old ways to do things, can they? Nowadays, there is a simple step-up module I have here. « T64 » DC-DC Converter that will boost any voltage (as low as 1,5V), to nominal 5V DC. They come in a path of 10 and are panelized 2 x 5. Have a great day, and say Hello to Benny on my behalf.
@RalphBacon
5 жыл бұрын
Benny says Back At Ya! Yes, a simple buck-boost module would be useful for most things except a flashing LED I suspect. But at least this is simple and cheap, although it does require two pins of your MCU.
@MikesAllotment
5 жыл бұрын
Thanks for the great videos Ralph - thanks to your videos I now have a bare-bones atmega328p running at 8Mhz internal clock in deep-sleep mode powered from a single 3v CR2032 button cell using just ~2 micro-amps until it wakes up. I've also hooked up a 128x32 OLED display which only gets powered up when the atmega328p wakes up from deep-sleep and it all works absolutely fine from a single 3v CR2032 button cell. Happy days. HOWEVER, when the cell voltage drops to 2.9v the OLED display stops working even though the atmega328p is still chugging away quite happily (happy to run all the way down to 1.8v). Min voltage for the OLED display seems to be 3v. Can you think of any way to use this kind of charge pump to increase the voltage to power the I2C OLED display? If I could double the voltage, then even when the cell voltage drops to 1.8v the charge pump would double it to 3.6v-drop across the diodes - so ~3v - which should still be enough to drive the OLED. The problem I can see is that this is a 'pulsed' voltage pump, and I'm not sure I2C will like that? Any thoughts?
@RalphBacon
5 жыл бұрын
Congratulations on getting this far, Mike! That's quite an achievement. Now, running a 3v device on a voltage supply lower is normally accomplished by using a small buck boost module. However, it is almost _assumed_ that the lower voltage is driven from a wall-wart or similar, as you don't get a free lunch in physics. By that I mean if the booster has to increase the voltage from, say, 3v to 5v then you use more current in doing that. Driving it off a small coin cell will ensure it goes flat pretty quickly. It will work, but for how long depends very much on how often the LCD is powered up. The simplest method would be to use an additional 1.5v (LR44) coin cell *for the LCD only* in series with what you are supplying already. So the 3v you have goes to the negative of the new cell and the positive of the new cell goes to the VCC of the LCD. Voila, 4.5v or thereabouts. If it's all controlled by the Arduino (MOSFET?) it should last a long time. Using a voltage doubler (instead of a buck boost module) is another option but has the same drawbacks as the first option. You need a PWM signal to emulate an alternating current in much the same way as I did for the LED here, but it's a bit simpler. EEVBlog has a couple of videos on this, as he did just what you want with this calculator watch: kzitem.info/news/bejne/qmp7qpNunKeHh4o kzitem.info/news/bejne/xqZpqpOCfGSGrYo They should give you some ideas too. Just remember that you are running your Arduino chip with 3v because you take microAmps. As soon as you venture into the mA range then that poor coin cell won't last that long. Two AA batteries would but they are huge in comparison.
@MikesAllotment
5 жыл бұрын
@@RalphBacon Thanks Ralph. The project I'm using this for is a simple room temperature display, using the ds1820b temp sensor and also a tpp223 touch sensor. The Arduino spends 99.9% of the time in deep-sleep and is only woken up when you touch the sensor, at which point it powers up the OLED to display the temp for just 4 seconds. Power consumption for 99.9% of the time is only in the low micro-amps, and when the display is on it goes up to 6mA for just 4 seconds. With a ~200mAh CR2032 and spending 99.9% of the time drawing
@RalphBacon
4 жыл бұрын
Sounds like a plan, Mike!
@readingmcinfo7573
2 жыл бұрын
Hi Ralph Another inspiring idea. I am incorporating it into an ATtiny85 based mains failure alarm. When the unit is on battery, I still want it to be able to flash a mains failure warning right down to the brown-out MCU limit - an ideal application. I’ve slicked it up by using Timer/Counter1 to generate a PWM signal on OC1B (PB4) and ~OC1B~ (PB3) and much sleeping between and during sampling. I’m just about to start fiddling with the PWM frequency, duty cycle and capacitor value (I’m aiming to up the frequency and reduce the capacitor value / size). Do you have any hints / suggestions as to what I should be aiming for? I have a scope. BTW - I also used Atmel Tech Note AN2447 so as not to need any external pins to measure voltage - well I do actually. If I detect I’m on a healthy 5v supply, I switch the ref from VCC to AREF (PB0) which is connected to the battery (via a 15K resistor so it doesn’t mess up MOSI) and every not so very often measure the battery voltage. If it’s getting low I can flash a big warning but hey I’m still on a mains supply for this. Best regards Peter (You inspired me at the start of Covid to tackle my first ATtiny13A gadget - I’ve not looked back - thanks again).
@readingmcinfo7573
2 жыл бұрын
I think I have it. I was hoping to use a higher frequency to bring down the capacitor (physical) size from 100uF. But as you say, LEDs need a certain voltage to ‘fire’ and you need time to build up the charge to do this. Ho Hum. Best (smallest) I could do was use a 10uF electrolytic capacitor and charge it with a 2Hz PWM signal with only at 0.005 duty cycle (essentially just blip the discharge cycle). I measured the ‘discharge pulse’ on my scope at 4.0ms within a cycle time of 0.5s. So I get LED bips at 2 a second - OK for me as it’s an error indication, I’m not trying to conjure up the 'keep an LED on’ trick. Some details about my ATtiny85 setup if anyone is interested... Code before setup() in the Arduino world.. // Using Counter/Timer1 with fast PWM output on OC1B and -OC1B #define OCR1C_value 0xFF // top value - affects frequency but as not driving a servo it’s not too important #define DUTY 0.005 // duty ratio of PWM - that is OC1B to -OC1B #define TC1_Prescaler (1
@RalphBacon
2 жыл бұрын
I'm glad my videos were a source of inspiration to you, for sure! That's why I make them. Regarding timer settings, check out my previous video #209 kzitem.info/news/bejne/x3yosmmMoWp1nKg that might have some information.
@jessicacarter8264
5 жыл бұрын
Hi Ralph, another great video explaining things in a way we can understand :) Are you still planning to make a video on getting a voltage (from a LiPo battery) to the arduino analog pin when it's being used to power it, so that you can make a battery guage to see how much charge is left in the battery? (I think you said it was something you were looking to do when I last commented) I'm still struggling to get a sensible reading from the battery (tried capacitor/resistive divider/different AREF voltages/using different analog references (Tried inbuilt 1v1,5v and external on AREF)) Thanks again! :)
@RalphBacon
5 жыл бұрын
I hadn't forgotten, Jessica, but I have several things on the go and I don't want to revisit a subject too soon! But, now that you've nudged me I shall see when I can do it, especially as you seem to have tried everything under the sun!
@jessicacarter8264
5 жыл бұрын
@@RalphBacon Thank you :) Not particularly in a rush so whenever you can. It all nearly ended up getting thrown out of the window... and I still haven't had chance to build the ATTiny85 Fuse setter yet either, since most of my time has been spent on trying to figure out this problem... I even got a dedicated chip for the job, but can't seem to get those in a through hole package and I'm not quite ready to switch to surface mount components yet! Edit: Also, do you have a patron/do you take donations? I'd like to do my bit since I don't watch ads :)
@RalphBacon
5 жыл бұрын
OMG you don't watch the ads! Shock! Horror! I just assumed everyone would watch them several times because, as we all know, they are all so interesting and riveting! No, I don't have a Patreon, I'm afraid, and no plans to do so. If you want to know how to help my channel watch that video I made a while ago: kzitem.info/news/bejne/lm-XroaInKV8hoY and ignore the bits about watching the ads! I shall endeavour to get this battery monitor sorted _soon_ but that's "soon" as in Arduino time...
@jessicacarter8264
5 жыл бұрын
@@RalphBacon Thank you :) I've watched the video you linked, and will endeavour to use your affiliate links when I'm looking to get some stuff. Yeah that's fine, I look forward (ish) to someone getting as frustrated with the problem as I have been, haha. I really like your method and how you approach things with honesty and in a way that doesn't put up any barriers to access. You're one of a very low number of people on this platform that read and reply to comments too. I've also made some personal recommendations to friends if they want to get into arduino stuff, Ralph Bacon's the guy you need :)
@jedandecko5585
5 жыл бұрын
Nice trick, great video. Thank you :)
@RalphBacon
5 жыл бұрын
Glad you liked it Jedan, quite simple but could be useful in many a project!
@andrewtoogood1429
5 жыл бұрын
Hey Ralph, when you swap the power doesn't that mean you have the wrong polarity on the electrolytic cap? Thought you had to have the polarity the right way around for them? What am I missing?
@RalphBacon
5 жыл бұрын
The capacitor _never_ has its polarity reversed. What happens is the cap is charged to 1.5v initially (approx). Then the poles are 'switched' but the capacitor merely sees that its negative lead is lifted by that amount as the additional 1.8v is applied to the positive plate. So the capacitor has been level shifted up. But at no time does the negative lead go above the positive lead or it would have a short life indeed! Very good to hear from you Andrew, I hope things are going well for you. Did I ever mention I got a bootloader onto that fake STM32 by using an older version of the current bootloader? Another viewer had _exactly_ the same problem but he knew his STM32s were previously working just fine for months until he tried putting on the new bootloader. How about that?
@andrewtoogood1429
5 жыл бұрын
Great news Ralph! Nice to finally find a way around it. That then proves that there are physical differences between them even if minor. Still don't understand how putting 1.8 on negative pin and ~1.5 on positive does a level shift but I will do some googling as it is an interesting concept.
@hauuau
5 жыл бұрын
It would be interesting to compare this circuit to a simple boost converter based on a small coil and a transistor driven by the µC. It should have lower part count and will occupy only one pin instead of two.
@RalphBacon
5 жыл бұрын
I think a small buck-boost converter might give more current (but still in the order of milliamps). But I haven't tried this or compared them so I can't really say that I know.
@nilaus1964
5 жыл бұрын
Interesting but couldn't you make an even simpler charge pump with just one diode from Vcc and the LED to gnd, thus only using one mcu pin?
@RalphBacon
5 жыл бұрын
Nope! We need to have two so that the voltage appearing on the pin that was previously GND is not allowed to short to the voltage on the charged capacitor. Otherwise, where the pump action?
@nilaus1964
5 жыл бұрын
Ralph, In your circuit you could remove the green diode, connect LED cathode to gnd, and use Vcc instead of upper output (remove top green wire to avoid a short :-). When the output is low, the capacitor is charged; when high, the capacitor discharges through the LED.
@simonmerrett
5 жыл бұрын
Like this - homediyelectronics.com/projects/arduino/voltagemultiplier/
@RalphBacon
5 жыл бұрын
That's a nice way of doing it too, Simon, I shall keep that in my book of things to test out, thanks for the link.
@Ed19601
5 жыл бұрын
Definitely a kind of cockroft Walton multiplier though cant rely wraps my head around the green diode yet, but I guess it works
@RalphBacon
5 жыл бұрын
It's related to a Cockroft Walton multiplier but is not the same because we can switch the output on the MCU thus not requiring a clocked output. And what's this about a green diode?
@rsyoung01
5 жыл бұрын
Do u have a video on ur Eclipse setup for Arduino? Thanks!
@RalphBacon
5 жыл бұрын
I'm afraid not but his website does include a wealth of information. It's not for the faint-hearted though!
@rsyoung01
5 жыл бұрын
@@RalphBacon Sloeber?
@ooloncolluphid9975
4 жыл бұрын
I'm concerned about the current drawn from the pins. Might it not damage the microcontroller ??
@RalphBacon
4 жыл бұрын
No damage will occur, Dolon. apart from the fact that we can safely draw 20mA per GPIO pin (40mA absolute max on any one pin) we're talking very, very low current. If you have a multimeter it's easy to test this.
@ronalddhs3726
5 жыл бұрын
Hi Ralph, Can you plse explain why the electrolytic doesn't pop when exposed to reverse polarity? Thanks.
@hauuau
5 жыл бұрын
It's not exposed to reverse polarity. Charge on the capacitor gets added on top of the positive supply rail when negative terminal of the capacitor is connected to it. Positive terminal of the capacitor never goes negative relative to its negative terminal in this circuit. To cause a catastrophic failure of the capacitor there must be a substantial reversed current flow too. That's obviously blocked here by a diode.
@RalphBacon
5 жыл бұрын
Yes, hauuau has it spot on. The negative terminal of the capacitor remains at all times negative in respect to the positive terminal. The negative voltage is raised to 1.5v (approx) and the 1.8v from the flipped output pin is _added_ to that voltage. A quirk of physics. Well, less of a quirk, more of a rule.
@jimhough6233
5 жыл бұрын
Very clever!
@RalphBacon
5 жыл бұрын
Well, I don't know about clever but could be useful to some.
@TheEmbeddedHobbyist
5 жыл бұрын
At 5:56 i don't think the the capacitor has had it's whole world turned round. it's just been lifted on to the shoulders of the pin going from 0V to 1.8V. but anyway a nice vid.
@RalphBacon
5 жыл бұрын
Yes, that's a better way of putting it. What was GND is now +1.5-ish so anything else is added to the charge already on the capacitor. Standing on the shoulders of giants, so to speak.
@borayurt66
5 жыл бұрын
LM3909 on a breadboard :-)
@RalphBacon
5 жыл бұрын
But that's another $2-3 and more faffing about, surely, Bora? And another component. This way it's a cheap, easy way to achieve to have an indicator. Am I not right?
@borayurt66
5 жыл бұрын
@@RalphBacon You're most certainly right. Not what I meant... It just reminded me of a very young age, when Pink Floyd's "Pulse" album came out in a box set with a blinking LED on it. Being a young electronics enthusiast, I just had to cut open the box revealing an 8 pin IC that miraculously blinked a red LED with a 1.5V AA battery. That's how I met LM3909, and I still have a few in one of my component drawers, dated from early 90's. :-)
@rianderous8761
2 жыл бұрын
the green diode never conducts electricity?
@RalphBacon
2 жыл бұрын
Almost right. It just acts as a blocking diode when the current polarity is one way, but conducts when the polarity is 'reversed' (and does not flow down the purple diode for that part of the pulse).
@rianderous8761
2 жыл бұрын
@@RalphBacon this means the voltage accross the capacitor becomes negative (it doesn't).... 1) positive voltage above, 0v below... C charges trough purple diode. Green diode does nothing here. LEd is of. 2) voltage reverses. We get higher voltage because of sum of voltage accross capacitor and supply voltage. The green diode is in parallel with the voltage across the capacitor. So it's always reverse biased.
@kennmossman8701
5 жыл бұрын
Cute twist on a voltage doubler..............the current is low - certainly enough for an indicator
@RalphBacon
5 жыл бұрын
Yes, Kenn, not quite a traditional voltage doubler, a la Cockcroft-Walton multiplier, more along the lines of a Dickson Charge Pump, I guess. But when using a µC it's a neat way of getting that LED to light (or stay lit even when the battery is getting low).
@electronicdiy3738
5 жыл бұрын
It seems there is a mistake in your explanation,the voltages are not added,at the ac positive alternating,the capacitor charges to 1,8V (minus the Vf of the upper schottkey diode),when the signal reverses,the ac voltage and the capacitor converge at the same potential on the green diode cathode, hence the led flashes are due to the quick discharge of the capacitor.
@hauuau
5 жыл бұрын
Voltages do add up. When the bottom µC pin is low the capacitor gets charged through the purple diode. At this point positive terminal of the capacitor is at ≈1.5V (1.8V-Vf) relative to ground. When the bottom µC pin gets high the capacitor gets connected in series with the supply. At this point positive terminal of the capacitor is at ≈3.3V (1.5V+1.8V) relative to ground. Then the capacitor is discharged through the LED until the bottom µC pin gets low again and cycle repeats. The green diode is pretty much not needed in this circuit. It doesn't do anything because its cathode is always at higher potential than anode. It might've been useful to connect a diode to the positive terminal of the capacitor and connect another capacitor from the load to ground to get a more stabilized supply but it's a trade off due to forward voltage drop. In that case the diode would be necessary to prevent discharge of that capacitor.
@RalphBacon
5 жыл бұрын
Ues, hauuau has summarised it correctly. The voltages do most certainly add up because the negative plate of the capacitor is now effectively above zero (around 1.4v). It's been 'lifted' so the 1.8 (via the green diode) on the positive cap plate is then added to the original 1.4 (approx) charge. We tend to think of caps as mostly being connected to GND (zero volts) but that is not the case at all here.
@electronicdiy3738
5 жыл бұрын
@@hauuau Thanks for the pertinent input, perhaps the green diode is muddleding the circuit, I thought it shunted the capacitor by conducting the whole current to the load, but as the capacitor has now 1,8V on it's negative pin and 1,5V on the positive, the voltage across the capacitor is 0,3V equal to green diode drop. of which the anode is also at 1,8V and the cathode is on the same capacitor potential of 1,5V so this voltage is below the threshold triggering the LED ,due that , no current flows through the green diode so 1,8V ac and 1,5V capacitor are series added to give 3,3V which allows the capacitor discharge via the white LED. It is a mystery game of potentials!
@javierpallalorden
5 жыл бұрын
Boss Benny :-)
@RalphBacon
5 жыл бұрын
Oh yes, he is certainly the boss of my house (and life)!
@lint2023
5 жыл бұрын
Really interesting.
@RalphBacon
5 жыл бұрын
Great that you think so, Thanks for posting.
@JerryEricsson
4 жыл бұрын
Could you not build a small joule thief circuit to power the LED?
@RalphBacon
4 жыл бұрын
Yes, I could but this circuit is slightly odd-ball, don't you think? That's why I chose to share it. You never know, someone may find it useful.
@patprop74
4 жыл бұрын
That was my thought also but then again, Ralph made a point in his comment, the more info we see about different ways to achieve something the better understand we can all get to mix and match different circuits together.
@kennmossman8701
5 жыл бұрын
White LEDS have a Vf of 3 to 3.4 or so volts, so you would have to really hunt for the lowest Vf
@RalphBacon
5 жыл бұрын
The ones I have are all around the 2.4v mark, Kenn. Pure random LED, I've no idea where I bought them from, must be years ago now.
@gartmorn
5 жыл бұрын
Why does the loop start on a discharge or does that not actually matter?
@philowen2755
5 жыл бұрын
The setup function has already performed a chargemode before entering the loop. That's if I understand it correctly.
@RalphBacon
5 жыл бұрын
Phil is correct, I "pre-charged" the capacitor in the setup. Just to keep you on your toes.
@pfeerick
5 жыл бұрын
@@RalphBacon Ah, but you didn't include a delay to make sure that pre-charge 'took' before the discharge :-P I don't think anyone would notice that first shorter or nonexistent pulse ;)
@jimhough6233
5 жыл бұрын
Tantalum? We can get high capacitance at these low V.
@RalphBacon
5 жыл бұрын
Yes, if you can get a tantalum cap that would be fine. As long as they are small enough.
@O1dAlex
5 жыл бұрын
There is no need to use two outputs, and using a sufficiently high switching frequency you can significantly reduce the value of the capacitors: upload.wikimedia.org/wikipedia/en/thumb/7/7b/Dickson_doubler.svg/514px-Dickson_doubler.svg.png
@kjetiltrondsen8242
5 жыл бұрын
And even simpler. The second diode could be the led and the second capacitor could be replaced with a resistor.
@RalphBacon
5 жыл бұрын
If you replace the second diode with the LED, how does it see the higher voltage across the capacitor? I don't see how that will work but you can try it and let me know if you like!
@O1dAlex
5 жыл бұрын
1. When the output is low, the capacitor is charged through the diode to the supply voltage minus the drop on the diode. 2. When the output goes to a high state, the voltage at the junction point of the diode and the capacitor relative to the common wire will be the sum of the voltage accumulated in step 1 and the output voltage. 3. If an LED is connected between the indicated junction point and the common wire, the capacitor will begin to discharge through it. A resistor is needed to limit the peak of output current.
@dlinnoedlinnoe
5 жыл бұрын
why do you need green/lower diode? try w/o it
@RalphBacon
5 жыл бұрын
You're the second person mentioning a green diode. Did I miss something in my own video? What green diode?
@dlinnoedlinnoe
5 жыл бұрын
@@RalphBacon @5:35 the lower diode. I'm not sure it does anything there - I'd say it's never open.
@hauuau
5 жыл бұрын
@@RalphBacon It's probably about using circuit like that instead: i.imgur.com/TIKhw1m.png
@pfeerick
5 жыл бұрын
@@RalphBacon lol... I was thinking the same thing... and then the penny dropped... it's the diode in green on your whiteboard schematic. ;) And yeah, I don't that circuit can work without it...
@ReevansElectro
5 жыл бұрын
Voltage doublers are found in antiquity.
@RalphBacon
5 жыл бұрын
I checked on Google Maps but could not find Antiquity. It found Antigua but no mention of voltage doublers there. 😀 On a more serious note, you are correct, this sort of voltage doubling technique (from an AC source) was invented in 1913-14 by Heinrich Greinacher. It was built upon by many others including the Cockcroft-Walton duo. Nothing new under the sun, hey, Robert?
@Tsnafu
5 жыл бұрын
You can run an LED on half a volt if you use a joule thief - big Clive has a vid on how to make one
@hauuau
5 жыл бұрын
Original joule thief requires a custom inductor. That's not practical for majority of applications. It's possible to just build a crude boost converter out of regular parts though. It might either use some sort of transistor oscillator or just run from the microcontroller's PWM signal.
@RalphBacon
5 жыл бұрын
Well, yes, we could always put some sort of buck boost device onto the VCC but what I'm trying to show here is a simple (3 component) way of increasing the voltage for a simple indicator using a couple of spare pins on an MCU. Although it does also work for powering, and lighting an LCD display too!
@jrareas
4 жыл бұрын
I will try this using 555 flip flop instead of MC
@RalphBacon
4 жыл бұрын
Yes, any dual output, mirrored square wave output would work.
@thegoodhen
4 жыл бұрын
Cool! I remember having done a horrible hack a few years ago when I had 2 pins left on my micro and needed to light up an RGB LED in one of 3 colors. The voltage was too low for the LEDs to work, so I ended up wiring 2 LEDs in parallel and one LED in the opposite direction. An inductor was in parallel with them. I would run current through the inductor before setting both the leads to high impedance; the inductor provided the voltage necessary. By adjusting the pulse width I was able to either light up just the green or green AND blue led, making the cyan color. The red color was achieved by running the current in the opposite direction. I remember trying to further use this arrangement to also detect the ambient light levels by measuring the capacity of the LEDs (but failing) and having problems with the clamping of the ESD diodes, but I did solve these issues eventually. :)
@RalphBacon
4 жыл бұрын
Sounds a bit like a Joule Thief circuit. Perhaps you invented one and didn't even know! But good for you that you that you finally cracked it!
@trinidad17
5 жыл бұрын
Nice didactic example. You could also have use a "joulethief".
@RalphBacon
5 жыл бұрын
Well, I suppose it is true that the purpose of this channel is to inform, educate and yes, teach, in a hopefully interesting way, so I'm glad you liked this video. I _could_ have used the Joule Thief way, but that coil would put people off - and we have an oscillator right in the MCU if we need it! Thanks for posting, good to hear from you again.
@pcmedicbiz
5 жыл бұрын
Hi, what about either of these IC's... MAX1682 MAX1683
@RalphBacon
5 жыл бұрын
Yes, they are both switched capacitor voltage doublers, John, and would do much the same thing, but would require another chip. The advantage they have is that the max current output is 50mA, enough for quite a few components. For those interested here's a link: datasheets.maximintegrated.com/en/ds/MAX1682-MAX1683.pdf
@Roy_Tellason
4 жыл бұрын
Interesting that the datasheet referred to here seems to specify tantalum or ceramic capacitors.
@kennmossman8701
5 жыл бұрын
I'd feel more comfortable if you mentioned that such a routine ought to be done by a ProtoThread..
@RalphBacon
5 жыл бұрын
Well, at best I'd do this using a state machine (most of my sketches are like that) but for a simple circuit to stop occasionally and flash an LED I think it would be OK using a blocking routine. But as they do a protothread library for the Arduino I might look at it although it would get even fewer views than I'm getting already! On an ESP32 (with RTOS) I'd just use a low priority task, job done.
@wendajaroslaw
5 жыл бұрын
The red LED requires 1.6V, nevertheless great video.
@tubeDude48
5 жыл бұрын
It depends on the "forward Voltage" of the LED
@wendajaroslaw
5 жыл бұрын
I know that currently red diodes are produced in various technologies. There are leds where the blue LED is lit and there is red phosphor on it. However, all my red diodes have forward voltage around 1.6V.
@RalphBacon
5 жыл бұрын
When you say "require 1.6v", that's not the same as conducting sufficiently to show a bright enough light. I've just been through my box of LEDs (random sample) and it's interesting that the lowest Vf LED I have is a red one at 1.7v but requires 2.0v to become bright enough to be used in a project. Green and yellow need a slightly higher voltage but similarly need more to change the glimmer to a bright light. Blue LEDs you can forget entirely at this voltage; some of mine required 2.9v just to start lighting up! Equally interesting was that I have some red LEDs that produce a _very poor_ light but even then required more than the 10mA I had set the current limiter to. I'll probably throw those away as they are truly awful, current guzzlers and not particularly bright anyway! I'm hoping that modern day LEDs are bright enough at less than 10ma - some of mine required only 2mA and were plenty bright enough!
@lezbriddon
5 жыл бұрын
old red led's were 1.6v ....... old green 1.8v
@simonmerrett
5 жыл бұрын
Yes, and orange/yellow also work at 1.8v. For other applications, IR LEDs work at 1.7V and are detectable using most smartphone cameras.
@RalphBacon
5 жыл бұрын
You say that but a LOT of my recent diodes are higher, and I don't know why. They often require 2.0+ volts albeit at low current (sometimes). Some require 2.9v. Perhaps they are really all white diodes that have a coloured plastic head? I wouldn't put anything past the ... er, entrepreneurs of the Far East.
@lezbriddon
5 жыл бұрын
@@RalphBacon chemistry. they not made of the same stuff 1970's diodes were. they switched from Gallium Arsenide Phospher to Indium Gallium Aluminum Phosphide or something like that. greater brightness in exchange for an extra volt or so, and made blue/uv possible and then with the old CRT white phosphor powder thrown in on a uv base we got white
@McTroyd
5 жыл бұрын
Thanks for this! I keep forgetting ground is a relative reference and can/will be changed. It's just like stacking batteries for higher voltages... Speaking of, for those looking for (dangerously) high voltages, Big Clive has an example of how to stack the circuit here: kzitem.info/news/bejne/yZlm1Iunq3d0pIY Clive's using 240v AC mains for his source, reaching kilovolt ranges. But, with something like the 1.8v microcontroller here, the same circuit might be used to briefly drive a much higher voltage element (say, a 5v relay for a pulsed contact closure?).
@RalphBacon
5 жыл бұрын
Yes, a good analogy with the stacked batteries, Ted. Big Clive can carry on with those lethal voltages; I'll stay closer to 5v, I think! But a voltage doubler (or tripler) could easily be used to generate 5v for a quick pulse (or more, it can be used to run and LCD display for example). But there are some tiny buck boost modules out there that can take 1.5v to 5v and always generate 5v out of it. Sometimes it might pay to use one of those. I have one, so I might experiment a bit. Thanks for posting, good to hear from you.
@JerryEricsson
5 жыл бұрын
@@RalphBacon Indeed, I have 2 of those anything to 5 volt gizmo's one has a USB out on it, the other simple posts, I also have some that go 5-12 down to 3.3 for the devices that need that to survive. Looks a bit like the joule thief circuit of days gone by, I still have a few of those built up for those gloomy Sunday's when the ice has pulled down the power lines, and all I have are some old expired AA or AAA batteries. They do give you light from those "dead" batteries that have around 1 volt or less, and seemed to last a long time. Wife and I have them on our night stands, and beside our easy chairs just in case. s
@ElieWar
5 жыл бұрын
:-)
@RalphBacon
5 жыл бұрын
Short but sweet, thanks for posting.
@theonlymudgel
5 жыл бұрын
G’day! I’m first. Woohoo.
@theonlymudgel
5 жыл бұрын
Is the boss really Benny and you’re pullling our collective legs? Or are you being serious and I’ve made a ninny of myself?
@RalphBacon
5 жыл бұрын
Let me answer your question this way: Dogs have masters, cats have servants. So who's the Boss? Benny, of course!
@theonlymudgel
5 жыл бұрын
Ralph S Bacon haha. I have 4 bosses. We have 3 cats all vying for title Queen of the castle.
@paranormalitcresearch
5 жыл бұрын
It has scientific been discovered, that the IONS are actually floating from minus to plus. (But since the official understanding has buildings on plus to minus, public kept building components for that beleive). So how can this setup with Shotky diodes be useful?
@RalphBacon
5 жыл бұрын
Current does indeed flow from negative to positive but, as you say, by the time this was discovered the positive-to-negative flow was firmly entrenched and thus impossible to correct. Oh well. Not sure how this affects Schottky diodes though?
@paranormalitcresearch
5 жыл бұрын
@@RalphBacon They will logically be placed in the direction of thought. Not the way it does work then. So they are placed at the wrong side, doing the opposite of goal.
@RalphBacon
5 жыл бұрын
In that case it must be magic. No other explanation.
@surenbono6063
4 жыл бұрын
..that's a basic original idea of the transistor...
Пікірлер: 187