Pages: [1]   Go Down
Author Topic: using L298 to control Dc motor (basic)  (Read 660 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I am trying to find a simple setup for using an Arduino Uno to control a small dc motor.  I have found out that a H-bridge or shield etc. is needed.  so I purchased a L298N and I have searched for schematics.  I've wired everything up according to all the schematics I've found like so..

starting with just one motor

pin 1 -- nothing               (current sense A)
pin 2 -- nothing               (Output 1)
pin 3 --nothing                (Output 2)
pin 4 -- 9volts DC             (motor supply voltage)
pin 5 -- nothing               (input 1)
pin 6 -- nothing               (enable A)
pin 7 -- nothing               (input 2)
pin 8 -- common ground    (ground)
pin 9 -- 5volts from arduino (logic voltage)
pin10 -- arduino pin2          (input 3)
pin11 -- arduino pin3           (enable B)
pin12 -- arduino pin4          (input 4)
pin13 -- dc motor              (output 3)
pin14 -- dc motor              (output 4)
pin15 -- 10ohm resistor to cmn ground  (current sensing B)


Could someone please let me know of a handy link that could show me the correct coding.  I don't think it's as simple as setting up pinMode as OUTPUT and then digitalWrite HIGH for enable and one of the motor pins and LOW for the other motor pin..  is there other terminology I am missing?  do I need to use PWM and analogWrite  etc... 

any help would be greatly appreciated.   

Clancy




Logged

Espoo, Finland
Offline Offline
God Member
*****
Karma: 7
Posts: 586
"Oops, try again..."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should show the actual schematic you are using, or a link if you have  a shield.

Cheers,
Kari
Logged


The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

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

oh yes, roger..   



thanks.
Logged

Pages: [1]   Go Up
Jump to: