Need a Sense circuit without op amp
Can anyone think of a sense circuit without using a specialized IC or op amp, I have limited space an am trying to avoid adding parts, but need to monitor current on a motor and turn it off if stall detected. I am usig he SX28. I could fit a few small parts like a diode, resistor etc, but no room for DIPs.
Comments
Say you put an LED from an opto across the shunt, and the voltage drop across the shunt, which could be in the range of 1 volt per amp depending on an Rvalue of .1 ( guessing). Would this work to turn on an LED without having a ground? It would really be like 15v on one side of the LED and 13 on the other depending on the load.
If by some chance this worked, then I could put 3.3 on the transistor side, and output a logic 1 to the SX without having to put in an opamp and comparator. I might have a spare opto on the board already.
Take the glass reed switch and wind several turns of insulated wire around the outside. Run your motor current through the reed switch coil. Monitor the reed contacts while you load the motor shaft.
If you've got the right number of turns of wire on the reed switch, it will operate as the motor current increases. More turns will let the reed switch operate sooner; less turns will require more motor current to make it operate.
Use the reed contacts as a signal to your SX28. You will have to have some code to manage the brief reed closures as the motor starts.
You don't say how big your motor is, but I've used this technique (modified a bit) on 400 amp electric vehicle motors.
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I just made a Library object folr the Glass Reed and can pick some up today. That solution may work nicely, just hold an SC input low, and on contact closure, send it 3.3V. Ok that works for software shutdown, but as Bean suggested I should have hardwire option instead in case the chip locks up.
Below is the concept stamptrol suggested which seems workable.
**** Actually the wire coil should have been drawn on one side of the motor to reflect stamptrols idea, I have it shown on the low side still where the sense was.***
Post Edited (originator99) : 9/24/2006 7:51:53 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
result VAR byte
cmpValue VAR result.0
CMP_B = 0 ' enable comparator
TRIS_B = %11111110 ' RB.0 is output
main:
serByte = RX_BYTE
IF serByte = %00000001 THEN
UP = ON
PWM PW, 150, 50
CMP_B = result ' exchange result with CMP
IF result = 1 Then
PauseLoop
UP = OFF
ENDIF
IF serByte = %00000011 THEN
DN = ON
PWM PW, 150, 50
CMP_B = result ' exchange result with CMP
IF result = 1 Then
PauseLoop
DN = OFF
ENDIF
GOTO Main
PauseLoop:
pause 2000 'stay here 2 seconds
goto main
This code will likely not work using the PWM line as the compare only takes place after the PWM has taken place. I may have to write:
IF serByte = %00000011 THEN
DN = ON
PW = 1
'compare here
DN = OFF
PW = 0
Post Edited (originator99) : 9/24/2006 10:19:08 PM GMT
Im not a wiz at SX/B, so I can't offhand tell you if your code is correct. The nice thing about using the onboard comparator is you can respond via program, or via hardware using RB.0. If doing the hardware route, the easiest method would be to use two AND gates·to and the comparator output with the both the UP and DOWN signal before they enter the resistor leading to the opto-isolators. However what this will do is cause the motor to stutter because it will stall, clear the stall, stall again ad-infinitum. There is a way of keeping it from doing this by using flip flops (S-R or D type with S-R inputs), but you need to make it so the SX can detect such a situation since the hardware will reset the motor and clear the stall condition and its associated comparator result. This can be done via comparing the expected motor state (the output UP and DOWN) with the actual motor state (the output of the flip-flop)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 9/24/2006 11:45:43 PM GMT
I will have RB.3 asssigned as a variable on bootup, and set it to HIGH. I'll run that pin to an AND to the LOW side of the Hbridge PWM. A positive result in the comparator will set the pin to LOW until the machine is rebooted, plus do a software pause too on stall condition as well, then the machine will not run any longer until power cycled.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I use the sot23 package. Tiny buggers they are though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!