Go Down

Topic: Problem with Op Amp (Read 7814 times) previous topic - next topic

andrewferguson

Hello everyone,

I am currently attempting to complete a project in which I am turning an old chart recorder into a plotter, however I have come across an issue involving the Op Amp circuit I am using to amplify a signal from the 5v Arduino to the 15v plotter.

I was initially planning to use the 741 Op Amp, however yesterday I realised that it required a bipolar power supply, which the plotter could not provide. I therefore bought a KIA358P single supply Op Amp from Maplin, which I hoped would solve the problem.

I wired it up today, however it constantly outputs 10.87v no matter whether 5v is inputted into the op amp or not. I looked at the circuit but could not come up with any reason for why it was not working.

Does anyone have any idea why this is not working? I have attached a photo of my circuit diagram to allow you to see what I am trying. One small difference between the circuit diagram and what I am currently trying is that I am currently powering the circuit from an external 12v power supply, rather than the 15v supply from the plotter.

Thanks,
Andrew

MarkT

#1
Apr 09, 2015, 10:56 am Last Edit: Apr 09, 2015, 10:56 am by MarkT
What voltage do you see on the chart recorder input with nothing connected?

Do you know the input impedance of the chart recorder?

What was driving it before?

Do you have decoupling on the opamp? 
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

andrewferguson

Hi,

The purpose of the op amp is not to go to the input terminal of the chart recorder. Instead, I am using it to send a pulse to a SAA1027 stepper motor driver IC. I can manually pulse the stepper by tapping a 12/15 v wire against the appropriate pin, however I need to be able to pulse the stepper from the 5v Arduino, hence the need to use an op amp to amplify the voltage. (The SAA1027 requires a minimum of 7.5v to count as a HIGH signal).

I am not using decoupling on the op amp, because right now I do not have the necessary capacitors. However, I don't thinks that the lack of decoupling would cause the output from the op amp to remain at 10.87v.

Right now, the op amp is not connected to the chart recorder. Instead, I have connected it to a standard 12v DC power supply and am checking the output voltages with a multimeter.

One possible thought I had for th source of the problem would be that both the ground from the Arduino and the ground from the plotter / 12v DC supply are connected together. I hope that is is not the source of the problem, because this is necessary for the other circuitry that I am using.

Any ideas?

Thanks for your help,
Andrew

Wawa

#3
Apr 09, 2015, 11:30 am Last Edit: Apr 09, 2015, 11:33 am by Wawa
Schematic diagram looks ok.
Opamp amlifies 3times with these resistor values.
What you put in, you get out x3.
With a maximum of 1-1.5volt below the supply voltage.

Try to connect the +input to ground, and see what the output does.
It should be close to 0volt.

Wouldn't this have been easier with one small FET (2N7000) or transistor, with a 1K drain/collector resistor to +15.
Arduino outputs are digital. You don't need an analogue opamp for this.
Leo..

MarkT

#4
Apr 09, 2015, 11:38 am Last Edit: Apr 09, 2015, 11:39 am by MarkT
Chart recorders are analog devices, not digital!

My suspicion is that it needs a beefy driver, not a control voltage.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Wawa

#5
Apr 09, 2015, 11:39 am Last Edit: Apr 09, 2015, 12:04 pm by Wawa
Does the Arduino have an analogue output?

MarkT

We would assume a RC filtered PWM pin would be driving the opamp...
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Wawa

#7
Apr 09, 2015, 11:47 am Last Edit: Apr 09, 2015, 12:10 pm by Wawa
So connect the +in to ground, and see if the opamp outputs ~0volt.
Then connect the +in to 3.3volt, and see if the opamp outputs 9.9volt.

The purpose of the op amp is not to go to the input terminal of the chart recorder. Instead, I am using it to send a pulse to a SAA1027 stepper motor driver IC.
http://www.thebox.myzen.co.uk/Workshop/Motors_3.html
Bottom of the page.
Here I see two simple digital transistor level shifters on the inputs of the SAA1027.
Leo..

andrewferguson

#8
Apr 09, 2015, 12:25 pm Last Edit: Apr 09, 2015, 01:05 pm by andrewferguson
Hi everyone,

Thanks for the advice!

