Main Site Documentation

Motor controller board working only on usb


#1

problem solved. post deleted.


#2

please do not delete posts. If you have done something wrong, then please tell us what is it. This benefits other users as well


#3

Ah ok, good point. Just didn’t want to make anyone run off chasing my own error. I was using a 6VDC external power supply, which would boot up the domino and run the program fine. However, it doesn’t look like enough to boot up the motor controller shield properly, and so it ran both motors continuously and didn’t allow any control.

Switching to a 7.5VDC power supply solved the issue. So it was a simply rtfm mistake on my part :). The motor controller documentation specifically says 7-12VDC.


#4

Thanks for the details and I am sure this will help others :wink:


#5

Actually I think i spoke too soon. Here are some things I found:

  • Running the actual motors off the shield, while powering the Domino from 7VDC, the motors do all sorts of strange things. I
    found from an Arduino forum that it sounds power related.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266895465/8

So I powered the shield from a separate source. That worked, but since powering the shield also powers the domino, I ran into the same “strange things” problem. Finally I just bent the vin and gnd pins so they weren’t connected to the domino, and I was able to power the shield and domino separately.
So question 1 is, am I doing something wrong, or is there a way to turn off the vin and gnd pins?

  • Issue two I found was in the controller driver:
    _pwm1.Set(1000, (byte)(100 - Math.Abs(speed1)));
    This is called when speed1 < 0 (ie moving backwards). unfortunately it looks like 100-Math.abs(speed1) = 0, and the motors don’t turn. Editing the code to read:
    _pwm1.Set(1000, (byte)(Math.Abs(speed1)));
    seems to solve this

  • Third issue was that during fez power up, both red leds on the controller board light up for a few seconds, I guess at least until the initialize() function is called to assign them. My guess is that this happens due to the default power up settings of the pins. I can work around this, but i was just looking for confirmation that it’s the way it is :slight_smile:

thanks again guys!


#6
  1. Motors generate a lot of transient noise which can cause FEZ to reset. Using separate power will defiantly help.

  2. The “100-” is to reverse the motor rotation but it could be wrong and your fix did the trick. We will give the driver a second look

  3. All pins are defaulted to input with pull up resistors. So on power up and until you change the pins, they all have weak pull up resistors. so the pin is somewhat high


#7

Thanks for the late night work :slight_smile:
regarding #1: I 100% agree. But right now, even with two supplies, it looks like the only way I can get each to use their supply exclusively is to disconnect vin & gnd (bend them away). This might be a question for the dfrobot guys who make the motor controller shield, but do you know a way to isolate the shield and domino? I’ve seen other shields that have a jumper, but none for this one.

thanks again.


#8

You can power both from the same source. You will need a large capacitor from power to ground. Even better, add a coil in series between FEZ power and the motor power to reduce the amount of noise coming back.

One good practice…do not try to turn motor completely on or off. This causes a large surge. Instead, ramp the speed up and you will be fine…you may not even need the capacitor


#9

I was thinking that too, but there are already some decent caps on the board between vin and gnd (and +5v and gnd). So I figured maybe there is a voltage problem (I was using a 9V + usb and all was well, but 9v alone didn’t work. So maybe 9-5 =4 vdc, and its just not enough for the shield.). In any event, tinkering is half the fun. I’ll try a couple things and post what i find.


#10

As i figured, the guys who designed this are smarter than me :slight_smile:
I should have mentioned this before, I’m using the 4speed twin motor from Tamiya, and it looks like even the Arduino guys are having noise issues with this setup.
This guy bent the pins like i did and it works for him:
http://mechomaniac.com/ArduinoMotorControlWithTheArdumotoShield

I’ll keep with that workaround during prototyping and come up with something more permanent later.

thanks again!