Hi!
I have a quick question. Can I connect the two L298N to Arduino? So that we can control the 2 stepper motors or 4 dc motors.
Thanks in advance
Hi!
I have a quick question. Can I connect the two L298N to Arduino? So that we can control the 2 stepper motors or 4 dc motors.
Thanks in advance
Hi
Since the L298 uses 4 Arduino pins to control each motor it looks like you run out of pins to use, but there is the possibility of using your analog pins as digital which can get you there. They are addressed as follows:
Digital pin 14 = Analog pin 0
D15 = A1
D16 = A2
D17 = A3
D18 = A4
D19 = A5
However presuming you'll want your vehicle to do more than just move around - it should react to sensors and maybe have some communications - that would only leave you with 3 spare pins. There are other alternatives you can try, with a couple of minor compromises. The controls are:
The transistor .NOT. gate is constructed with an NPN transistor and a pair of current limiting resistors. If you're not comfortable with adding circuitry, other alternatives might be to drive your motors in pairs, so the front and rear act on the same control and just one L298 driver (presuming the power requirement from your chosen motors isn't too much).
Hope that's given you some ideas,
Geoff
Can I connect the two L298N to Arduino?
it looks like you run out of pins to use
But remember different Arduinos have different numbers of pins.. 14 on an Uno which Geoff presumably based his numbers on, in the absence of the OP saying what his board is, but 50+ on a Mega.
JimboZA:
But remember different Arduinos have different numbers of pins.. 14 on an Uno which Geoff presumably based his numbers on, in the absence of the OP saying what his board is, but 50+ on a Mega.
Well spotted, and yes was basing that response entirely on Uno or any of its ancestors
Thanks for your answers, will mix somenthing ... I hope without white smoke: D