Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help to amplify a signal

Status
Not open for further replies.

rimip

Newbie level 6
Joined
Nov 7, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,396
Hello guys,
I need help with a project. I am evaluating a signal coming out of a RC receiver, which is a servo signal.
I put the signal through a RC filter circuit, and it ranges from 0.22V to 0.28V DC.

I want to read this value into the microcontroller to come up with a PWM 10 bit number, which ranges from 0-1023 BUT, only from 0.23V to 0.28V.

I have tried to put it through op amps, with a gain of 10, so that I get 2.2V to 2.8, but still, the range is very small and I am having trouble with the equations in my programing.

Is there's a way to make the signal more "prepared" for the MC, to increase its range?
 

I would be inclined to look at the signal before your RC filter first, it may be more usable in its original form.
Failing that, and assuming you want to keep the voltage between 0 and 5V, I would suggest three stages, firstly amplify x10 to get 2.2 to 2.8V, secondly, offset the voltage by 2.2V to shift the lowest possible reading to zero and finally, amplify the 0 to 0.6V remainder by x8.3 to get 0V to 5V. You can probably do all this in two op-amps.

You could offset the original voltage first but then any errors in the offset voltage itself would have a large effect on the result.

Brian.
 
  • Like
Reactions: rimip

    rimip

    Points: 2
    Helpful Answer Positive Rating
Thanks for replying.
I only have one capture/compare/PWM channel on my Microcontroller, so I can't really evaluate the square waves coming out of the receiver with that pin, because I am actually using that pin to make PWM and that is why I am looking to make it a number from 0-1023 from 0-5V. And I don't even know how to use it that's another reason I'm stuck to just analyzing the analog value.

Also, would it be possible to offset the 2.2V without using any negative supply on my LM324?
Can you help me with that. I just know basic op amps and design gain circuit but I am completely lost when in comes to adding an offset?

Thanks.

p.s. My ultimate goal is to scale the receiver output and read it in the MC, then come up with a PWM signal that is proportional to the RC receiver's amplified signal. So for example, 0.22V would be 0% duty cycle and, 0.28V would be 100% duty cycle.
 

How about using this single capture/compare/PWM pin to input the digital servo signal, and output a software PWM - interrupt based - on a general purpose output?
 

I would want to get this done with op amps.
Also because right now im experimenting with only one CCP pin, evetually, I will get a microcontroller with more CCP pins because I need the most hardware PWM pins I can get for my application.
 

If your RC signal isn't too fast you can still capture it and time it's duration, it will be at least as accurate as your analog solution and uses fewer parts.
To offset with an op-amp, remember that the inputs are differential, meaning that if you put a positive voltage on the inverting input it subtracts from the signal on the non-inverting input. All you have to do is arrange for 2.2V to be present on the inverting input. A negative supply is not needed.

Brian.
 

The problem you are having is that there is a large DC offset in the signal, so you can not easily amplify it enough. I would recommend adding in a negative offset in one op amp circuit with low gain, and then following it up with a higher gain op amp. This is easy to do if you have dual supplies +/-....do you have dual supplies available.

An example, take your .22 to .28 volt signal, add -.20 to it to get 0.02 to 0.08. Now amplify by 40, and you get 0.8 to 3.2 volts. You can derive the negative offset voltage from a 2.5 volt reference diode and a resistive voltage divider.

Rich
MaguffinMicrowave LLC
www.maguffinmicrowave.com
 

Maybe you can also increase the voltage range (0.22V to 0.28V) by changing the filter?
Did you check the digital signal with scope? Maybe your filter input impedance is too low, loading the receiver output, and attenuating the signal?
 

if you look at the 'adder' configuration of the op-amps, there is a second arm going to the inverting terminal of the op-amp. you can feed a fixed positive voltage 2.2V (using a resistor voltage divider) to that input and the amplified (2.2~2.8V) signal to the positive side. This can eliminate the need for using negative supply and any single supply op-amp would suffice.
just take care that the performance of the selected op-amp should be satisfactory near the Ground (0V) level.
 

yoramgr, I tried to put the signal on the scope and all I can tell was that it was perfect square wave meant for a servo motor. I don't own a scope, that was the scope at school.

And like you guys suggested, I put in the fixed supply to substract the offset (I used a pot) but I am still having trouble stretching the signal larger enough.
I cannot decrease the voltage to zero by turning the pot, the least I get is like 0.04 volts. That adds up to more offset after multiplying it by like 30.
I will probably post a schematic of the circuit later when I get home.
Thanks.
 

And like you guys suggested, I put in the fixed supply to substract the offset (I used a pot) but I am still having trouble stretching the signal larger enough.
I cannot decrease the voltage to zero by turning the pot, the least I get is like 0.04 volts. That adds up to more offset after multiplying it by like 30.
I will probably post a schematic of the circuit later when I get home.
Thanks.

if you are using a single supply, it is better to raise your reference minimum level (output of your op-amp) a little bit above zero to ensure better linearity. you can always subtract the offset at the microcontroller end digitally in your code. as you need a 10 bit resolution, use an ADC having a higher resolution ( say 12/14 bit) to ensure that no information is lost.

alternatively, if you require a single chip solution,and confident at coding and i2C, you can directly connect your DC signal to a 18-bit ADC like mcp3421 and configure its PGA to X8 to get the desired accuracy. after all, uCs are there to make life a lot simpler.
:-D
 

sounds like the problem is a big huge DC offset. One easy cheesy way of getting rid of that would be to amplify the signal with a ten gain as has been suggested earlier, and then use a schmitt trigger with Vcc set somewhere just under 2.8, and then you would get a square wave output, which can then be further amplified or buffered.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top