Op amp for RC servo audio-controlled

Thread Starter

seitam

Joined Jul 27, 2013
5
Hey,

I have done a deep search in order to figure out this question on this forum and I have not found it, so here we go:

I am developing a project that consists in controling a micro servo motor using the audio output of a smartphone (iphone/android, etc).

I have used this scheme: (source: http://www.gluemotor.com/how-to-make)



I also made the control signals (50hz, 1-2ms pulse) with matlab, and exported in .wav format.

Right now I am able to control up to 2 servo motors (one per audio channel) with my iphone, just reproducing the audio files.

The main problem is when I try to do this with an android-based smartphone. All the android devices that I have used so far are not able to provide enough signal to run the servomotors.
I read about how the control signal must be. I found that it is just a voltage signal that uses the values 0-5v. (0 for no signal and 5v for the peaks).
I have not an oscilloscope, but I am pretty sure that the android devices that I have tested do not provide the voltage required of 5v.

So to fix this problem I need to amplify the signal in order to get 5v on the peaks.
I though that operational amplifiers may help me. So I get some 741 op-amp's and I mouted using the non-inverting scheme.

The problem is that the output signal not works with the servos. I have used a 1.5 battery to test the circuit (input), and the output was 2.75V using a 2.2k and 4,6k resistor.

So the circuit seems to work well with a DC signal.

Anybody can figure out where is the problem? I am using a 5v cellphone transformer to feed the op amp.
I read that the op amps like 741 are able to manage signals with no much delay and distortion below 1mhz, so the signal generated for the servos should not be a problem.

I am completely lost, any help will be fantastic.

Sorry for my bad english.
 

wayneh

Joined Sep 9, 2010
17,496
You could try doubling C1 and C2, which could be accomplished by placing additional caps of the same capacity in parallel. I'm thinking you should be able to get this to work with any audio source.

To help you with your op-amp approach, we'd need to see a schematic of what you put together. The 741 is the oldest op-amp you can buy, and not the best for what you're trying to do.
 

THE_RB

Joined Feb 11, 2008
5,438
If you put a 2 resistor voltage divider on the white pin to the RC servo, you can bias the white pin at somewhere between 0v and 5v.

That will be an average DC voltage, so with the AC signal applied you can set the peak at 5v and the low at 0v.

A pot might be a good idea as you can easily tweak the DC bias. I would start with 50k and see how that goes.
 

Thread Starter

seitam

Joined Jul 27, 2013
5
Thank you for your comments!

I forgot to mention that I removed the C1 and C2 capacitors, the servomotors just do not work using capacitors between the stereo plug and the input control signal. I send an email to the owner of this scheme (kazuhisa terasaki), because I didn't know why we need to put this capacitors. Nowadays I still thinking about his functionality. (I am so much limited in electronics knowledge).

THE_RB: I do not understand your solution. I believed that I need to boost the signal and your propose is based on aplying a voltage divider?

The overall project is a slider for doing timelapses. It will be controlled using the audio-output of a smartphone. I am developing the application that will generate the sounds for controll the servomotors and also will take the photos with the integrated cam. Then will renderize a video using all the photos captured.

I want a portable slider, so it will powered up using 4 1.5v batteries. That will be the only power source and thats why I am trying to amplify the signal feeding the 741 with only 5 volts.

I am explaining all this because I do not understand how can I get a 5v peak using a voltage divider from a source that is below that 5v.

Here is the scheme that I am using (sorry for the bad quality)



And another time, thank you!
 

THE_RB

Joined Feb 11, 2008
5,438
What we really need are some oscilloscope screenshots showing the amplitude and DC offset of the driving waveform.

If you are using the headphone outlet on the smartphone that is probably capacitor coupled anyway, again we don't know without the 'scope screenshots.

The original cap values in your post #1 are too small, for a 50Hz type squarewave you need large caps like 100uF or 220uF.
 

Thread Starter

seitam

Joined Jul 27, 2013
5
What we really need are some oscilloscope screenshots showing the amplitude and DC offset of the driving waveform.

If you are using the headphone outlet on the smartphone that is probably capacitor coupled anyway, again we don't know without the 'scope screenshots.

The original cap values in your post #1 are too small, for a 50Hz type squarewave you need large caps like 100uF or 220uF.
Ok, problem fixed!

The main problem was that the Vcc of 5v was not enough voltage to power up the 741.
I have used a LM324N with a 100uF Capacitator. With the LM324N I am able to amplify up to 4 control signals.

Thank you very much,

Seitam.
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
Congrats! :)

It would help others who might have a similar project if you could post your final working schematic?

Being able to drive two RC servos from an MP3 file on any phone or player might be a useful application to many people. :)
 

Thread Starter

seitam

Joined Jul 27, 2013
5
Congrats! :)

It would help others who might have a similar project if you could post your final working schematic?

Is as simple as follow the scheme of the first post, changing the capacitor for a 100uF one.
Betweeen the RC servo and the capacitor we have to mount a LM324N (because of the low input voltage specs [3-32V]). We can amplify up to 4 signals (we only need 2, one per channel). Finally, following the non-inverting scheme of the op-amps:



And using a 2.2 and 4.6 resistors we will get about x2 amplified signal, enough to run a servomotor with almost every smartphone on the market.
 
Top