Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 8th January 2008, 10:41 AM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default differential signal

I am creating a differential analog signal from the pwm of a dspic30f microcontroller. I have filtered the pwm signal and get a nice analog output using a simple r/c filter. The next step is to get a +/-10V signal from my 0-5V output. I have a couple of ideas and thoughts about how to do this. Any suggestions or comments would be greatly appreciated.

1. Use the single pwm output into an op amp with basically a 2.5V offset. This way the op amp output is 0 when the pwm is at 50%.
A. The drawback i see to this is if the pwm, for whatever reason doesn't come on or stops, the op amp output will go to -2.5 Volts.
1. A solution to this might be to run the op amp output through a switch, so that if the controller quits, the switch opens and the output falls back to zero.
B. Another drawback is startup where the pwm starts at zero, there would be a bit of time that will leave the output at -2.5V. This could also be solved by a switch at the output of the op am.

2. I like this one better: use two pwm channels and drive a fully differential op amp with them. If ch 1 is at 100% duty cycle, 2 at 0% , the input to the amp is 5V, If ch 2 is at 100% and 1 at 0%, the input to the amp is -5V.
A. The drawback is the use of two channels, and the synchronization of the two in software, and possibly the crossing over the zero point.

Please let me know your thoughts on the matter
jnnewton is offline   Reply With Quote
Old 8th January 2008, 11:06 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

I think you're making this FAR too complicated - all you need is a simple inverting opamp on the final analogue filtered output - exactly as you use for the balanced output from a PA preamplifier.

In your case you would require two opamps, one to give the required output levels, and the other to invert it.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 8th January 2008, 11:40 AM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

From what you said, my output would then always be negative right? This is not the objective. I am trying to output a signal that varies from 10 to -10V from a pwm channel. if I can output a filtered signal from 0-5V and then the first amp has a gain of 2, i now have 0 to 10V, and then if i invert it, i now have 0 to -10V...or did i miss something?

Also, I really want to have the output be 0V when the pwm signal(s) are off.

Last edited by jnnewton; 8th January 2008 at 11:44 AM.
jnnewton is offline   Reply With Quote
Old 8th January 2008, 11:53 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by jnnewton
From what you said, my output would then always be negative right? This is not the objective. I am trying to output a signal that varies from 10 to -10V from a pwm channel. if I can output a filtered signal from 0-5V and then the first amp has a gain of 2, i now have 0 to 10V, and then if i invert it, i now have 0 to -10V...or did i miss something?
Yes you are missing something, you give the first opamp a gain of 4, and an offset to give an output of 10V to -10V

Quote:

Also, I really want to have the output be 0V when the pwm signal(s) are off.
Assuming you're filtering to get an AC waveform? (sinewave or whatever) then simply capacitor couple the input to the first opamp - this would also probably remove the requirement for your offset voltage.

But as with many things, as you're not giving us any clue what you're trying to do, it's hard to make suggestions.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 8th January 2008, 12:46 PM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

Quote:
Assuming you're filtering to get an AC waveform? (sinewave or whatever) then simply capacitor couple the input to the first opamp - this would also probably remove the requirement for your offset voltage.

