I have a moderately fast single engined scale electric boat which is a bit overweight. It currently cariies two 6 x subC NiMH packs of 3500 mAh each. I am looking into replacing them with 7.2V Li-ion pack(s), but am concerned about damage due to over-discharge. Overcharging is not an issue.
I think that I have come up with a really simple solution. Maybe too simple, so ask this Forum to find the catch.
My plan is to use a -08M to sit between the reciever and the speed controller, and also monitor battery voltage via ADC. In normal circumstances, the Picaxe would simply read the input pulse, and re-transmit it unchanged. If the voltage dropped to, say, 6V, then speed would be limited to 1/2 (perhaps 1/4 at 5.5V, and fully off at 5V). I do not want a single full cut-off point, since that would leave the boat stranded.
My first quick attempt at code:
One problem that I can see is if the loop is too slow to read the pulses coming in at 60/s. I could not find the time for the ADC command to execute. Is this a problem?
Another problem may be "hunting". If, say, a voltage of 5.9V is detected, and motor power reduced to 1/2, the voltage may then rise above the threshold, and full motor power will be restored, retriggering the limiter. I'm sure that I can add to the code to make the limit persistant once triggered.
Can anyone see a fault in my logic? Still seems too good to be true.
I think that I have come up with a really simple solution. Maybe too simple, so ask this Forum to find the catch.
My plan is to use a -08M to sit between the reciever and the speed controller, and also monitor battery voltage via ADC. In normal circumstances, the Picaxe would simply read the input pulse, and re-transmit it unchanged. If the voltage dropped to, say, 6V, then speed would be limited to 1/2 (perhaps 1/4 at 5.5V, and fully off at 5V). I do not want a single full cut-off point, since that would leave the boat stranded.
My first quick attempt at code:
Code:
restart:
pulsin 4,1,w0 'word variable since I may trap for invalid pulses which could be >256
readadc 4, b2 'assume 2:1 voltage divider, so 10V gives 256
select case b2
case <154 '<6v battery voltage
b3=170
case <141 '<5.5V battery voltage
b3=160
case <128
b3=150 '<5.0V battery voltage
else
b3=w0
end select
w0=w0 max b3
pulsout 2,w0
goto restart
Another problem may be "hunting". If, say, a voltage of 5.9V is detected, and motor power reduced to 1/2, the voltage may then rise above the threshold, and full motor power will be restored, retriggering the limiter. I'm sure that I can add to the code to make the limit persistant once triggered.
Can anyone see a fault in my logic? Still seems too good to be true.