Author Topic: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !  (Read 15274 times)

0 Members and 1 Guest are viewing this topic.

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Hi All,

A friend of mine wanted to generate +15V and -15V pulses  wtih his 5V arduino
(Say with 100mA, 10khz).

To get +15V was easy with a transistor (2n3904) and mosfet. But what is the simplest way to get
The -15V pulses, without an opamp ?

He has a power supply with 5V, +15V, -15V.

Thanks
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #1 on: December 23, 2016, 07:29:52 pm »
Why "without an opamp"?
That IS the easiest way.

Although 100 mA is quite a number.

 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #2 on: December 23, 2016, 07:50:00 pm »
Optocoupler is a very simple and easy solution

 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #3 on: December 23, 2016, 08:14:54 pm »
Hi All,

A friend of mine wanted to generate +15V and -15V pulses  wtih his 5V arduino
(Say with 100mA, 10khz).

To get +15V was easy with a transistor (2n3904) and mosfet. But what is the simplest way to get
The -15V pulses, without an opamp ?

He has a power supply with 5V, +15V, -15V.

Thanks

2N3906 (using the +5V (Emitter) and a signal into its base via a resistor, from the MCU) feeding through a resistor (connected to its collector), a few milliamps current into the base of a small/medium PNP power transistor, on/for the -15 Volt rail. Part of your output.

If I've got it a bit wrong, I really needed to see it as a schematic. Words are often problematic.

Solid State Relays, would be even easier. But could be too/very expensive, and are difficult to find at 10 KHz, with a quick look on my part.
« Last Edit: December 23, 2016, 08:22:58 pm by MK14 »
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #4 on: December 23, 2016, 08:43:51 pm »
Easy solution: TLP251 optocoupler/mosfet driver followed by a buffer stage (complementary emitter follower).
Cheap solution using only more common parts: Level shifter using multiple stages for shifting the voltage first from 0V/5V to 0V/15V and then to +/-15V followed by the buffer stage.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #5 on: December 23, 2016, 09:31:17 pm »
Capacitively coupled, complementary, common emitter amplifiers.
 
The following users thanked this post: JacquesBBB

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #6 on: December 23, 2016, 10:27:12 pm »
Thanks, this is brillant, and indeed what I was looking for. I was stuck with the problem of DC level, and the capacitive coupling is the trick.

I made a small simulation on everycircuit here

http://everycircuit.com/circuit/6588028428746752
« Last Edit: December 23, 2016, 10:30:23 pm by JacquesBBB »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #7 on: December 24, 2016, 12:06:48 am »
Capacitively coupled, complementary, common emitter amplifiers.


