Hello all,
I am having an issue with my sketch. I am driving a motor/pump. To do this, I have a relay shield so that the relay can drive the motor/pump and I just turn on a digital output which turns on a transistor and then activates the relay. Well, I have all of that working fine. However, I am noticing an issue during power up or reset of the Arduino (DUE). Right now, in my sketch, I am setting the digital output to low in my setup (which keeps the motor off). Then, I do an if statement in the loop and if my condition is true, I set the digital output to high which turns on the motor. It is really simple.
However, when the Arduino resets or starts up, it will toggle the digital outputs high for a split second. I understand why, it is probably the time between the Atmel chip getting power and loading the bootloader and before it can run the setup where I set it back to low. Even though is is probably under a second, it is not desirable since I do have this hooked up to a big motor/pump. Every time the Arduino is powered up or reset, the relay clicks on and off and therefore, so does the pump.
Is there anyway at all to fix this? Hardware or software?
Thanks!