Motors won't move

OK, this is my first day with BrickPi and I’m a completely newbie!

Steps so far:

  • wrote the image 2014.06.13_Dexter_Industries_wheezy.img to a 8GB SD card and didn’t updat it in order not to overwrite the config.txt
  • connected with SSH via ethernet cable and powered with a separated 9V power supply.
  • successfully run the LED_PWM.py program
  • unsuccessfully run the LEGO-Motor_Test.py program…
  • At first I obtained:

root@raspberrypi:/home/pi/BrickPi_Python/Sensor_Examples# python LEGO-Motor_Test.py
Running Forward
BrickPiRx Error : -2
BrickPiRx Error : -5
BrickPiRx Error : -2
BrickPiRx Error : -5
Running Reverse
BrickPiRx Error : -2
BrickPiRx Error : -5
BrickPiRx Error : -2
BrickPiRx Error : -5
BrickPiRx Error : -2
BrickPiRx Error : -5
BrickPiRx Error : -2
BrickPiRx Error : -5
BrickPiRx Error : -2

…but then I discovered that was not properly set the USART and I2C variables as other users in this forum complained.

  • I have a custom RJ12 to R112 cable…but I tested with a DVM and it is OK.
  • I tested with three different brand-new LEGO motors.
  • It is not the board since LEDs work like a charm and now communications runs perfectly as :

Running Forward
Running Reverse
Running Forward
Running Reverse

contains NO BrickPiRx Errors and ‘DEBUG = 1’ is enabled.

  • When I place a DVM at pins 1(Motor power pin) and 3(GND pin) I see a 6.2Vdc with forward but then 1.9Vdc when in reverse…hmmm I think this is strange.
  • I got 4.8Vdc between pin 4 and GND (pin 3).
  • I don’t know what else to test!

Please HELP!!! and Thank you in advance…and warmest regards…

OK. 2nd Day:

I got it to work. The problem was a faulty made RJ12…the 2nd power pin was disconnected.

Nevertheless, this brought me to another important issue: when the motor is froward it can go as at 200 in the duty cycle. But when it goes to reverse, the current-controlled power supply trips and the RPi restarts!.

I solved this by changing the duty cycle to 100 and now it goes in reverse OK. I didn’t increase the current to more than 1A because I’m not trusting the driver and how on earth 9V/1A supply does not power a LEGO motor in backward mode (300mA) without load!.

I’m saying this because I already read the “Motor port B fails to run backwards” thread on this forum and my reading of the signals and the schematics do not convince me this circuit is bullet proof.

What should I do ? What you guys think ?

Another though here is that without the short-circuit protection on the bench power supply, I probably would have toasted the driver IC.

Hey sagonzal,
First, we’re glad you got this working.

Second, we’re really sorry about the RJ jack not connecting properly. We back any manufacturing mistakes, it sounds like this was one, and we’ll replace anything that arrives broken. But again, please accept our apologies.

Third, regarding the motors back and forth. We’ve seen this complaint pop up a few times (and you can probably see it on the forum).

A quick question back: how are you powering the BrickPi and have you tried any different configurations?
Which version of the BrickPi are you using?
Do you have anything else drawing power (USB devices maybe?)

As you probably know/understand, a quick reversal of the motor power leads to power spikes, heavy draws on the battery. The Pi is very sensitive to lowered power; if the power drops below 4.75 V even momentarily, it resets. If a lower voltage is supplied (ie closer to 6V because there’s a 1V dropout on the power supply) a heavy draw can cause the power to reset.

Hi my friend!

First things first. No need to apologize for the RJ12. The reason was a faulty CABLE not the soldered RJ12. I build the RJ12 myself and was one of the cable that was not making a good contact, an oddity, but that’s what happened.

But the problem in reversing the motor direction still persists and I think is a driver IC problem. Let me tell you my configuration: a USB wifi dongle and a external power supply of 9V current controlled to a max. of 1A. I agree with you that a power glitch is prune to occur in reversing the motor direction. But the motor is with NO load and only happens at high duty cycles.

I think this could be happening to a bad design criteria around the sn754410 driver. For example there is a single electrolytic capacitor in the board and is very far from the IC power supply pins. I did not place a scope yet but, as you said, when at motor reversal the REACTIVE power demands increases and the poor 10uF capacitor is unable to continue stabilizing the voltage. I’m offering myself to re-design this in a further board revision!.

Can you direct me to other pages in the forum of people with the same problem…

Moreover, how to tell about the board rev. I couldn’t find an inscription anywhere in the PCB. I bought my BrickPi board at seedStudio.

Glad to hear the issue wasn’t with the board!

Re your setup: how are you limiting the output to 1A? The Pi could easily be drawing over 1A, causing a voltage drop, causing a shutdown.

Re your board type: Seeed only sells BrickPi Advanced. So that should be what you have.

Here are a few links to others that have seen the same problem: http://www.dexterindustries.com/forum/?topic=motor-port-b-fails-to-run-backwards

http://www.dexterindustries.com/forum/?topic=example-python-script-crashes-pi

I think we setup the SN driver according to the datasheet. However, any help on improving it would be awesome and greatly appreciated.

What is the latest status of these problems? You are making me a bit nervous about purchasing the Pi. Is the BrickPI Advanced the latest rev? Guessing it is…

Thanks.