Don't stop spinning/moving backwards when running this script

I have bought a yetiborg v2 and use python3 with the provided python 3 libary ( When I use the python3 command and do everything step by step it works and doesn't hang up. But if I execute the following script(txt file) the motors don't stop when preforming the spin. How can I fix this?

piborg's picture

I am not sure what the problem is, I cannot see anything wrong with the script.

What output do you get to the terminal when running the script with the spin?

Loading ZeroBorg on bus 1, address 40
Found ZeroBorg at 40
ZeroBorg loaded on bus 1

Could this problem be caused by the power supply? Because if I supply it with a battery which is a bit lower than 9v, the motors just stop if they are given the order to spin. But if I supply via a cable (9.6 v) the motors won't stop spinning.

piborg's picture

The output is very strange, I was expecting to either see an error or all four movement values. This suggests that the script is somehow getting stuck...

It is possible that the power supply cannot provide enough current to both drive the motors and power the Raspberry Pi at the same time. If you have a control on the supply for the current limit try turning it up. In the worst case the YetiBorg may need up to 9A for a short burst.

What is the needed current to supply both the Raspberry Pi and the motors? With the current adapter, I can just have a current of 200 mA. Is this to small?

piborg's picture

200 mA is far too small, the Pi Zero will use most of that on its own :(

For a worst-case figure the motors can use as much as 2 A each briefly and I would allow 1 A for the Pi Zero to cover all scenarios, including devices attached to the USB. This gives a 9 A power requirement.

For a bare-minimum the motors will use at least 80 mA each when moving without touching the ground and I would guess about 250 mA for the Pi Zero when the processor is doing a moderate amount of work with no extra devices attached. In other words a bare-minimum of ~600 mA for any level of functionality. At this power level the YetiBorg will struggle to spin when placed on the ground.

The further below the worst-case figure the more likely you are to have issues. I would strongly advise a power supply of 9 A (9000 mA) or higher to be sure everything will work properly.

How many Volts can the Yetiborg handle? Because I cant find a AC/DC adapter with 9V and 9A. The closest thing I found which could work is 12 V and 9 A. Slowly I am questing if its even worth not using normal batterys but those lose there power pretty fast. What would you recommend to power the Yetiborg?

piborg's picture

The 12 V supply is too high, the YetiBorg needs between 7 and 10.8 V from the supply. Over 10.8 V may damage the board :(

If you are just doing code development / testing you could probably get away with a lower current supply. Do you have anything in the voltage range which can deliver a few amps?

Subscribe to Comments for "Don't stop spinning/moving backwards when running this script"