Boosting analog output

Hello,

I have a pretty simple project - I need to output square waves with adjustable width (in microseconds), height (ie voltage), and interval. Width and spacing are easy with Arduino, and to adjust voltage I will use a MCP4725 DAC with Azande controlling it all. I cannot use PWM for this application - it has to be amplified square waves.

I don't need a lot of amplification...a gain of 10 db would work, or 20 if I limit the DAC's range.

Integrated amplifier chips look like a good idea, if those would work for this. Could someone recommend whether I would be better off with an adjustable op-amp like the LM358's, or an adjustable 20-gain LM386? Or is it not a good idea to hook either of those up to the output from a MCP4725?

Thanks!

I need to output square waves with adjustable width (in microseconds),

This is the definition of PWM, not a "square wave".

An op amp can increase the voltage of a signal, but the choice of op amp depends on your requirements for the output voltage, the slope of the rising and falling edges (the rise/fall time) and the current that must be delivered to the load.

What are those requirements?

jremington:
This is the definition of PWM, not a "square wave".

I understand PWM. I need the wave [perhaps signal is a better word] to be continuous and analog, with a width that I set externally - averaging around 300 microseconds. Since spacing will be ~ 500 to 1000 ms, I'll create pulses using pin-high / pin-low commands with delayMicroseconds() in between, inside a for() loop with delay() to set the between-pulse spacing.

jremington:
An op amp can increase the voltage of a signal, but the choice of op amp depends on your requirements for the output voltage, the slope of the rising and falling edges (the rise/fall time) and the current that must be delivered to the load.

What are those requirements?

Well, ideally I'd like it to be square - rise and fall as fast as possible. I need the current to be up to ~250 mA. The goal is to greate a pulse of current in the gap between electrodes in a conductive buffer.

Thanks for your help.

ETA: to be clear, here is the code that I'll use to make a pulse train. I haven't set the pins yet:

void pulseTrain() {
case 0:

dac.setVoltage(voltage, false);

for (int i=0; i <= durationLoops; i++){
digitalWrite(outPin, High);
delayMicroseconds(pulseWidth);
digitalWrite(outPin, Low)
delay(delayTime);
}

break;
}

portusjacksoni:
Well, ideally I'd like it to be square - rise and fall as fast as possible.

Can you translate "as fast as possible" to values. picosecond risetimes are possible, EXTREMELY
EXPENSIVE but possible...

Anyway with 300us width, its reasonable to presume something like 10us rise/fall times are plausible, which
is perfectly within the realm of audio amplifiers. But you require a dc-coupled amplifier for pulses, you
that will limit which audio class amplifiers are usable, often the biasing requirements assume ac-coupling
and many will cut out on a signal with an appreacable dc-offset...

I'd venture something like an opamp driving a push-pull current buffer.

BTW the LM358 is completely hopeless for this application. Its not able to handle the audio bandwidth.

250 mA is quite a high current and very few op amps can supply that.

You still haven't stated the required output voltages or the rise time of your PWM signal.

MarkT:
I'd venture something like an opamp driving a push-pull current buffer.

BTW the LM358 is completely hopeless for this application. Its not able to handle the audio bandwidth.

Thanks! That saves me some troubleshooting. 10 us would work.

jremington:
250 mA is quite a high current and very few op amps can supply that.

You still haven't stated the required output voltages or the rise time of your PWM signal.

Oh I see, when I said that I need about 10 db above the Arduino's current of 5v, that meant I need ~15v max. 10v would likely do the job; I just wanted a safety buffer. However it looks like I made an even more basic mistake - I forgot to check whether I had enough current! It looks like I will need to change my design completely. We have regulatable DC power supplies lying around the lab, so I'll use the Arduino to control an interruptor on the line from one of those power supplies.

I don't see why you have to use an external DAC to generate square waves.
An Arduino (PWM) pin can do that.
Leo..

portusjacksoni:
Thanks! That saves me some troubleshooting. 10 us would work.

Oh I see, when I said that I need about 10 db above the Arduino's current of 5v, that meant I need ~15v max. 10v would likely do the job; I just wanted a safety buffer. However it looks like I made an even more basic mistake - I forgot to check whether I had enough current! It looks like I will need to change my design completely. We have regulatable DC power supplies lying around the lab, so I'll use the Arduino to control an interruptor on the line from one of those power supplies.

