I'm making a 8 mm film projector (for digital conversion) with the Arduino and a L298N module for PWM and PID speed regulation.
My problem is, that originally the variable speed DC motor changed its direction via a polarity reversing switch that also mechanically selected the correct reel to be spun. That's why I have to keep using the original switch to change the direction of the film projection.
But the plarity change is a problem for the L298N module so I have to use a bridge rectifier to power the module.
Although I can tell the module to rotate the motor in any direction, I have to do that at the same time as the mechanical switch is being rotated. Thus I need a way for the arduino to read if there's a voltage on switch contacts and if yes, what polarity it's set to.
So I have to sense these three states from the switch (while the arduino is still on):
- the projector is off (no voltage from the switch) - the projector is in forward mode (contact 1 has from +10 to to +25 V DC and contact 2 is ground) - the projector is in reverse mode (contact 1 is ground and contact 2 has from +10 to +25 V DC)
At first it seemed like a simple task but now I'm stuck. I'll be very thankfull for any advice.
Thank you in advance With regards Daniel Krnac