But as with many things, as you're not giving us any clue what you're trying to do, it's hard to make suggestions.
Sorry, maybe this will help:
I have a servo motor amplifier which accepts a differential voltage as a velocity reference. I am trying to create a circuit to control the drive. I will be sending the voltage (velocity) and watching the encoder coming back to control the position of the motor.
I have just hooked up an instrumentation amp (to get both the gain and the offset. It works ok, but I wanted to try to do something where i can use the fault feature of the microcontroller. It allows an override of the pwm to pull the pins to a pre-defined state (5V or 0V). I would like to pull to 0V.
jnnewton is offline   Reply With Quote
Old 8th January 2008, 01:03 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

The output of the microcontroller doesn't really matter - what output do you want on the differential outputs?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 8th January 2008, 01:21 PM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

There are two possibilities:
1. both signals vary positively with respect to gnd;
Time Speed Vref+ Vref- Voltage (Vref+ - Vref-)
0 0 0 0 0
1 2700 10 0 10
2 2700 10 0 10
3 0 0 0 0
4 -2700 0 10 -10
5 -2700 0 10 -10
6 0 0 0 0

2. only the first signal varies;
Time Speed Vref+ Vref- Voltage (Vref+ - Vref-)
0 0 0 0 0
1 2700 10 0 10
2 2700 10 0 10
3 0 0 0 0
4 -2700 -10 0 -10
5 -2700 -10 0 -10
6 0 0 0 0
jnnewton is offline   Reply With Quote
Old 8th January 2008, 01:29 PM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

The values are not discrete, see attached to avoid confusion (x-axis is time, y is voltage)
Attached Images
File Type: jpg Voltage(1).jpg (19.2 KB, 7 views)
File Type: jpg Voltage(2).jpg (17.6 KB, 5 views)
jnnewton is offline   Reply With Quote
Old 8th January 2008, 02:30 PM   (permalink)
Experienced Member
gootee is on a distinguished road
Default

Quote:
Originally Posted by jnnewton
I am creating a differential analog signal from the pwm of a dspic30f microcontroller. I have filtered the pwm signal and get a nice analog output using a simple r/c filter. The next step is to get a +/-10V signal from my 0-5V output. I have a couple of ideas and thoughts about how to do this. Any suggestions or comments would be greatly appreciated.

1. Use the single pwm output into an op amp with basically a 2.5V offset. This way the op amp output is 0 when the pwm is at 50%.
A. The drawback i see to this is if the pwm, for whatever reason doesn't come on or stops, the op amp output will go to -2.5 Volts.
1. A solution to this might be to run the op amp output through a switch, so that if the controller quits, the switch opens and the output falls back to zero.
B. Another drawback is startup where the pwm starts at zero, there would be a bit of time that will leave the output at -2.5V. This could also be solved by a switch at the output of the op am.

2. I like this one better: use two pwm channels and drive a fully differential op amp with them. If ch 1 is at 100% duty cycle, 2 at 0% , the input to the amp is 5V, If ch 2 is at 100% and 1 at 0%, the input to the amp is -5V.
A. The drawback is the use of two channels, and the synchronization of the two in software, and possibly the crossing over the zero point.

Please let me know your thoughts on the matter
By "differential signal", do you mean the usual two conductors carrying opposite-phase copies of the signal? In that case, you could just use two unity-gain opamps, with one being inverting (essentially an "unbalanced to balanced converter"). At the receiving end, you would just use an opamp configured as a differential amplifer, or an instrumentation amplifier circuit. (See AN-31 at national.com, for simple differential amp and instrumentation amp opamp circuits.)

If, on the other hand, you just want to change the single-ended 0-5v to single-ended +/-10v, then just capacitively couple the 0-5v to a 4x amplifier. If you can't use AC coupling, maybe you could use an opamp configured as a differential amplifier, with a gain of four, and a reference voltage on the negative input.

That was all just off the top of my head. So I suggest downloading LTspice from linear.com and trying it as a simulation, using a simple ideal voltage source to simulate your 0-5v output.

- Tom Gootee

http:/.www.fullnet.com/~tomg/index.html
gootee is offline   Reply With Quote
Old 9th January 2008, 01:45 PM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

Quote:
"differential signal", do you mean the usual two conductors carrying opposite-phase copies of the signal?
no.

Quote:
If, on the other hand, you just want to change the single-ended 0-5v to single-ended +/-10v, then just capacitively couple the 0-5v to a 4x amplifier. If you can't use AC coupling, maybe you could use an opamp configured as a differential amplifier, with a gain of four, and a reference voltage on the negative input.
No, there is no ac component to the signals after lp filtering. I do not want to use a reference voltage. I am going to put together a dual pwm through a fully differential op amp circuit, the parts will be here in a few days. Whether or not this will work....i don't know.

For some reason I am not getting my objectives across here. when looking at the previously posted pictures of the output required, assume that the time scale on the x axis is in seconds and any section can be varied (slope, time, magnitue).

This is a trapezoidal velocity profile for positioning a servo motor. This is common in industry and used for may applications, both for positioning and velocity control.
jnnewton is offline   Reply With Quote
Old 9th January 2008, 04:17 PM   (permalink)
Experienced Member
 
Roff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to behold
Default

Why can't you do it like this:
Attached Images
File Type: png single-ended to diff sch.PNG (14.0 KB, 13 views)
File Type: png single-ended to diff waves.PNG (15.5 KB, 5 views)
Attached Files
File Type: asc single-ended to diff.asc (2.0 KB, 1 views)
__________________
Ron


Last edited by Roff; 9th January 2008 at 04:23 PM.
Roff is offline   Reply With Quote
Old 9th January 2008, 05:59 PM   (permalink)
Experienced Member
jnnewton has a spectacular aura about
Default

Looks promising, what did you use to simulate this? What are the values of the outputs when the input signal is zero?
jnnewton is offline   Reply With Quote
Old 9th January 2008, 08:00 PM   (permalink)
Experienced Member
 
Roff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to behold
Default

Quote:
Originally Posted by jnnewton
Looks promising, what did you use to simulate this? What are the values of the outputs when the input signal is zero?
I used LTspice (SwitcherCAD III) from Linear Technology. It's free.
When PWM=0, +out=-5, -out=+5. If you want them to both be zero, you have to somehow distinguish between a valid zero volts and an invalid zero volts. Now, if PWM=0 and vcc=0, the outputs will both be zero. So, if you can guarantee that the PWM is always valid when vcc is on, you're OK, except maybe during the vcc transition.
__________________
Ron

Roff is offline   Reply With Quote
Old 9th January 2008, 08:04 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by jnnewton
Looks promising, what did you use to simulate this? What are the values of the outputs when the input signal is zero?
Which was exactly what I proposed, but without the diagram - and why I asked what output you required?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 9th January 2008, 08:24 PM   (permalink)
Experienced Member
 
Roff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to beholdRoff is a splendid one to behold
Default

Quote:
Originally Posted by Nigel Goodwin
Which was exactly what I proposed, but without the diagram - and why I asked what output you required?.
One schematic is worth several words.
EDIT: I just realized the signal levels in the first schematic I posted are half what is required. Here's the correction.
Attached Images
File Type: png single-ended to diff sch.PNG (13.9 KB, 5 views)
File Type: png single-ended to diff waves.PNG (15.5 KB, 3 views)
Attached Files
File Type: asc single-ended to diff.asc (2.0 KB, 0 views)
__________________
Ron


Last edited by Roff; 9th January 2008 at 08:33 PM.
Roff is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
The Oscilloscope ElectroMaster Electronic Theory 12 3rd February 2008 01:45 PM
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 09:48 PM
Anybody got information on line driving a c-sync signal? FusionITR General Electronics Chat 8 15th April 2006 04:16 PM
Differential transformer how to measure this signal sardineta Electronic Projects Design/Ideas/Reviews 18 7th October 2004 02:30 PM
ground referencing a differential input signal giaracam Electronic Projects Design/Ideas/Reviews 2 22nd September 2004 12:41 PM



All times are GMT. The time now is 05:22 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.