Help with connecting Arduino clone to L298 based motor driver
August 18, 2009
I am quite new to the world of robotics, but have years of experience with basic passive components (caps, resistors, etc) so I thought this would be a fun way to start learning more.
To start myself off, I picked up a handful of arduino clones, mostly seeeduinos. I built some motor shields and got those programmed, and working successfully with some cheap hobby motors, I've also successfully managed to get some servo's running without a problem as well.
Now I'm working on a bot that requires a more than the 1A that the L293 based stuff I've been using, so I found this cheap motor driver, based on the L298, that seems like it should work perfectly for me.
The problem is, apparently, I seem to be too inept to figure out how to actually connect the motor driver to the arduino!
My goal is to set the driver board up for PWM control of 2 DC motors. The only information on setting the board up is on the page above--- no additional information was included with the board. To save everyone the trouble, here's the information they provide on the site...
Simple 8 pin interface PWM Mode (GND,VCC,M11,M12,M21,M22,PWM2,PWM1) (Jumpers JP1 & JP2 placed)
The markings on the board (for the 8 Pin Header) are actually a bit differrent than the above statement claims... GND, VCC, L1,L2,L3,L4,EN2, EN1
I'm pretty sure the L1, L2, L3, L4 match up with M11, M12, M21, M22 they mention, and that EN2 and EN1 are PWM2, and PWM1.
On the other side of the board The terminal blocks are marked a bit better...
VDD, GND, Motor1(2 pins), Motor2(2 pins)
With VCC and GND connected to a 9V power source, VDD is puts out 5V, thanks to the onboard 7805, so I am plannning on using VDD/GND to power the arduino-- That's about the only part that works right now =-)
I am planning on using pins 10 and 11 on the arduino for PWM control (EN2 and EN1), but I'm not sure what to do with the L1, L2, L3, L4 pins from the header (also known as M11, M12, M21, M22).
I've tried contacting the seller about the mislabelled pins, and asked if they had any guidance on how to wire it to an arduino, but I haven't heard anything back---guess that's why they're cheap.
I could probably figure this all out with the data sheet and meter, but even though this was cheap, I'd still rather not risk screwing that up and blowing up the L298 or the arduino if I get something wrong, so I'm hoping someone here might have an idea of how this should work.
I am open to any and all suggestions. Thanks in advance!