Motor issues debug plan?


#1

Hi,
I’ve received my BrickPi last week and am still struggling to get a Lego motor work with any of the motor ports.
The RPi is working fine, Python is as well, and programs like the motor_test.py run without any software error. Only that there is no movement … The RPi is powered with 5V and the BrickPi with an 8xAA battery pack.

I’ve read various topics on motor issues, but they all end up with folks finally having solved the issue - but no final statement of how they managed to.

Is there any debug plan to follow to get to the root cause?
Like:

  • Python modules must be of version <whatever>
  • Voltage levels must be x V at pins xyz
  • Any kind of further diagnosis program to run …

The RPi however seems to behave fine, as I can control a GPIO pin successfully with a Python program.
I do not own an oscilloscope so cannot measure directly the servo signals.

Thanks!


#2

Hey Raspel,
The most common issue that people have when trying to run the motors is that the software is not setup correctly or there’s a problem with the image.

Three questions for you:

  • What image are you using and where’d you get it?
  • Do any of the other examples work? Sensor examples?
  • Does the LED example work?

Thanks raspel,

John


#3

Hi John,

I’m using your image as purchased with the BrickPi.
I’m still waiting for some Lego sensors to arrive, so couldn’t check this.
A program similar to LED.py worked fine.

Since I couldn’t verify the sensor examples thus far, I thought of some other debug steps to verify that the BrickPi itself is working. My understanding was that programs like LED.py just interact with the RPi, independent of whether the BrickPi is up or not?

Thanks!


#4

Ok, good to hear you’re using the BrickPi image. That usually makes it simpler. Also good to hear that the LED.py works, but you’re right, that doesn’t mean much that it does work.

So, let’s try a sensor. If that doesn’t yield any results, we will try to replace your hardware.


#5

OK, just to confirm: Also LED_PWM.py works fine. Does this prove anything to the BrickPi board? Or is this just showing that PWM signals find their way to the LEDs on the BrickPi?

Anything I could check on voltage levels on the BrickPi? The battery pack still gives 11 V.

Else I will wait for the Sensors to arrive and run the respective test programs with those.


#6

Hi again,

so I checked with a LEGO touch sensor, and the LEGO-Touch_Sensor_Test.py program prints values between 168 and 1023 depending on the switch pressed or not.

Btw - my boards seems to have S1 and S2 switched, compared to the board layout image on the BrickPi site at http://www.dexterindustries.com/wp-content/uploads/2013/07/Sensor_Port_Layout_Yellow-copy.png
The example works with the sensor put into the “S2”, not “S1” …

LEGO-UltraSonic_sensor_Test.py however does not work, but only prints -1

Happy to hear your interpretation on this.


#7

Ah - now that’s weird: The ultrasonic sensor works fine when plugged into S1, as the board layout suggests.

Does the sensor type have an influence on the sensor port to use?


#8

Hi,
any updates on how to debug the BrickPi when sensors are working in principle but motors aren’t?

Thanks


#9

Hey Raspel,

OK, just to confirm: Also LED_PWM.py works fine. Does this prove anything to the BrickPi board? Or is this just showing that PWM signals find their way to the LEDs on the BrickPi?

Ok, that’s good to know. This doesn’t prove much, other than that the hardware is getting power and is properly connected to the Raspberry Pi.

so I checked with a LEGO touch sensor, and the LEGO-Touch_Sensor_Test.py program prints values between 168 and 1023 depending on the switch pressed or not.

That’s the info we really need. Ok, so if the sensors are communicating properly with the Raspberry Pi, the board should be working with no problem. If the motors still aren’t running, this is a good indication there’s a problem with the board.

Can you send your e-mail and order info through our contact page here: http://www.dexterindustries.com/contact.html and we’ll arrange to replace your hardware. So sorry about this!


#10

OK thanks. I have send my details via the contact form.

Best regards


#11

Just a followup, our distributor Generation Robots received your Pi. The motors seem to work just fine: https://www.youtube.com/watch?v=F1tlRW4-Pqk&feature=youtu.be

Maybe we missed something? Or did you see the motors working like this as well?