How to avoid BS2 startup chaos?
RichardF
Posts: 168
My application (submersible ROV) uses output pulses from a BS2 to four HB25 motor controllers, which then control four motors with propellers attached. System works fine except I don't like what happens when I download a minor change to the program. During download, spurious pulses are being sent from the BS2 to the HB25's (they are random and never the same) causing some of the ·motors to go nuts and settle in a fixed state (sometimes high RPM, sometimes low RPM, sometimes forward, sometimes reversed) that is frankly irritating and a little dangerous. Once the program download is complete, I·then can do a reset (power OFF/ON) and everything is back to normal and under control of the program (motors off until told to run).·I don't understand what is happening here so I can't attempt a fix. Any suggestions would be greatly appreciated.
Thanks,
Richard
Thanks,
Richard
Comments
Is it possible to turn off the HB25 power, without turning off the BS2 power?
It's also possible a 10 Kohm pullup (or pull-down) resistor would kill the noise sufficiently to not trigger the HB25's, while still allowing the BS2 to control the HB-25's during normal use.
I have noted the same behaviour and am a bit paranoid about motors running away. I guess working around 30,000 HP motors, you get that way.
Anyway, what I do is add a relay in series with one motor lead. It has to be a relay that can handle the full load current of the motor.
When the Stamp starts up, the relay coil is de-energized. The HB-25 gets powered up as per normal and will take its signal pin high when its ready. I then take the signal pin low and send one or more serout's to put the hb-25 in the "off" condition. This is pretty much as per the sample code for the hb-25.
Finally, I energize the relay which allows the hb-25 to deliver power to the motor.
Since doing things this way, I haven't had a problem.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
Richard
'Initialize
MtrDir = 0: Mtr12Spd = 0: Mtr34Spd = 0: LVcmd = 0
LOW Mtr1: LOW Mtr2: LOW Mtr3: LOW Mtr4 'output pins to HB-25's
PULSOUT Mtr1,750:PULSOUT Mtr2,750 'stop pulse to HB-25's
PULSOUT Mtr3,750:PULSOUT Mtr4,750
This BS2/HB-25 problem sounds exactly like the one I have in Ugly Buster, my skid steer robot. Like Richard, I am not using pulldown resistors on the BS2/HB-25 control lines.
Perhaps we have the same problem.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Richard