Go Down

Topic: Suspecting interrupt pin 0 and 1 clash (Read 160 times) previous topic - next topic

Boon_Hong

Hi everyone,

I am using dc motor(pin out 3 or int pin1), MPU6050(int pin0), two servos(pin in 9,10), one receiver(pin in 5,6,11), GY-63....
everything works fine ( reading sensor data, channels value, controlling servos) when the program starts, however, whenever I push the throttle to move the motor, the program is halt and cannot read further values and control servos.

I am a newbie in using arduino. I hope someone can point out where did I go wrong.

here's the code:




Hong

DrAzzy

Are you sure it's not a power supply issue? have you tested that your configuration is able to drive the motor without the board hanging or resetting?
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

MarkT

Certainly sounds to be a case of inadequate power.  You shouldn't be powering any motor or servo
from the Arduino 5V rail, that is usually a disaster.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Boon_Hong

Are you sure it's not a power supply issue? have you tested that your configuration is able to drive the motor without the board hanging or resetting?
HI DrAzzy,Thank you for highlight the power issue, currently I am using 3.3V pin, powering up 2 servos, a motor, MPU6050 and MS5611. Yes, the connection should be fine.   

Boon_Hong

Certainly sounds to be a case of inadequate power.  You shouldn't be powering any motor or servo
from the Arduino 5V rail, that is usually a disaster.
I am currently using 3.3V pin for all loads in the configuration. Is that means if I connect another power source to the motor the whole thing should work? Thank you.

BJHenry

You can only draw about 50mA from the 3.3V pin on the Uno, 2 servos and a motor are almost guaranteed to draw more than that.

Go Up