Go Down

Topic: Pwm output is high on bootup? (Read 3 times) previous topic - next topic


Hello all,
For testing purpose I have here a very simple setup using the Duemilanove.
Just a 10k potentiometer on the Analog Pin 0.
An scope connected to pwm out pin 11.

Now the code is just your basic analogRead from the potentiometer and digitalWrite to pwm pin 11.
This works obviously great. I have full pwm control on pin 11, no problems there.

I have noticed with the scope on pin 11. That that pin goes high for half a second orso when I boot up the Arduino. Meaning when I plug in the usb cable. So it very shortly hoes high, displaying a pwm signal. Then goes low and after a second or so comes up high again and the board is ready to use. So it seems, while the Arduino is booting just after you plug in the power it very briefly sets the pwm high.

This is not wanted since further on I want to control a full bridge motor controller with the Arduino. And I can not have unwanted high signals on bootup.

So is there a way to keep all pins absolutely low until the Arduino is fully booted?

Kind regards,


This happens because initially the pins default to being inputs and they float high. You can stop this by simply putting a 10K pull down resistor on each output. That is a resistor connected between the output and ground.


Hi and thanks for the reply.
Yes I forgot to mention that, but indeed I am using pull down resistors as well.

The brief signal I'm seeing during the Arduino boot sequence is a 5v pwm signal.
It only seems to happen on the pwm pins. I see no such thing happening on the other 'normal' pins.



That is odd, do you see this if you don't initialises the the pins on start up.
Maybe you need to set them to zero before you define them as inputs in the start up function.

Coding Badly

How long ago did you get the Arduino?  Does it have Optiboot installed?

PLEASE do not cross-post.

Go Up