Trying to build an inverting DC converter with a 555 - Page 1
Forum section: electronics / beginners

author: dazz
author_rank: Frequent Contributor
timestamp: February 27, 2025, 05:33:46 pm
content: Hi everyone. As the title suggests, I'm trying to figure out how to make a DC converter that outputs negative voltage using a 555. I've done it before using the venerable 34063, and it works just fine. This design allows me to input say 12V and get -15V regulated at the output. This has been tested in the sim, but also IRL.So this is what I got so far wrt the 555 inverter:I have two issues here:1. The output voltage in the sim won't go above -9V when using 12V at the input, is it not possible to get at least -12V, or even -15V or more like with the 34063?2. I have no idea how to implement the feedback to get the output regulated. In the 34063 I can tie the GND pin to the negative output and use the output at the Cinv pin to get my feedback working, but I don't think I can do that with the 555, can I? I know I can pull down pin 5 to regulate the output (I've used a TL431 for that purpose in the past on boost and buck converters), but I'm not sure how to do that with a negative voltage3. If I tie the GND pin to the negative output voltage while powering the 555 with 15V, isn't that like using a supply voltage that's higher than 15V, which would probably kill the IC?Thanks in advance

author: BadeBhaiya
author_rank: Regular Contributor
timestamp: February 27, 2025, 06:00:28 pm
content: You can use a PNP BJT and feed the negative voltage at the base with a divider. Connect the BJT so that when the appropriate negative voltage is made on the output, the PNP connects grounds the RESET pin and stops the 555. I have made a boost converter in the exact same configuration. The saturation current of base (0.6V or whatever) will decide the divider feedback equation.Also just a hunch but the reason why you're not able to get lower than -9V is because your NFET is stopping conducting the moment the inductor-diode node goes to 12V, so a lot of current is likely not able to flow through the inductor to build up enough field. I would recommend a PFET for this, along with an NPN to invert the out pin logic. Again, I could be wrong about this.

author: PGPG
author_rank: Frequent Contributor
timestamp: February 27, 2025, 06:20:38 pm
content: Quote from: dazz on February 27, 2025, 05:33:46 pmIn my opinion it is generally not a good idea.In 1988 we setup our small (2 person) company and our first product was EPROM Programmer powered from PC keyboard socket. To convert 5V into VPP (25V) I made DCDC converter based on NE555. All ICs were very, very expensive for us (living in communist country those time) so selecting the cheapest was rationale.My converter had auto-protection mechanism I even didn't know of it. In device PCB was bottom-up. Switching transistor (from BD135,BD136,... serie) when got hot unsoldered itself and fell out of the board.What I want to tell is that using specialized ICs gives you better solution with higher efficiency and with additional features you will not get using NE555.

author: dazz
author_rank: Frequent Contributor
timestamp: February 27, 2025, 07:02:35 pm
content: Quote from: BadeBhaiya on February 27, 2025, 06:00:28 pmI'm struggling to figure out how to wire that PNP. If I put the emmiter to ground, the PNP starts conducting when the voltage at the divider gets to -0.7V or so, but then I need to power the collector with a negative voltage, right?

author: dazz
author_rank: Frequent Contributor
timestamp: February 27, 2025, 07:05:34 pm
content: Quote from: PGPG on February 27, 2025, 06:20:38 pmThanks, I see what you mean. I'll look into some proper PWM switching regulators, I guess that would be a good choice

author: JoanBS
author_rank: Contributor
timestamp: February 27, 2025, 08:02:10 pm
content: Quote from: dazz on February 27, 2025, 05:33:46 pmSo why not use the MC34063?By the way... in the diagram pins 4 and 5 are swapped.

author: dazz
author_rank: Frequent Contributor
timestamp: February 27, 2025, 08:44:25 pm
content: Quote from: JoanBS on February 27, 2025, 08:02:10 pmSwapped in the 555 or the 34063?

author: Andy Chee
author_rank: Super Contributor
timestamp: February 28, 2025, 01:20:57 am
content: I assume this endeavor is just a bit of experimenting, rather than a product? If this is a product, I highly suggest staying with the MC34063 rather than inventing something with the 555.Notice the GND pin of the MC34063 is connected to your output?In order to implement feedback, you'll need to do the same with your 555 circuit, connect the 555 GND pin to your output.The rest of your 555 circuit will require changes in order to accommodate this new pin reference.

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 03:44:59 am
content: Quote from: Andy Chee on February 28, 2025, 01:20:57 amThanks, Andy. Trying this where I use pin 5 (ctrl voltage) for the regulation, but it doesn't seem to work, not sure why.Yes, this is a bit of an experiment. I've built converters (boost, buck, inverter) with the 34063 in the past, but they can sometimes be a bit noisy for audio circuits, I believe due to the inherent hysteretic behaviour of the 34063, so I wondered if the 555 might work better noise wise

author: Whales
author_rank: Super Contributor
timestamp: February 28, 2025, 04:18:29 am
content: The 555 will behave oddly if you apply a negative voltage to any of its pins (or more specifically: a voltage lower than the 555's lower power pin).The 34063 inverting circuits shown in 34063 datasheets do something clever to work around this, they connect the ground pin of the IC to the negative voltage rail.Quote from: dazz on February 28, 2025, 03:44:59 amOnly if you use it in a non-hysteric control loop. Otherwise it will probably be even worseThe lower switching speed also won't help (it will be much closer to audio frequencies and thus harder to filter out).

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 04:49:02 am
content: Quote from: Whales on February 28, 2025, 04:18:29 amOK, thanks. I'll abandon the idea of using the 555. Apart from what you said, correct me if I'm wrong, I would be limited to 16V between the positive input and the negative output, so that's 8V / -8V, which won't cut it anyway.Quote from: Whales on February 28, 2025, 04:18:29 amI had no idea the 34063 could be used without the hysteresis, how would that work? Do you mean that would work better than my schematic above, or worse?

author: Whales
author_rank: Super Contributor
timestamp: February 28, 2025, 05:38:12 am
content: Yes you would be limited to approx +/-8V, unless you can find a higher-voltage 555 variant.You can implement non-hysteric control with either a 555 or a 34063ifyou add enough extra parts and complexity (perhaps all you need is a high-speed triangle wave generator and some compensation circuitry?). For more info you will want to look up switchmode appnotes & datasheets for some switchmode chips which go through their theory of internal operation. I have not thought out a full design, it's just an offhand comment.EDIT: If you're after other solutions to solve your problem, then you could consider:- 34063 + linear regulator. If you lay it out well then most of your noise will be gone.- A different switchmode control chip. There are infinite out there (for better and for worse)- Something without feedback like the SN6501 + a tiny transformer + diode rectifiers, just for fun. It can turn a 5V rail into +/-5ish or +/-10ish volts depending on how your wire the transformer and rectifier.

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 06:22:35 am
content: Quote from: Whales on February 28, 2025, 05:38:12 amThanks, I'll look into those options. What about this configuration for the LM2596? Would this work in practice? I tried it with a different buck converter module I got from aliexpress and it blew up

author: Ian.M
author_rank: Super Contributor
timestamp: February 28, 2025, 09:12:15 am
content: A 555 inverting buck regulator isn't very difficult to design but its performance will be crappy, so the good advice above to look at other ICs stands. However I knocked this up over breakfast just for sh!ts and giggles. It outputs over 120mA @ -24V, using one NE555 and two NPN transistors to sense the current through the inductor and the output voltage.

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 09:47:55 am
content: Quote from: Ian.M on February 28, 2025, 09:12:15 amOh, wow, thanks Ian, that's pretty cool.

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 10:33:13 am
content: I'm so confused, how does that oscillate? It doesn't seem to be configured in astable mode, and doesn't even have a cap to fix the frequency. You guys are electronics wizards, LOL

author: Ian.M
author_rank: Super Contributor
timestamp: February 28, 2025, 02:02:54 pm
content: It senses the increasing inductor current (Q1 and 1 ohm resistor) which pulls down threshold and trigger when it gets high enough, turning the MOSFET off, then lets them go back high when the current decreases a bit turning the MOSFET back on. The timing is thus determined by the inductance, supply voltage and gain of Q1. This also makes it short-circuit proof.Here's an improved version that adds an emitter resistor to Q1 to decrease its gain (increasing the inductor current swing in continuous mode) and also slowing the oscillation to a more reasonable max. of ~ 35 KHz, and improving the voltage sensing, which vastly reduces the output ripple. It should be good for over 200mA.

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 04:13:57 pm
content: Quote from: Ian.M on February 28, 2025, 02:02:54 pmAwesome, thanks again. How does the mosfet switch negative with a positive supply and the GND pin to ground? Is it because it's a p-channel mosfet?I know these are noob questions unrelated to the overall workings of the converter, but is this how the voltage sensing works, please? When the voltage at the resistor divider reaches 0.6V, the transistor turns on and it pulls down trigger & threshold and switches off the 555 maybe? What's the advantage of using the zener instead of simply tweaking the values of the resistors in the divider?Also, what goes into picking the mosfet and the switching diode? Anything in particular I should be looking for? I only have 1N5817 schottkys right now

author: Ian.M
author_rank: Super Contributor
timestamp: February 28, 2025, 05:14:25 pm
content: The diode and (yes) P-channel MOSFET must be rated >1A and > voltage between Vcc (Vin) and Vout. You want >24V between input and output, so choose at least a 40V MOSFET. 1N5817 is no good - its only rated 20V - so you'd need 1N5819. (30 V rated 1N5818 is a bit too close to its limit). For a quick test on the bench you could try 2x 1N5817 in series but dont trust that for any real application. As real 555 outputs dont swing all the way to Vcc, the MOSFET may need a gate pullup resistor if its threshold voltage is much under 4V. - try 4K7.The Zener gives a much sharper 'knee' to the voltage sense circuit, so makes it shut off and restart over a much narrower voltage range once the output voltage reaches the setpoint, which makes the output ripple voltage much smaller. Try a 5.1V one for your 12V out and fiddle with the R4,R5 divider to get as close as you need to 12V.N.B. the inductor needs to have a saturation current >>1A and a low DC resistance, at most a couple of ohms, preferably lower.The snubber circuit (R6, C2) is *NOT* optimised. Its there to keep the switching node (MOSFET drain) from ringing at a highish RF frequency when the MOSFET switches off, and to prevent it spiking much above Vcc or below Vout. You'd need a good 100MHz or better scope to see what's actually going on there in real life. If its still making a lot of RF interferance you may need to add a 100 ohm resistor in series with its gate, as close as possible to the MOSFET. The circuit also needs good decoupling - try a 470uF low ESR 105 deg C 25V aluminum electrolytic, rated for >=1A ripple current, + 0.47uF ceramic in parallel, between the MOSFET source and the bottom end of R1, and also two 0.1uF ceramics directly across pins 1,8 and 1,5 of the 555.Once you've finished playing with it, tear it apart and build a MC34063 based circuit!

author: dazz
author_rank: Frequent Contributor
timestamp: February 28, 2025, 06:41:31 pm
content: Quote from: Ian.M on February 28, 2025, 05:14:25 pmLOL, I've already built several converters with the 34063, I made pcb's and they work fine. Here's a couple of pics from Kicad so you can laugh at me or somethingI added options to filter that thing to one's heart content, with up to 4 electrolytics, an LC filter and a capacitance multiplier, maybe it would have been better to simply add a linear regulator, as suggested by Whales.Anyway, thanks so much for the wealth of information there, I'll place an order for parts to try your design