Notifications
Clear all

L293D - motors spinning at different speeds

3 Posts
2 Users
0 Likes
891 Views
(@tinkerman)
Member
Joined: 3 years ago
Posts: 15
Topic starter  

Howdy all,

I have wired up two motors with a NANO and using the L293D controller.  Wrote the code and the motors work just fine.  Both motors are hooked to a breadboard power supply (5V).  The motor powered by PIN 8 is running faster than the motor powered of PIN 16.  I checked the code and the commands look good.  In addition I swapped the motors and I get the same results.  Each motor is on it's own PWM port an I even swapped the ports, still same issue.

Am I missing something? 

Any help would be greatly appreciated.


   
Quote
Topic Tags
Sid
 Sid
(@sid)
Member
Joined: 4 years ago
Posts: 111
 
Posted by: @tinkerman

The motor powered by PIN 8 is running faster than the motor powered of PIN 16.  I checked the code and the commands look good. 

Looks good or is good?

Please post the codes as well so that the community can look into and provide you some insight.

Life is exploring and learning


   
ReplyQuote
(@tinkerman)
Member
Joined: 3 years ago
Posts: 15
Topic starter  

Sid, thanks for the suggestion, will be sure to do that next time.  I got my issue resolved and learned some valuable lessons.

First, backup your work.  I was getting an AVRdude error after posting this message and the only way to get the IDE working correctly again was to uninstall and reinstall.  This caused all my files to be wiped out and with no backups all my work for the past 3 months was GONE.

Second, buy/build a good power supply.  I was using a 9 volt battery to power the project.  The reason for the different speeds was that the battery was low and could not effectively power both motors.

Noobie mistake on my part.  🙄.

But in answer to your question, the code was good.

 


   
ReplyQuote