Interruptor?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

What is the application of your project?
What is the output signal you are making going too?

Thanks.. Tom... :slight_smile:

portusjacksoni:
However it looks like I made an even more basic mistake - I forgot to check whether I had enough current! It looks like I will need to change my design completely.

The solution that immediately pops to mind is using one output to generate the pulse, and another with a significant capacitor it driving a single transistor (either bipolar or mosfet [not "misfit", you stupid spellchecker!]) for the amplitude--unless the top of the wave fading slightly is a problem. For that matter, I suppose it could drive a triac, too.

hawk

dochawk:
The solution that immediately pops to mind is using one output to generate the pulse, and another with a significant capacitor it driving a single transistor (either bipolar or mosfet [not "misfit", you stupid spellchecker!]) for the amplitude--unless the top of the wave fading slightly is a problem. For that matter, I suppose it could drive a triac, too.

hawk

That’s some funny stuff! A few more sentences and you’d be approaching the retro-turbo-encabular class of silliness. A short kneed hamming pentode might work as well for those fading wave pulses.

short kneed

Where can one buy that particular version of the Hamming pentode?

I've seen only the knock kneed type.

jremington:
Where can one buy that particular version of the Hamming pentode?

I've seen only the knock kneed type.

Where else? A hamfest, of course.

I’ve always had good luck finding perfectly matched pairs in the older SuperDuoDyne vertically challenged hyper-trapezoidal wave generators. I always look for the shorter 1U height units, they use the hamming versions rather than the older, knock based translators.

Good hunting, nothing worse than buying one for a good price and getting it home, opening it up and finding nothing but the obsolete tungsten based counter-rotating axial thermonic interrupters inside.

Thanks for the tip!

A tungsten based unit would indeed be a real bummer, but at least you would have experienced the thrill of the hunt.

avr_fred:
Where else? A hamfest, of course.

I’ve always had good luck finding perfectly matched pairs in the older SuperDuoDyne vertically challenged hyper-trapezoidal wave generators. I always look for the shorter 1U height units, they use the hamming versions rather than the older, knock based translators.

Good hunting, nothing worse than buying one for a good price and getting it home, opening it up and finding nothing but the obsolete tungsten based counter-rotating axial thermonic interrupters inside.

I had the new SuperDuoDyne, it was a red one, but the knobs fell off... :o

MarkT:
Interruptor?

Sorry, I meant a relay module.

Wawa:
I don't see why you have to use an external DAC to generate square waves.
An Arduino (PWM) pin can do that.
Leo..

I don't want a DAC to create square waves, I am using HIGH/LOW commands for that. I want a DAC to modulate the output voltage. The problem is I need to amplify the output (5V max is not enough), AND I need more current. So I'm going with an external power supply run through a relay unit.

That setup works - howEVER now I see that my external DC power supply gets upset when there's no load (i.e. when the relay circuit is open).

So here's what I hope is my final question - I want to create a small, constant load to keep the power supply happy when the relay circuit is open. I suppose I could use something as simple as a LED spliced into the common and NC pins on the relay unit. The idea is that I can then set the voltage output of the power supply (it is adjustable) to the voltage I need plus the voltage pulled from the LED. Would that work?

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What is your external supply?
Please include it in your schematic.

Thanks.. Tom.. :slight_smile:

TomGeorge:
Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What is your external supply?
Please include it in your schematic.

Thanks.. Tom.. :slight_smile:

Thanks Tom, I attached a schematic. The company that makes our power supply does not exist any more, but it is functionally identical to similar products like this one:

It looks like I either need a dummy load in the position of the question mark in my diagram, or else I need to find a power supply that doesn't mind being interrupted.

T

Hi,
Thanks for the diagram.
OPs diagram.


Tom... :slight_smile:

OK folks, I might have figured it out. I could use a MOSFET (2N700-G) as a dummy load, with an adjustable step-down power supply (DROK LM317) and tune it so the MOSFET has the same resistance as my 'experimental' load (electrodes in a conductive solution). The electrodes draw about 30 mA at 15V, which I think that MOSFET can do with a gate-sink differential of about 2.5V.

Using a two-channel relay, I can switch the MOSFET off by closing relay #1 while at the same time switching the current to my electrodes by closing relay #2.

Does this sound like it could work? Here's a diagram that explains what I have in mind, and I attached it in case the image hosting is weird.