Op amp problem

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
image.jpg im working on a project and can't seem to get my op - amp to work. It's just supposed to be a voltage follower powering an led, and it's not outputting any power. It's an lm339, with an 18v into source and 4.5v going into the + terminal. I just bought the amplifier and I'm pretty sure it's wired correctly. Any help would be appreciated.
 

AfdhalAtiffTan

Joined Nov 20, 2010
120
I don't know if you noticed this, LM339 is a comparator with open-collector output. Wring it as voltage follower will yield digital pulses instead of smooth analog signal. Being open-collector, it also needs pull-up resistor to operate.
 

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
Ugh. I know nothing about op amps besides the theoretical stuff from my circuits classes... What kind of op amp would be good for taking the signal from a circuit of logic gates, and multiply it to power a solenoid? Shouldn't have more than an amp in current output.
 

crutschow

Joined Mar 14, 2008
34,285
The symbol for a comparator looks like an op amp but it's not.
A comparator doesn't have the internal compensation needed to keep the circuit stable with negative feedback.
And many comparators, like the LM339, have an open collector output so they need a pull-up resistor to operate.
 

k7elp60

Joined Nov 4, 2008
562
All that is need to amplify the output of a logic circuit to energize a solenoid is a transistor. Tell us which logic element and the voltage and current rating of the solenoid.
 

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
I have 3 solenoids being driven by nte4081b, nte4025b, and nte4071b, (as the last gate of the circuit). All have 4.5v as their supply. The solenoids are home-made with 24 gauge mag wire. I was planning on using op amps because I need to tune how much force they generate, I was gonna use a voltage amplifyer set up on the op amp and tune it by changing resistances, can I still do that with a transistor?
 

AfdhalAtiffTan

Joined Nov 20, 2010
120
Usually, even if you could get your opamp working, the output current is limited to 20mA, which is not enough to drive most solenoids. I would suggest you to draw your full intended schematic so that we can start from there. Transistor would be a better choice as it could drive more current through it.
 

ebeowulf17

Joined Aug 12, 2014
3,307
I might be misunderstanding your goal here, but you might want to consider PWM to control solenoid force. With PWM, the transistor spends almost all of its time either off or saturated, so there's very little wasted energy and very little heat to dissipate. If you drive solenoids using the linear region of the transistor, you'll be wasting a lot of energy as heat. May or may not be significant for your application, but during the few proportional solenoid projects I've attempted, I've always been steered towards PWM.

All of my PWM has been done with microcontrollers, but my understanding is that PWM without a microcontroller can be done pretty easily with a 555 circuit.
 

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
I think I just need something that will behave like an ideal op amp set up as a voltage amplifier, that can put out up to 500 mA and like 8-16V... Would a mosfet work?
 

AfdhalAtiffTan

Joined Nov 20, 2010
120
Assuming that you want to drive the solenoid only with positive voltage, you could try to 'boost' your opamp current by using 'emitter follower' attached to your working opamp output. Yes, mosfet will also work.
upload_2015-3-15_19-36-4.png
 

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
It's a linear motor so the current has to reverse at the end of the stroke to bring it back, I was planning to have op amps at both ends of the solenoid, one creates +voltage and the other ground, the logic gates switch them when it reaches the end of the stroke. So can current flow into a mosfet or emiter follower without causing a problem?
 

k7elp60

Joined Nov 4, 2008
562
I think the attached schematic will do what you want. The resistor between the two terminals of the LM317 can be adjusted for the current for the solenoids.
Since the solenoids were designed for 4.5V the output of each LM317 with be about 4.5 volts and the resistor will adjust the current.SOLENOID.png
 

crutschow

Joined Mar 14, 2008
34,285
It's a linear motor so the current has to reverse at the end of the stroke to bring it back, I was planning to have op amps at both ends of the solenoid, one creates +voltage and the other ground, the logic gates switch them when it reaches the end of the stroke. So can current flow into a mosfet or emiter follower without causing a problem?
No, current only flows one-way in a transistor (either FET or BJT).
You can add a transistor to ground at each end of the solenoid to carry the current when the op amp for that side is low.
You can switch those transistors ON with the logic signal that controls which op amp is on.
 

Thread Starter

Rabbit8

Joined Sep 4, 2012
15
I think the attached schematic will do what you want. The resistor between the two terminals of the LM317 can be adjusted for the current for the solenoids.
Since the solenoids were designed for 4.5V the output of each LM317 with be about 4.5 volts and the resistor will adjust the current.View attachment 82180
I'm not sure that works, because I want to be able to send current though the same coil in the both directions depending on where the linear motor is in its stroke
 

crutschow

Joined Mar 14, 2008
34,285
The selected op amp supplies an analog controlled voltage/current to one side of the load. The other side then needs a switched transistor to ground to carry the ground current.
So the ground carrying transistor should be turned on by a switched digital signal to fully turn it on and not by the analog signal from the op amp.
The op amp transistor is a source/emitter follower that does not go to ground.
All transistor polarities should be NPN or N-MOSFET.
Don't just blindly draw the circuit without understanding. Think about how the current has to flow through the load and consequently through the transistors.
 
Top