When the circuit first switches on, and C1/C2 are both discharged = 0V across them. What is going to stop both the top and bottom transistors switching on at the same time (R1 and R2 will limit the max base currents, but they seem low enough to be problematic), and short circuiting the +15 and -15V rails (shoot through), potentially causing a very high current to flow, which may exceed (depending on the PSUs, output capacitors and the transistors real life Hfe's etc) the transistors max ratings and/or cause other undesirable effects, elsewhere ?

Similarly (during initial switch on, power up), real life circuits will be likely to have a partial non-symmetric, differences, between the plus and minus sides (because of C1 & C2's tolerance and other factors). Which can make the MCU output pin, temporarily negative (or too high a positive voltage), via C1/C2. Which may latch up the MCU or even break it ?
« Last Edit: December 24, 2016, 12:09:10 am by MK14 »
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #8 on: December 24, 2016, 01:04:46 am »
I was mostly interested on how to make the negative pulse. Indeed, the positive and negative pulses can be generated by two different CPU pins.

In this case, the load can be put across the circuit. As well the current from the CPU is limited or can be limited by a resistor. Something like this

« Last Edit: December 24, 2016, 01:21:09 am by JacquesBBB »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #9 on: December 24, 2016, 02:31:08 am »
I've drawn out the circuit I was trying to describe in words, and simulated it.
I've NOT spent the time to optimize the values, specify the transistors (should be real easy) or check it out properly.
But it seems to simulate as intended.
Edit: I've noticed that I mis-connected the output load R5. I've corrected it, and the simulation seems unchanged. I've NOT spent the time re-pasting and updating the files for the forum.

Edit2: One mistake I've just noticed. If the output pin (which supplies the PWM signal), floats, initially while the MCU boots itself up and starts running the application software. It could attempt to turn on both the top and bottom transistors. There is probably a moral to that somewhere.
One solution is to just put a pull down resistor, between the floating output and ground, of say 1K (may need a different value). That should be high enough for the MCU to over-ride it when it turns the pin into an output and yet low enough to force it into a defined state.

Edit3: Being critical of my own circuit. Now I've seen it in the flesh (schematic). It seems to be too reliant on the MCU pin, providing output voltages very close to either exactly 5V or 0V. That WON'T necessarily happen in practice, especially if there are other things it connects to (I DON'T know what you plan for this). So it would probably be better to put in a logic "buffer" stage, to replace the early parts of this circuit. So it can cope with a much wider range of output voltages. Not easy or so straight forward, because of the positive and negative supply needs.
SORRY!.



In the following plot. The blue trace is the 0 to 5 volts, PWM signal (fed into the circuit). The Green trace is the resultant -15v to +15V output.



« Last Edit: December 24, 2016, 03:07:49 am by MK14 »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #10 on: December 24, 2016, 03:41:01 am »
On reflection. I now think the earlier opinions were best.

I.e. Something on the lines of a simple opto-isolator, on the 5V logic side. Followed by a simple, driver stage, driven by that opto-isolator.
Hence just two small and low cost integrated circuits, and a lot less hassle.
The driver stage (+ and - 15 volts) could be a motor driver (H-bridge), op-amp, and many, many other options. In a single IC package (plus the opto-isolator).

In some cases, you may not even need the opto-isolator (e.g. op-amp, which could be a high current output voltage one).

I suppose "Simplest solution", actually means different things to different people.

To me it means one or two ICs and not much else. Job done. Rather than fiddling with a dozen or so small passive and active components, for ages, to get it working. There are many ways such a circuit could misbehave.
 

Offline basinstreetdesign

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: ca
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #11 on: December 24, 2016, 03:57:31 am »
The easiest way to make negative pulses to a power rail below ground is with a PNP BJT with base connected to ground through a resistor (say about 5K), the emitter goes to the uC output and the collector connected to the negative rail, -Vrail, through a load resistor(say 10K).  With the uC o/p low the Xsistor is off and the collector is near -Vrail.  When the uC pulls the emitter high. the grounded base turns the Xsistor on and yanks the collector high to the uC output voltage.  If you want the pulse to be limited to ground then clamp the collector with a diode to same.  4 parts.  Easy.

Follow this with the power stage of your choice to get more current.
Tim
STAND BACK!  I'm going to try SCIENCE!
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #12 on: December 24, 2016, 05:30:56 am »
Thanks, this is a good one.

With the diode, the output is at 0.6V and not 0, but if  a NPN  BJT is used with base at the collector of the first stage, everything is perfect.



« Last Edit: December 24, 2016, 05:40:39 am by JacquesBBB »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #13 on: December 24, 2016, 10:49:40 am »
Capacitively coupled, complementary, common emitter amplifiers.


When the circuit first switches on, and C1/C2 are both discharged = 0V across them. What is going to stop both the top and bottom transistors switching on at the same time (R1 and R2 will limit the max base currents, but they seem low enough to be problematic), and short circuiting the +15 and -15V rails (shoot through), potentially causing a very high current to flow, which may exceed (depending on the PSUs, output capacitors and the transistors real life Hfe's etc) the transistors max ratings and/or cause other undesirable effects, elsewhere

Similarly (during initial switch on, power up), real life circuits will be likely to have a partial non-symmetric, differences, between the plus and minus sides (because of C1 & C2's tolerance and other factors). Which can make the MCU output pin, temporarily negative (or too high a positive voltage), via C1/C2. Which may latch up the MCU or even break it ?
You're right about shoot through but it won't be an issue as long as the power supply's current is limited to a safe level. Failing that, it's fairly easy to limit the current with emitter resistors and diodes to clamp the base voltages.

The transients on the MCU pins will be clamped by the ESD diodes. If it's an issue, add Schottky diodes from the output to the 5V and 0V power supply rails.

« Last Edit: December 24, 2016, 11:55:37 am by Hero999 »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #14 on: December 24, 2016, 12:58:46 pm »
Thanks, this is a good one.

With the diode, the output is at 0.6V and not 0, but if  a NPN  BJT is used with base at the collector of the first stage, everything is perfect.
It does seem to be working nicely!

You're right about shoot through but it won't be an issue as long as the power supply's current is limited to a safe level. Failing that, it's fairly easy to limit the current with emitter resistors and diodes to clamp the base voltages.

The transients on the MCU pins will be clamped by the ESD diodes. If it's an issue, add Schottky diodes from the output to the 5V and 0V power supply rails.
...Snip---cut...

Your modifications seem to fix the various issues.
I find that in H-bridge (or similar) configurations. Shoot-through can easily break the output transistors. If you are NOT careful.
I guess part of the problem is that such circuits are often used with DC motor drivers (H-bridge), which can need quite large currents (at start up). Giving the potentially too high shoot-through currents, enough current to potentially break the output transistors. Depending on the transistors specifications.
It is neat doing it with the capacitors.
« Last Edit: December 24, 2016, 01:00:58 pm by MK14 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #15 on: December 24, 2016, 01:49:59 pm »
Here's another solution. It's similar to the one you posted, except it won't turn on both transistors if the MCU's output floats. There will also be some shoot through during switching, which is solved by current limiting.

By the way, in LTSpice, you can rotate components by pressing ctrl+R and mirror them with Crtl+E; hopefully that'll make producing more readable schematics easier.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #16 on: December 24, 2016, 03:11:29 pm »
Here's another solution. It's similar to the one you posted, except it won't turn on both transistors if the MCU's output floats. There will also be some shoot through during switching, which is solved by current limiting.

By the way, in LTSpice, you can rotate components by pressing ctrl+R and mirror them with Crtl+E; hopefully that'll make producing more readable schematics easier.

That's looking even better than your previous circuit. Without doing a huge analysis of it. It looks like it will work well.

Although I really, really like LTspice. I try and use the on screen buttons, to do the components/mirroring and the schematic tends to just scroll like crazy, when I do that. So I must be doing it wrong!
Using the keyboard short-cuts (like you suggested), is a good solution to that/my problem with that.

Sorry that the schematic was a bit sloppy and badly drawn (I fully agree). I was trying to do it quickly, for the forum post. Clearly, doing it that way (in a big rush, to minimize time spent on doing post), has produced poor results.

I'm finding the time gaps in my usage of LTspice, are big enough, to somewhat forget how to use it. Sorry again, about the poor quality schematic.

Also those output transistors you keep on using, are amazingly well specified. The guaranteed, minimum Hfe of 250 at 100 mA's (for both NPN and PNP, On-Semi version), is very, very good. It is all too easy to lose too much Hfe (via the datasheet), at higher currents and it is often not specified (at such a generous amount), for small signal transistors (or very low end/small power transistors).
« Last Edit: December 24, 2016, 03:30:34 pm by MK14 »
 

Offline basinstreetdesign

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: ca
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #17 on: December 24, 2016, 06:11:09 pm »

With the diode, the output is at 0.6V and not 0, but if  a NPN  BJT is used with base at the collector of the first stage, everything is perfect.



Not quite.  I should have added that with the diode clamp a resistor of a few hundred Ohms to 1K would be needed in my circuit in the emitter leg to limit the clamp current.

But with your variation, you need a resistor in the base of the NPN to limit NPN base current.  Otherwise when the uC o/p goes high and turns on the PNP, the forward biased eb junction of the NPN will not limit current putting both transistors and the uC in jeopardy.
STAND BACK!  I'm going to try SCIENCE!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #18 on: December 24, 2016, 09:16:31 pm »
I was mostly interested on how to make the negative pulse. Indeed, the positive and negative pulses can be generated by two different CPU pins.
That doesn't sound like a very good idea. If something goes wrong with the MCU/software, then both transistors could turn on, causing smoke.

Here's another variation of the circuit I previously posted, which avoids shoot-through by introducing some dead time. The turn-on is delayed slightly by adding an additional diode-RC network to the input stage.

 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #19 on: December 24, 2016, 10:28:51 pm »
Thanks to All for their input. This was very enlightening.

In fact, It happened that the real need of my friend was quite different from what I originally thought
from his (not so well formulated ) question.
But it made me  think to this theoretical problem of how to generate a negative 15V pulse with significant current from a positive 5 V pulse.   


I was surprised to see that it was not as obvious as generating a positive 15V pulse, and it was nice to see all the solutions that came along,
based on very different principles.

The optocoupler is a solution, but certainly not an answer to the question that I  was thinking of which was to provide an answer,
with only very basic components, as for the positive pulse : essentially  transistors and resistors with minimal number.
My question was really  : what is so different with a negative pulse ?

I   am impressed by  the capacitive coupling solution  of  Hero999 and the clever use of the  PNP BJT by basinstreetdesign,
but all the other inputs were really amazing in such a small time.

So thanks again to everybody.

Jacques


 
The following users thanked this post: basinstreetdesign

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #20 on: December 24, 2016, 10:43:42 pm »
I was mostly interested on how to make the negative pulse. Indeed, the positive and negative pulses can be generated by two different CPU pins.
That doesn't sound like a very good idea. If something goes wrong with the MCU/software, then both transistors could turn on, causing smoke.

You are right, but as I said above,  I am not sure that this was the real requirement.  But although I  do not have the precise question, your solution  is very nice. Thanks.

 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #21 on: December 24, 2016, 10:50:19 pm »
My question was really  : what is so different with a negative pulse ?
Nothing, but positive+negative requires level shifting in both directions.
And both level shifters must not generate overlapping pulses, otherwise both output transistors are switched on at the same time.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #22 on: December 24, 2016, 11:37:44 pm »
A 10Khz square wave, you can always use a line transformer...  Well, LOL,,, ok, I guess today that's more complex and pricey than a few transistors & resistors & caps.  Or use the output of that transformer to drive a class AB emitter-follower.  That should give a really good current on the +/- rails.

Other IC Alternative: instead of an OPamp, a RS-232 line driver would do the trick & many have a built in switched cap power-supply which will convert your source 5v to +/-15 volts for you!  They will also digitally clean your source signal and operate from DC up to the MHz range.  Unlike the OP-Amp, the output with these will hit the +/- rails with balanced current each way & it will be switched super fast & some transmitter ICs have a tristate option on the output and they draw much less current than most OP-amps which can go up to +/-15v.

Question JacquesBBB, do you have anything against using small signal mosfets like 2N7000, or VP2106 instead of BJT?
Would you accept a constant current source single ended class A output?  This means your power supply will draw between 100ma and 200ma during a low output depending on your load, and between 0ma and 100ma for a high output depending on your load.  Your transistors will get toasty as well...

« Last Edit: December 25, 2016, 12:28:14 am by BrianHG »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4952
  • Country: gb
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #23 on: December 25, 2016, 12:38:11 am »
Other IC Alternative: instead of an OPamp, a RS-232 line driver would do the trick & many have a built in switched cap power-supply which will convert your source 5v to +/-15 volts for you!  They will also digitally clean your source signal and operate from DC up to the MHz range.  Unlike the OP-Amp, the output with these will hit the +/- rails with balanced current each way & it will be switched super fast & some transmitter ICs have a tristate option on the output and they draw much less current than most OP-amps which can go up to +/-15v.

That's a very clever and neat idea.
They are usually robustly built as well. Since they are designed to cope with a significant number of feet of cabling and probably a degree of abuse as well. Especially in noisy environments.
It will cope with the TTL (or similar) logic levels as well.

I think there are many different, one or two IC solutions to this kind of problem. Hence my change of tact, earlier in this thread.
Since in my opinion, a single cheap IC (such as you describe) is quick, easy, cheap and simple. Which seemed to be the original objective.
Rather than spending ages, messing around with and fine tuning a ten or twenty passive/small component solution. When a $1 common bread and butter chip or two. Will do it, with little design effort or messing around (hopefully!).
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: How to generate +15V and -15V pulses from +5V pulses ? Simplest way !
« Reply #24 on: December 25, 2016, 12:57:21 am »
The trouble with an RS-232 driver is it won't be able to output the required 100mA. The current is typically limited so something small such as 10mA. The voltage drop will also be higher than plain old transistors configured as common emitter amplifiers.

Source, data sheet for the old 75188.
http://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=mc1488&fileType=pdf

There may be better ICs around now with a higher current output. If anyone knows of any, please say.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf