Driving an L293 with one I/O pin?
June 1, 2012
There's the circuit, here's the plan...
I remember the remote control cars from yesteryear (the ones connected to the controller with a wire!). They had a joystick that just went forwards and backwards. When pushed forward the car would drive forward in a straight line. When pushed back, the car would back up while turning. There was no real directional control. I'm trying to acheive a similar level of control with this circuit. The idea is:
- While the I/O pin and IN1/2 are low, the inverter transistor sets IN3/4 high. This configuration makes both motors drive forward. During this time C1 gets charged up.
- When IN1/2 changes to high, the inverter makes IN4 low, causing the motor on IN2/4 to reverse.
- For a short time while the motor on IN2/4 is reversing, C1's charge keeps IN3 high, causing the motor to stop. D1 prevents the same thing from happening to IN4. This should make the robot turn a little bit before R1 (with a high value) lets C1 discharge after... one second, let's say. Just enough time to point the bot in a different direction.
- At about the same time C1 discharges to the point that IN3 goes low and causes both motors to go in reverse, the I/O pin is turned high again, preventing any possible backing up off of a cliff.
Thoughts? Critiques? Phoolhardy physics? An easier way? Let me hear it :)