Pages: [1]   Go Down
Author Topic: Unwanted Rotation from the Motor  (Read 851 times)
0 Members and 1 Guest are viewing this topic.
Istanbul
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

I use L298 for driving a Rover 5. However I experience an unwanted move from the left motor at start. It's a short movement but don't want this to happen anyway. I used pins 13 and 12 of UNO as the digital outputs for controlling the left motor. Can it be happen because of the pin 13 and it's onboard LED circuit? I'll be glad if you help me.

Thank in advance,

-Ali
Logged

-Ali

Offline Offline
Edison Member
*
Karma: 64
Posts: 2488
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can it be happen because of the pin 13 and it's onboard LED circuit?
No
I stand corrected.

Show us your code/sketch/drawing and/or schematic
« Last Edit: January 26, 2013, 12:56:25 am by LarryD » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

I use L298 for driving a Rover 5. However I experience an unwanted move from the left motor at start. It's a short movement but don't want this to happen anyway. I used pins 13 and 12 of UNO as the digital outputs for controlling the left motor. Can it be happen because of the pin 13 and it's onboard LED circuit? I'll be glad if you help me.

Thank in advance,

-Ali

Well when you first power up a uno board or have a reset condition, the bootloader code runs first to see if the IDE wants to download a new sketch or not, and it blinks pin 13 three times then if no new upload it finally jumps to any prior sketch that was loaded into the chip. So sure if you have something wired to pin 13 as an output pin then it will output three short pulses before it starts to run your sketch.

 Possible solutions?
Move to a different output pin.
Or
 Load the sketch with a hardware programmer via the ISP pins, which will erase the bootloader and load your sketch so it will start immediately upon power up or reset.

Lefty
Logged

Istanbul
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forgot mentioning that the motor pulses for three time and I was adding it to my reply with a simple forward moving code and schematic of the driver circuit until I see you reply smiley  So the problem is happening from the reason you told. Changing the pin 13 with another one seems simpler than the second solution = ) Thank you both for you interests.

-Ali 
Logged

-Ali

Pages: [1]   Go Up
Jump to: