Main Site Documentation

Fez Domino with DC Motor Shield runs motor on reset



I have a Fez Domino with a DC Motor shield driving a small DC motor using the PWM motor driver.

The motor driver that downloads from the website still has the error in it that causes a MoveRamp in the negative direction to operate incorrectly. In the Move method in the driver make the following change for both motor channels:

                    //_pwm1.Set(1000, (byte)(100 - Math.Abs(speed1)));
                    _pwm1.Set(1000, (byte)(Math.Abs(speed1)));

Having fixed that problem I am left with the following issue.

When the unit is switched on, or the reset button is pressed, the motor starts running at what appears to be full speed until the CPU has booted and the


call is made. Then the motor stops and all my subsequent commands operate correctly.

I do not have any caps on the motor but then I only ramp it up and down and it does this without problem. However, I can not have the motor starting uncontrollably in that first second of booting.

Any ideas?



Add pullup or pulldown resistors on control pins.


So it’s a function of your motor shield. It is basically wired so that immediately the device starts up, the state of the control pins are read and the motor is started. As Gus says, wire in a resistor to either pull up or pull down the control pins so you can enforce the default setting.


I think the problem is the motor driver hardware. The PWM signal can be two ways to deliver. If the PWM signal to the enable offered you should really not affected negatively by subtracting the value of 100. This is also true when using the ardumoto boardje. The disadvantage of this method is you can not properly control engine speed at different loads. When the engine driver of the FEZ boardje Mini Robot you to reverse or subtract the value of 100. Here it is in the right way so you switched the engine speed with different loads may well settle.


So if I wanted to implement a pull-down resistor to ensure that the pin was low on power-up what size resistor should I use? Do I need to have one for each of the four digital pins?



10k is a commonly used value.


I have the same problem. Pull down resistor (10K) is solves, thanks to all.


So specifically for the motor board sold by GHI (, the PWM pins 5 and 6 need to be tied to ground with 10K resistors to prevent runaway motors at startup?
Or is it 4 and 7, the directional pins?

This seems like something that should be build into the motor shield.


Well I searched around more and figured it out. Need pull-down resistors on the PWM outputs (5 and 6 for the motor shield GHI sells).