Maybe this question is more related to electronics rather than programming Arduinos.
You know that if the motor is taken from a servo board, the board works like an ESC (electronic speed controller), though capable of handling low currents.
Ech motor is driven by a L298N by turning on and off, for example, IN1 and IN2 for motor 1. IN1 and IN2 only accept positive (+5v) signals.
I connected the servo board output, i.e., the two wires that otherwise go to its motor terminals, to IN1 and IN2, betting on the L298N internal protection against reverse polarity (IN1 is getting + while IN2 gets -, and viceversa).
It works: the motor runs in both directions and no smoke.
The servo board is connected to a RC receiver channel, the receiver and L298N share +5V and gnd (more precisely, the L298N is powered with 7.5V and its regulated 5V output powers the receiver)
Anyway, I rewired things inserting a couple of 1N4148 diodes between each wire coming from the servo board and the IN1 and IN2 inputs. This way, only one input (IN1 or IN2) is getting positive signal at the same time.
So far so good; now, are the diodes necessary?
the board works like an ESC (electronic speed controller), though capable of handling low currents.
Not true in general. Since the L298N is not actually capable of handling steady state currents over 1 ampere, why is ANY of this necessary?
I don't understand the relation between the phrase you quoted and your question. The standard servo electronic circuit, the servo board, is capable of handling less than 400mA. Go beyond that and you will burn it. That's why I need an amplifier circuit. I hav a L298n at hand so I gave it a try.
My concern was based on the fact that the input pins are designed to receive positive signals (+5V), but when I connect the servo board output, it's like connecting a battery between both inputs, so one of them will be negatively energized. I was afraid that the internal logic in the L298 chip would burn.
It seems to work anyway. I would dare to have it running for a while (crossing fingers at the same time).
The standard servo electronic circuit, the servo board, is capable of handling less than 400mA.
Nonsense. Where did you read that?
Most standard servos draw 1 or more amperes under load, and almost all of that is going through the motor, via the "servo board".
No it is not nonsense. Standard (3kg) servos like the S3003 will have its built in H-bridge burnt driving that current.
Winch, hi-torque servos may be capable of higher currents.
built in H-bridge burnt driving that current.
All standard hobby servos have built in H-bridges.
400mA is quite a plausible continuous rating for a hobby servo, the peak currents should
never be drawn for very long (the servo will simply overheat if that were the case, unless its
in a metal enclosure).
The L298 with the heatsink tab can handle more current, but its likely to be pretty
useless from 5V as it drops 2 to 3V in losses (such darlington bridges are not designed
to work at low voltage, MOSFET H-bridges are preferred under 12V supply)