This project proposes a method to drive two motor axis' using a pulse count for each channel and a method of latching "on-off" switching using 4017 counters.
This method is suitable for any pulse input function (push-button, rotary switch or other source where output pins are limited).
I propose to show methods to drive D.C, stepper and servo motors using components from the popular "Larson runner" kit using 555 Timer and 4017 counter chips.
I have an obsolete but working TI99 Home Computer which was popular some time ago (the 70s) and I hate to see useful gear sitting around with nothing to do. The TI99 used the best processor of it's time, the Texas 9900, but for some reason was crippled as a Home Computer and soon fell out of favour.
The TI99 has no outputs to speak of other than video, cassette tape and sound; the inputs are a non-standard keyboard and a "joy-stick" port.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: The "Larson Runner"
I am not currently able to complete a working model at the moment but I thought that I would put this up here on Instructables in case it would be of interest and hopefully generate some comments.
Those of you that are familiar with the "Larson runner" will know that a 555 timer provides the clock for a 4017 counter and the counter outputs sequentially light LEDs.
The idea that I propose is that motor drivers i.e H-bridge or stepper modules, like the A4988, can be selected by the outputs of the 4017 counter by sending the correct number of pulses to activate the required driver.
Step 2: The Base Circuit
Here is the "Larson runner" circuit diagram.
In this application the 555 timer is not connected to the 4017 counter as I am going to drive the counter input with the TI99 so that it is in control of the count and the outputs are going to the motor drivers not LEDs.
Two things that are important is that the count must always run to the end (or generate a reset) and the required count output is the only one that activates a motor function.
For the first requirement the TI99 must hold the current count and always count to the maximum if a lower numbered output is to be selected - I am pretty sure that it will be able to count to ten and back!
The other requirement that is needed for the D.C motor drive is solved by the electrical trick of using a CR delay by substituting the LED function with a capacitor and teaming it with a resistor so that a "passing" pulse i.e a count below the required output is not seen by the motor driver and only activates when an output is static.
Furthermore, I am going to add the reset circuitry.
Step 3: Pulse Source
I am going to use the "Joy-stick" port of the TI99 as the pulse source and limit switch input.
Here is the circuit diagram of the "Joy-stick" port which shows that there are two "Joy-stick" select lines and the usual 4 quadrant and "fire" button inputs.
I can connect a 4017 counter to each "Joy-stick" select line so that every time the port is addressed then the counter increments; The button inputs will be used for limit switch and/or position count.
That gives me the 2 axis and I will explain later how to get "on-off" latching for extra control.
Step 4: Driving Motors
To drive a D.C motor
The counter from reset has output "0" at "high" so if the two H-bridge inputs are connected to outputs "1" & "2" then a count of 1 will drive the motor in one direction and a count of 2 will drive the motor in the opposite direction; one more count will stop the motor and/or select other drivers in sequence.
To drive a stepper motor
The counter outputs are used to "Enable" as many stepper modules required (the 4017 has 9 outputs and can be cascaded) and the 555 timer is connected to all modules to provide the clock rate. The output will need to be inverted with a transistor if using a A4988 module,
To drive a servo
The 555 timer is connected to a servo motor as described by many here but the difference is that the 10 counter outputs each have a timing resistor connected, output "0" has the default value. In this case all other outputs will be pulled to 0v so either the mathematics must be done to compensate or a diode can be inserted to isolate unwanted outputs.
Step 5: Latching Function
I have attached the CD4017 datasheet in which you might notice that the "0" output is active when in the reset state and also that the "Reset" is high active. It should be said that any output could be set at power-up so driver modules must be protected from the possibility that they are inadvertently "on", particularly an H-bridge.
This characteristic means that the counter can be reset by any output that is connected back to it and so terminating the count length. The counters can be cascaded to any length in their multiples with the reset applied from any output.
This feature can also be used on the axis counters.
If I connect output "2" to "Reset" then the counter can only flip between output "0" and "1" giving me the latching function for operating a solenoid/relay or what-ever. I will use one of the other counter outputs as the clock input to provide the selection control.
Obviously, any latch, flip-flop or counter can be used but I have a lot of 4017s to use up!
One other feature of this chip is that the clock is a Schmitt trigger input making it comfortable with a CR delay as I proposed for "passing" pulses. If the Schmitt trigger input is not important it turns out that the "Enable" input can be used as a negative trigger input.
Step 6: Summary
As I said, I cannot physically provide a prototype just yet but am here to discuss the ideas proposed.
I am looking forward to trying one of the Laser engraver or plotter projects with my ancient TI99 and hope that this gives some of you some ideas. Happy making!
The one thing that the TI99 can do well is mathematics so it would be great to hear that you made a Star Seeker!
Participated in the
Trash to Treasure