bob_s Posted May 22, 2004 Report Posted May 22, 2004 I have a motor circuit which needs to have feedback for current flow through the motor (see attachment). The input drive is pulse width modulated at 50khz. The motor draws up to 6A. How do I get the optoisolator to turn on when current flows? Quote
bob_s Posted May 23, 2004 Author Report Posted May 23, 2004 I'm not interested in the amount of current flowing but rather that it is flowing. The schematic only shows a portion of my circuit. It does already have current limiting. However, I only have a digital input available to use in my sensor circuit.I believe the stall current for this motor is about 1A. So if the opto is turned on when the current is greater than 1A that would be great. Quote
audioguru Posted May 23, 2004 Report Posted May 23, 2004 Bob,Most DC motors stall with a HUGE current, just measure its resistance then use Ohm's Law. Isn't that why your circuit has current-limiting?So maybe you need just a decision:a) No current. The motor has burned-out. orb) Normal current. All is well. orc) Current-limit. The motor has stalled.You could even detect other problems such as:d) Low current. The drive-belt has broken. ande) Higher than normal current. Something is binding and the motor may over-heat. Quote
bob_s Posted May 23, 2004 Author Report Posted May 23, 2004 I'm sorry. What I meant to say is that the motor does require a minimum amount of drive in order to move with it's load and that works out to about 1A or more of current flow. I need this motor to move very slow in some circumstances. I would like to have the feedback that you just described. But I am limited to one digital input to my controller circuit. I am using a PIC microcontroller and have an EXT interrupt pin available that I can use to count pulses, etc... At this point I would be happy with just a "yes" it's flowing or "no" it's not. These motors have physical limit switches which open and introduce reverse bias diodes interupting current flow and this is what I need to know is happening. The current stops at the limit and will only flow in the opposite direction until the switch closes again shorting out the diode.One thought that I had was to use a pair of op-amps. Feading the voltage of a small current sense resistor (0.1ohm) into the first amplifier (unity gain) and then an inverting amplifier (x10 ) to turn the opto isolator on. I am just not sure how to set this circuit up. Quote
ante Posted May 23, 2004 Report Posted May 23, 2004 Bob,If the stall current is 1A, under which circumstances do you expect 6A? Ante ::) Quote
ante Posted May 23, 2004 Report Posted May 23, 2004 Bob,I guess we where writing simultaneously as I saw you message after I was finished with mine. Is it only motion you want to detect? In that case an opto sensor will come in handy, giving an output while the shaft moves and non when it stops.Ante ::) Quote
bob_s Posted May 24, 2004 Author Report Posted May 24, 2004 I already have motion feedback. Having current feedback as well gives me a better indication of what is happening (limit switch, obstruction, etc..). Quote
ante Posted May 24, 2004 Report Posted May 24, 2004 Bob,What is the highest value possible for R2? This will determine if the opto LED can be driven right off the voltagedrop or else you need an op-amp to boost the voltage.Ante ::) Quote
bob_s Posted May 25, 2004 Author Report Posted May 25, 2004 I wouldn't want to have more than 1V drop. Less is better. Quote
bob_s Posted May 25, 2004 Author Report Posted May 25, 2004 Ok. So how do I set up the circuit? I am not that familiar with opamp circuits.Bob Quote
ante Posted May 25, 2004 Report Posted May 25, 2004 Bob,I have replaced your R2 with two resistors. The op-amp will (I hope) put out approx 3Volts when 6 A is passing through the Quote
ante Posted May 28, 2004 Report Posted May 28, 2004 Bob,Was this any help to your problem?Ante ::) Quote
bob_s Posted May 28, 2004 Author Report Posted May 28, 2004 Ante,I've been busy dealing with another issue and have not been able to try this circuit out yet. Could you explain the theory of this circuit to me? Why you chose the values? What was your train of thought? I would like to understand the theory better before using this circuit.Thanks Quote
ante Posted May 28, 2004 Report Posted May 28, 2004 Bob,I will try my best:The voltage drop over R2-1 (U=R*I) is amplified in U1 by a factor of 10. This factor is set by R1 and R2. The maximum current = 6A the resistance of R2-1 is 0.05R which gives 0.05 * 6 = 0.3 Volts. The output of U1 is 0.3 * 10 = 3 Volts. The reason for R2-2 is to raise the potential above ground to make the op-amp (U1) work better. Thus the output varies from 0 to 3Volts linear with the current 0 Quote
audioguru Posted May 28, 2004 Report Posted May 28, 2004 Ante,I am sorry but your circuit has problems: :(1) The opto won't be active until the current through the sense resistors exceeds about 2.8A.2) The opamp's output will be 3.63V with 6A of current through the sense resistors.3) R2-2 is not needed when using a 324 quad opamp.4) You show the pinout for an LM358 dual opamp, which is the same as an LM324, except it is dual instead of quad. The data sheet for the LM358 is here:http://www.national.com/ds/LM/LM158.pdf I have re-arranged your circuit to make it better:1) I have included the opto's LED in the feedback loop of the opamp so that the current through that LED exactly follows the current through the sense resistor, without any dead-zone.2) I changed the opamp's gain so that the voltage at the LED's cathode is exactly 3V when 6A of current flows in the sense resistor.3) I eliminated R2-2, since the LM324 and LM358 have inputs that can operate very well down to ground.My revised circuit is here: ;D Quote
audioguru Posted May 28, 2004 Report Posted May 28, 2004 OOOps,I always make this mistake:The gain of a non-inverting opamp is 1 PLUS the resistor ratio, so when 6A of current flows in the sense resistor then the voltage at the LED's cathode is 3.3V. If R2 is 910K then the voltage will be 3.03V. Quote
ante Posted May 28, 2004 Report Posted May 28, 2004 Audioguru,With only one digital input I don Quote
audioguru Posted May 28, 2004 Report Posted May 28, 2004 Ante,I revised your circuit only because Bob needs to detect a motor current of 1A and more. Your circuit's LED current stays zero until the motor current exceeds about 2.8A.What I meant to say is that the motor does require a minimum amount of drive in order to move with it's load and that works out to about 1A or more of current flow.Regarding the opamp type, anyone using an old 741 in our circuits here will be very disappointed. Quote
bob_s Posted May 28, 2004 Author Report Posted May 28, 2004 Wow! Thanks you guys for all the help your giving me. I have a question in regards to frequency. I am driving the fet at 50khz and somewhere between 25 and 100% duty. I am using a PS2501 optocoupler. What kind of delay can I expect from input pulse to opto output?Bob Quote
audioguru Posted May 29, 2004 Report Posted May 29, 2004 Bob,The motor, opamp and opto delays are:1) The motor is an inductor which will have an unknown delay.2) The opamp has delays of 10 microsec. for rise, and 10 microsec. for fall.3) The PS2501 opto has delays of 3 microsec. for rise and 5 to 20 microsec. for fall.Since these delays exceed 1 cycle of 50KHz, the output will not be pulses, but will resemble an average voltage that has a lot of ripple. Quote
bob_s Posted May 29, 2004 Author Report Posted May 29, 2004 Ok. Then the output is not a digital signal but rather an averaged DC output. This is not exactly what I was looking for. I only have a digital input available. Could I expect a cleaner signal if the drive signal was 20khz (50us)?Bob Quote
audioguru Posted May 29, 2004 Report Posted May 29, 2004 Bob,20KHz will be much better and we could choose a faster opamp. Also a logic opto will be faster than the PS2501 linear one.How fast does the current rise in your motor? Do you have a spec for its inductance? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.