Go Down

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

andrewferguson

Hi Leo,

I have now tested the circuits you provided - thank you very much, they work brilliantly! I am nearly finished this project (just need to finish the code, and solder everything together), hopefully it will go smoothly from now on.

One other question that I had, in your first diagram (2N3704.jpg) you include a diode. In the diagram you have labelled it as "negative pulse protection". Is this simply to prevent damage to the chart recorder if the voltage into the base of the transistor dropped below 0v? Do I need it for the circuit for pin 3 (direction) if it will never drop below 0v? (I don't mind including it - I probably will just to be sure- but I am curious)

Thanks again,
Andrew

Paul__B

One other question that I had, in your first diagram (2N3704.jpg) you include a diode. In the diagram you have labelled it as "negative pulse protection". Is this simply to prevent damage to the chart recorder if the voltage into the base of the transistor dropped below 0v? Do I need it for the circuit for pin 3 (direction) if it will never drop below 0v? (I don't mind including it - I probably will just to be sure- but I am curious)
The reason that diode is there is only because you had it in your diagram of the chart recorder.  His notation of its purpose is correct, but we really have no idea why it is in the chart recorder - it would appear to be quite unnecessary unless some part of the circuit is likely to generate a negative voltage, such as a capacitor coupling from the 555 or the 555 is operating from a different negative supply.

As long as the "ground" from the Arduino is the same as the "ground" of the circuit you illustrate, it would not be necessary for the second interface circuit.

Wawa

^ correct.
Just a protection in case there could be a negative voltage put on the base.
Maybe wise to add a 1N4148 to that first transistor if you don't wire it up permanently to the Arduino.
Leo..

andrewferguson

Hi Leo,

I have unfortunately run into some more trouble with this project. I connected up the circuit to make the pulse on pin 15, and that worked well, however I am unable to make the circuit that reverses the direction of the stepper motor work.

I wired the circuit as show in your diagram (2N3704.jpg) however the stepper always moved backwards, no matter if the transistor was on or off. I then removed the base resistor and connection with the Arduino, leaving only with transistor with its collector connected to 2K2 resistor and pin 3, and the emitter connected to ground. To my surprise the stepper motor still moved backwards, despite the transistor not being linked into the Arduino at all. When the wire linking the transistor and the 2k2 resistor / pin 3 was removed from the collector of the transistor, the direction of the stepper motor returned to normal.

I have attached a photo of the schematic which should help explain the problem better.

Do you have any ideas about this problem?

Thank you,
Andrew

MorganS

Maybe the transistor is faulty? Measure it with your multimeter (on the diode setting, if it doesn't have a transistor setting.) The transistor collector and emitter should not pass current in either direction when the base is not connected.
"The problem is in the code you didn't post."

andrewferguson

Hi,

I have checked the transistor and it does not allow current to pass through when the base is not connected. I have also tried swapping the transistor with another, and the same problem occurred.

I am now considering using a relay to allow me to use the Arduino to connect pin 3 to ground, or perhaps an optocoupler. I know that the relay should work, does anyone know if the optocoupler will work?

Thanks,
Andrew

andrewferguson

I have now solved this problem. I switched around the transistor used for the pulse and the one used for the direction, and everything now works. I am not sure why the direction circuit did not work with its original transistor and two others I had, but it seems to work well with the transistor I used for the pulse circuit, and the pulse circuit works with the one originally used in the direction circuit.

Strange, but it works.

Andrew

Go Up