Intermittently works

I have BrickPi connected to a Raspberry PI 3. The hardware test sometimes works and powers the motors, and other times it doesn’t. The script runs, it says its sending commands, but the motors don’t move.

Interestingly, sometimes powering down for a while and starting back up later, running the same exact script, works and the motors run.

I’ve booted up both with and without any sensors plugged in and it’s still unresponsive when it doesn’t work.

Just noticed that there seems to be signal going to the motors. You can here them faintly trying to work but they aren’t spinning. Voltage is between 5 and 8.6.

Hey cbjorgol,
What are you using to power the BrickPi. Are you using fresh AA batteries. Also can you tell us a little more about Voltage is between 5 and 8.6.. How are you measuring it and does it just fluctuate between 5 and 8.6 V or does it drop from 8.6V to 5V. Is this the first time you are using the BrickPi and are you using the official Raspbian for Robots image. Can you upload a picture of your BrickPi showing how it is currently connected.

Hi Karan,

I tested with both the Raspberry Pi power cord as well as a fresh set of batteries. I am measuring voltage using the python script you provided. Voltage seems to be somewhat up and down, either 8.5-9.6 or 4.6-6.3 but it bounces around a bit. More concerning is that two of the ports are non-responsive.

This is my first time using BrickPi and I am using the official image downloaded two days ago.

Right now I have the motors plugged into ports A and B and they have been ok for today but they intermittently fail and the other two motor ports are unresponsive.

I tested with both the Raspberry Pi power cord as well as a fresh set of batteries.

First, don’t power the BrickPi with just a USB cord. You can damage the Pi.

Second, even if you have a fresh set of batteries, do you have a way of measuring the power? The low whine you reference could mean there’s not enough power for the motors. What load is on the motors right now? Are they free spinning? Maybe a picture of your setup could help troubleshoot the issue?

So it’s safe to plug in both the batteries AND use the Raspberry PI default power supply? Is there a way to skip batteries? I am ripping through batteries really fast to test this thing.

I do not have a voltmeter but I measured the power using the script in your repo. I tried uploading a picture but my phone takes pictures at a higher resolution than this website can accommodate.

It’s safe to plug both in. If you want to skip batteries, you’ll need to find a 10V 2A power supply.

The script should be supplying accurate voltages, but there may be a problem which is why we’re requesting an outside voltage meter test on the batteries. It’s strange tos ee the voltage rise and fall so far in one setting, so if you can’t help with a picture, and can’t measure with a voltmeter . . . any ideas on why the voltage might be changing so much?

Will this work?

It’s hard to tell, but it looks like it will provide enough voltage and amperage, it’s hard to say how it will handle a motor underl heavy load, especially changing directions.

I am still hitting this problem except that none of the ports work now. I am powering using a fresh set of batteries. The LED tests check out but whenever I try to use the motors it hangs and with a keyboard interrupt i get this:

Traceback (most recent call last):
  File "", line 49, in <module>
    result = BrickPiUpdateValues()  # Ask BrickPi to update values for sensors/motors 
  File "build/bdist.linux-armv7l/egg/", line 551, in BrickPiUpdateValues
  File "build/bdist.linux-armv7l/egg/", line 680, in BrickPiTx
  File "/usr/lib/python2.7/dist-packages/serial/", line 475, in write
    n = os.write(self.fd, d)

Pic 1