To Wawa, thank you for the link to the schematic, it looks interesting, however I am unsure how it works because the schematic shows pin 15 of the SAA1027 connected to 12v through a 20k resistor before it links into the transistor, surely that will mean pin 15 will always register as HIGH?

EDIT: After looking at the circuit, I think I now understand this. The 20k resistor is a pullup resistor that connects the pin to 12v, so when the transistor is not saturated the pin is HIGH, and when the transistor is saturated, the pin is connected directly to ground and therefore is LOW. Am I right?

Quote
So connect the +in to ground, and see if the opamp outputs ~0volt.
Then connect the +in to 3.3volt, and see if the opamp outputs 9.9volt.
I have tried that, and no matter what +in is connected to, the opamp outputs 10.87v. However, if I remove the ground from the Arduino, it works as expected. I am not sure why this is, but unfortunately the ground of the Arduino is connected to the ground of the chart recorder in another circuit, so that part cannot be altered.

Thanks,
Andrew

Wawa

#9
Apr 09, 2015, 01:03 pm Last Edit: Apr 09, 2015, 01:15 pm by Wawa
I am unsure how it works because the schematic shows pin 15 of the SAA1027 connected to 12v through a 20k resistor before it links into the transistor, surely that will mean pin 15 will always register as HIGH?
Yes, it's known as a level shifter.
R3 pulls the pin up (to the SAA1027's supply rail). And T2 pulls the pin to ground.
If R4 is left unconnected, or is grounded, SAA pin 15 will be high.
R4 can directly be connected to Arduino's 5volt pins.
A high on the Arduino pin is a low on the SAA1027 pin.
Inverted logic means that you might have to change your code.

Don't know what's wrong with the opamp. Check your wiring again.
The opamp only looks at the voltage between it's +in and it's own ground.
Leo..

P.S. Looks like that article is written by Grumpy_Mike.
He is also on this forum...

 

andrewferguson

Hi,

Thanks for that. I now understand. I may alter the circuit slightly, because the SAA1027 is already connected in the chart recorder and the pin is LOW when there is no pulse, and therefore my transistor will need to send a HIGH signal to pin 15 to get the stepper motor to function.

Thanks,
Andrew

Paul__B

I think many people have failed to discern that you do not want to "amplify" an analog signal (which the Arduino dies not in any case provide) but simply to drive a 15V control input.

This is not a job for an "Op-Amp" at all!  Do not even attempt to use one.  Use Mike's circuit.  You can adjust your code to account for whether you need to drive the SAA1027 input high or low at any given moment.


andrewferguson

Hi all,

After experimenting with this for a while, I am still unable to get it to work. To clarify the goal of this: I want to be able to use the PWM Frequency Library to drive the pulse input for the SAA1027 stepper motor driver IC. I have succeeded in getting the PWM Frequency Library to generate the pulse, but it it 5v, and the SAA1027 requires a minimum of 7.5v to count as a HIGH signal.

I wired up Mike's circuit, however it did not work - the motor did not move at all. I think this is because the SAA1027 is already wired into the circuitry of the chart recorder, resulting in pin 15 already being  connected to ground. (The chart recorder uses pulses from 0v to 15v, unlike Mike's circuit which uses pulses from 15v to 0v).

I have managed to successfully make the stepper move by manually tapping a wire taken from the chart recorder's own 15v DC supply against pin 15.

What I basically need is a relay-type transistor circuit, so whenever the circuit receives a 5v pulse from the Arduino, it connects the 15v supply of the chart recorder to pin 15 of the SAA1027. Does anyone know how I can do this with minimal components?

Thanks,
Andrew

MarkT

It would have been useful to know about the SAA1027 from the start - we can't mind read!

opto couplers or level shifter using NPN transistor are the obvious approaches.  opto coupler
is more robust.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

andrewferguson

Hi MarkT,

Thank you for your advice. I have looked for opto couplers on the Maplin website (I can easily get parts from Maplin), and found a few, however the do not give the specific model number of the opto coupler, or say its maximum speed. Would you be able to help?

The maximum speed I would need is around 250Hz. Would any of these:
http://www.maplin.co.uk/p/low-current-opto-coupler-cy94c
http://www.maplin.co.uk/p/phototransistor-quad-opto-isolator-yy63t
be any good?

Also, are there any external components required when using opto couplers?

Thanks,
Andrew

Go Up