Hi there,
I have been researching over the last few days how to detect a motor stall. There is a fair bit written and the method I wanted to try was simply to read the voltage drop when the motor starts to work harder. I'd read the value on an ADC channel and when it fell below a set level assume it was stalled and kill the power. I tested the theory by sticking my multi-meter across the contacts of my motor and watching what happened as I squeezed the motor shaft harder. Bingo - the more pressure, the harder the motor worked and the lower the voltage I read on the multimeter (dropped from ~ 4.2V to 3.8v as it laboured).
So I thought all I would have to do is hook up to my 08M2 ADC and I'd be there. But when I start the motor my ADC stops reading. Here is the set up:
10k resistor between C.4 and ground
C.4 hooked into +4.5v
Picaxe code:
main:
readadc C.4, b0
pause 100
serout 0,N2400,(#b0)
pause 2000
goto main
This set up gives me a reading of 255 (ie 100% of the input voltage), and I am pretty happy with the logic as I can stick different resistors between +4.5v and C.4 to get different ADC readings.
However as soon as I start the motor up, I don't get any reading at all...it doesn't read 0, it doesn't output anything. The moment I disconnect the motor it starts to read again. I thought that maybe it was noise from the motor, so I ran the motor off a separate supply to the chip (connecting the grounds) and got the same results - 255 (or less if I add a resistor) but as soon as I connect the motor no output at all.
I'd like to understand the principle that is affecting this, even if I learn that this isn't an effective way to manage motor stalls (although if I do learn that, I'd love to know what the best way is...Hall Effect Sensors seem popular, but I haven't been able to find anything for a comparative noob).
Thanks for taking the time to read my ramblings,
Rob
PS - saw the earlier post today which looked promising but didn't quite do it for me
I have been researching over the last few days how to detect a motor stall. There is a fair bit written and the method I wanted to try was simply to read the voltage drop when the motor starts to work harder. I'd read the value on an ADC channel and when it fell below a set level assume it was stalled and kill the power. I tested the theory by sticking my multi-meter across the contacts of my motor and watching what happened as I squeezed the motor shaft harder. Bingo - the more pressure, the harder the motor worked and the lower the voltage I read on the multimeter (dropped from ~ 4.2V to 3.8v as it laboured).
So I thought all I would have to do is hook up to my 08M2 ADC and I'd be there. But when I start the motor my ADC stops reading. Here is the set up:
10k resistor between C.4 and ground
C.4 hooked into +4.5v
Picaxe code:
main:
readadc C.4, b0
pause 100
serout 0,N2400,(#b0)
pause 2000
goto main
This set up gives me a reading of 255 (ie 100% of the input voltage), and I am pretty happy with the logic as I can stick different resistors between +4.5v and C.4 to get different ADC readings.
However as soon as I start the motor up, I don't get any reading at all...it doesn't read 0, it doesn't output anything. The moment I disconnect the motor it starts to read again. I thought that maybe it was noise from the motor, so I ran the motor off a separate supply to the chip (connecting the grounds) and got the same results - 255 (or less if I add a resistor) but as soon as I connect the motor no output at all.
I'd like to understand the principle that is affecting this, even if I learn that this isn't an effective way to manage motor stalls (although if I do learn that, I'd love to know what the best way is...Hall Effect Sensors seem popular, but I haven't been able to find anything for a comparative noob).
Thanks for taking the time to read my ramblings,
Rob
PS - saw the earlier post today which looked promising but didn't quite do it for me