Hi Tom, thanks for your comments and advices.
Turn it on without the motor connected first, and check your supply voltages.
Ok, its a good advice. Skipping steps is part of anxious persons like me.
About operation sequence:
Are you just turning the motor ON and OFF with the switch?
Or have you got a sequence involving fwd/rev operation?
By now I'm trying with a manual on/off.
A char variable keep turning direction, so with the same button I can press on (clock), then off, then on again (counterclock) for covering the 3 states.
Still dont have code the code I want, but yeah, thats the idea: a sequence that turn fwd during x time, then stop, then rev operation for another lapse, using millis().
About ACS712:
The output of the ACS712 will be at 1/2 of its supply voltage with no current flowing.
Yes. There's no problem with the "b" parameter of "[Current] = a x [Voltage] + b". I mean, its very closer than the 2500 mV expected (result: 2492 mV) and yes, it's the half part of 0-5V voltage supplied. The problem is the fact that the y-intercept its the only value in common with the curve I have during system running.
Maybe I need to recalculate the slope "a" again, but as part of my circuit, and discard the value that I got with the other simpler circuit.
However, it seems like ACS712 feels bad sharing power supply with the measured circuit even in case of low currents. By now I cant rely on it if I want stop gear in case of higher currents than those the 24VDC can manage. Isolatinf? Filtering? Dont know how.
Many thanks. Cheers!
mrfloid