Go Down

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

MorganS

Yes, an optocoupler requires a resistor on the input side - it's just an LED, like any other.

Note that optocouplers have very wimpy output transistors. If the circuit won't work with the 2n70000 then it probably won't with the bare optocoupler and you would need to amplify its output with a bigger transistor.

How much current does the thing draw when you connect the input to 15V? Please measure it. I suspect that it requires more current than the pullup resistor was supplying. You can use a lower value resistor, so long as it's within the power capacity of the transistor.

"The problem is in the code you didn't post."

Paul__B

Still wasting time until the actual circuit of the device being controlled is determined and detailed here.

polymorph

FYI: Unless you are using optocouplers, the grounds -must- be shared.

All unused Op Amp and comparator sections MUST BE PROPERLY TERMINATED. If not, it may latch up or burst into oscillation and spoil the operation of the other sections through the common substrate.

DO NOT SIMPLY GROUND EVERY PIN NOT USED!

Do this:


More information, but please note that Figure 2 is how NOT to do this:
http://www.electronicproducts.com/Analog_Mixed_Signal_ICs/Amplifiers/Properly_terminating_an_unused_op_amp.aspx
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

andrewferguson

Hi polymorph,

Thank you very much. I did not realise that you had to terminate the other outputs on the op amp. Once I had done this I could get the op amp to take the voltage from the Arduino and amplify it up to 12.99v.

However, for some reason, I cannot get this voltage to control the SAA1027.

I have connected the ground of the Arduino / Op Amp to the ground of the chart recorder, and manually tapped the wire with the 12.99v output from the Op Amp onto pin 15 of the SAA1027 IC, expecting to hear the stepper motor pulse. Unfortunately, nothing happened. I have previously managed to get the stepper to pulse by tapping a wire from the 15v of the chart recorder onto pin 15, and also by tapping a wire from an external 12v power supply. The fact that it worked with 15v and 12v makes me think that it is not too picky about voltages - and therefore should not mind the 12.99v from the Op Amp.

Does anyone know why the output from the Op Amp is not driving the stepper, but the chart recorder's own 15v supply and an external power supply are?

To Paul__B, it is unfortunately not possible (or not easy) to post a circuit diagram for the chart recorder. It is an old (1982) electronic chart recorder manufactured by Philip Harris, and I cannot find any information about it online. If there is any specific information you would need, let me know and I will do my best.

Thank you,
Andrew


polymorph

What exactly is the signal that the chart recorder is looking for on that pin? A 15V pulse? Of what width?
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Wawa

#20
Apr 09, 2015, 11:30 pm Last Edit: Apr 09, 2015, 11:33 pm by Wawa
It's all explaned in the SAA1027 datasheet.
Pin15 is a count input, with 4.5volt and 7.5volt switch points.
Counting (motor movement) is done if pin15 changes from low to high.
Mode input (pin3) is motor direction.
There is also a reset input.
Leo..

andrewferguson

#21
Apr 09, 2015, 11:35 pm Last Edit: Apr 09, 2015, 11:37 pm by andrewferguson
Upon further inspection, I have found that the problem definitely lies with the Op Amp circuitry. To prove this I connected up the 12v external power adapter as the supply for the op amp, and it did not work. Does anyone know why the op amp circuitry is not working with the SAA1027, when a "regular" power supply is? The details of the SAA1027 can be found here: http://serge.bertorello.free.fr/compsnts/saa1027.pdf

To polymorph: the SAA1027 chip is looking for a pulse that is above 7.5v for HIGH, and below 4.5v for LOW. The delay between the pulses determines the speed of the stepper motor. For example, to get the chart recorder to move the paper at 10mm per second, the delay between the pulses would need to be 10 milliseconds, for 20mm per second the delay would need to be 20mm per second, and so on.

Thanks,
Andrew

EDIT: Just seen Wawa's post. His explanation is correct (and probably better then mine).

Paul__B

#22
Apr 10, 2015, 12:52 am Last Edit: Apr 10, 2015, 12:52 am by Paul__B
To Paul__B, it is unfortunately not possible (or not easy) to post a circuit diagram for the chart recorder. It is an old (1982) electronic chart recorder manufactured by Philip Harris, and I cannot find any information about it online. If there is any specific information you would need, let me know and I will do my best.
I would be rather surprised if you could find a schematic for the chart recorder.

The problem is however, that you clearly do not seem to know to what it is that you are connecting.  You must fully trace out the input circuit  to the SAA1027 so that you know how to control it, and if you want assistance here, you need to post your diagram of that part of the circuit here.

Using an op-amp for this function is simply foolish - it is not something an op-amp is intended to do.  You need to connect some ordinary transistors to perform the function, but until and unless you know - and can explain - to what it is you are connecting, it will be futile.

andrewferguson

Hi Paul__B,

I have now traced the circuit for the SAA1027 in the chart recorder. I have attached a photo of the circuit in the hope that it will help you to help me create a circuit / modify my existing Op Amp circuit so that I can get a 5v Arduino signal to control the stepper by pulsing pin 15 of the SAA1027.

Hopefully this will make everything more clear.

Thank you,
Andrew

Wawa

#24
Apr 10, 2015, 11:51 am Last Edit: Apr 10, 2015, 12:35 pm by Wawa
Just connect a 10k resistor between Arduino pin and the base of that 2N3704 transistor and you're done.
That transistor is already a level shifter.
No opamps needed.
And ofcourse connect Vee (SAA1027 ground, pin5) to Arduino ground.

I took the liberty of re-drawing the input part of your schematic.

If that 555timer input is not used, you can use that to connect to the Arduino output pin.

I see that pin 3 of the IC is not used.
Is the stepper motor only going one direction?

You can test the stepper motor with a 9volt battery.
Connect the + to the 10k resistor/in, and - to ground/Vee.
The moment you REMOVE the battery, it should step.
So it should only steps on NEGATIVE going pulses, as on my drawing.
Leo..

andrewferguson

Hi Wawa,

Thank you very much for the advice and the circuit. I will put the chart recorder back together again (I took it apart to trace the schematic), test your circuit, and get back to you.

Regarding pin 3, the stepper motor was only designed to go in one direction, however I will be making it go in two directions. I looked at using pin 3 to reverse the direction, but I did not think that it would be possible to control because it was connected directly to Vcc. Instead, I am using a DPDT to reverse the output wires of the SAA1027, which reverses the stepper direction.

Thank you again for your help and the circuit.
Andrew

Wawa

#26
Apr 10, 2015, 12:49 pm Last Edit: Apr 10, 2015, 12:53 pm by Wawa
You can duplicate the pin-15 circuit.
Almost any NPN transistor and diode will do, like the BC547 and 1N4148.
And connect that circuit to pin 3.
Then you can reverse the motor with a second port of the Arduino.
If you then DON'T connect the input of that circuit, the IC pin will be high, same as it was before.
Leo..

andrewferguson

Hi Leo,

I am not sure that I understand. I see what you mean by making another circuit like the one for pin 15, but I fail to see how it will work because pin 3 is wired to Vcc without any resistor, so when the circuit receives an input it will effectively short Vcc to Ground. Will I need ti cut the trace on the chart recorder's PCB?

Thanks,
Andrew

Paul__B

#28
Apr 10, 2015, 02:33 pm Last Edit: Apr 10, 2015, 02:37 pm by Paul__B
Clearly.

That's the sort of thing you do to hack hardware.  ;)

And I do presume you have similarly disconnected the connection from the 555 to the 2N3704 so that it does not interfere with how you want to control it.

My job here is done! :smiley-lol:

andrewferguson

I have not disconnected the 555 from the 2N3704 because one of the goals of this project is to have the chart recorder work with the Arduino, but also to preserve its original functionality. Do you foresee any problems with leaving the 555 connected to the 2N3704? (There will be no output from the 555 at that time.)

What value for the resistor between Vcc and pin 3 do you recommend? The one the chart recorder uses for pin 15 is 2k2, the closest I have are 1k or 3k3. Would any of them be suitable? (Vcc is around 15v, the SAA1027 registers HIGH at >7.5v, LOW at <4.5v)

Thanks,
Andrew

Go Up