Computer Control Your K'nex

Introduction: Computer Control Your K'nex

About: Co-owner of Reach and Teach - Books, Toys, and Gifts

This is a really easy hack to add external or computer control to any K'nex motor project. There are other instructables that give more complete control of the K'nex motor by having you open it up and directly soldering wires to the motor. These will give you directional control of the motor and allow you to also provide external power to the motor. But, the hack described in this instructable does not require opening up the motor (except the battery compartment) and will allow you to externally turn the motor on and off with just a piece of card stock and a little foil. In this way, you won't need to modify your K'nex motor in any significant way.

This instructable will also show you how to digitally switch the motor on and off using a LCA710. Also check out my instructable about how to externally control any electronics kit.

Step 1: What You Will Need...

For this project, you will need the following:

  • A working K'nex motor with working batteries already installed
  • A printed copy of the PDF included in this step (or use the image as a reference)
  • Glue stick
  • Some foil

DESIGN TIP:You will want to print the PDF at actual size (not resize to fit page. Also it's best to print onto cardstock.

Step 2: Construct the Knex Motor Insert

Take the printed K'nex motor insert from the previous step and cut out the 1" x 2" rectangle. (Note: if the rectangle is bigger than 1" x 2", it means that you didn't print it out at the actual size in your print settings).

Cut out two pieces of foil with the dimensions of 3/8" x 2-1/4".

Use your glue stick to paste the two pieces of foil to the card stock where it is labeled "FOIL" so that foil extends over the top of the cardstock by 1/4". Fold that excess part of the foil and paste to the back side of the card.

Fold along the two dotted lines as shown in the image.

Step 3: Install the Motor Insert Into the Knex Motor

Unscrew the K'nex battery compartment just as you normally would to add or remove batteries (leaving the batteries seated inside the battery compartment). Install the motor insert from the previous step upside down and resting on top of the batteries as shown in the image. Notice that the two foil fingers of the insert will straddle the screw hole that the battery compartment lid will screw into. Now push the battery lid back into place and screw it back into place. This will automatically force the insert into place and in contact with the batteries.

You can test your modified K'nex motor by turning the K'nex motor switch "on" in either the forward or reverse direction and placing anything conductive (wire, alligator clip, etc) across the two foil fingers. You shoulld see/hear the motor operate. SUCCESS!

You can now re-install the K'nex motor into your motorized K'nex project. For our example, we're using the Ferris Wheel build from the basic 35 Model kit.

Step 4: Adding an External Arduino Controller

You're essentially done with this build and ready to add your own external controller, switch, or whatever you want. But for completeness, we will show you how to connect an Arduino controller.

For this part of the project you will need:

  • LCA710 Solid State Relay chip (mounted on any small breadboard)
  • 1K Ohm Resistor
  • Adafruit's Circuit Playground Classic loaded with Reach and Teach's RTPLAYGROUND software (or your own favorite controller if you have one)

A complete kit of parts can be purchased here

The LCA710 is a really easy to use solid state relay. It requires 1.4V to turn its internal switch ON. For this reason, you will need a 1K Ohm resistor between the Solid State Relay and your microcontroller's digital output.

For the controller, we are using Adafruit's Circuit Playground Classic loaded with the RTPLAYGROUND software from Reach and Teach. The Circuit Playground Classic is an Arduino with all sorts of sensors, digital and analog inputs and outputs, switches, and colored LEDs already built into the board. The RTPLAYGROUND software makes it easy to prototype a number of different type of projects using this board without having to write code. You simply select the program function you want and you're ready to go.

You can purchase a Circuit Playground Classic that is already preloaded with the RTPLAYGROUND software at the Reach and Teach website. If you already have a Circuit Playground Classic and you know how to load Arduino sketches using Arduino IDE, you can download the RTPLAYGROUND Arduino sketch on GitHub.

If you are using another controller (arduino, raspberry pi, etc), these instructions will still work except that you will be attaching your own controller to the LCA710 chip and you will need to write a little code to control it.

Step 5: Attach the LCA710 Switch to the Knex Motor and Circuit Playground

Simply wire pin 4 and pin 6 of the LCA710 to the two foil fingers of the K'nex motor. Alligator clip pad #6 of the CIrcuit Playground Classic through a 1K ohm resistor to pin 1 of the LCA710. Attach pin 2 of the LCA710 to any of the pads marked GND on the Circuit Playground Classic.

If you are using another controller (arduino, raspberry pi, etc) instead of a Circuit Playground, attach a digital output pin from your controller through a 1K ohm resistor to pin 1 of the LCA710. Attach pin 2 of the LCA710 to the ground pin on your controller.

Step 6: Configure the RTPLAYGROUND Software and Test

Power on the Circuit Playground and select program function 4 (Laser/Flashlight Tag) on the Circuit Playground Classic as described in the RTPLAYGROUND documentation. Using this function, aiming a laser pointer or flashlight at the Circuit Playground's light sensor will cause the digital output at pad #6 to toggle between digital high and digital low which in turn will operate the K'nex motor.

Alternatively, you can select program function 3 (Contact Tag). Using this function, touching pad #3 and ground at the same time (or grounding pad #3 by any means) will cause the digital output at pad #6 to toggle between digital high and digital low which in turn will operate the K'nex motor.

If you are using another controller (arduino, raspberry pi, etc) instead of a Circuit Playground, you'll just need to write a little code to drive the digital output pin on your controller to HIGH to turn the motor on and LOW to turn it off. This circuit should successfully work with an input between 3.3V and 5V.

And, that's all there is to this demonstration of how you can easily computer control your K'nex project.

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    6 Discussions

    0
    Mister Gears
    Mister Gears

    12 months ago

    i don't understand mine isn't working :-(

    0
    reachandteach
    reachandteach

    Reply 11 months ago

    hmm... I'l try and help you figure it out. Is the problem with the motor or the SSR chip? Does the motor operate when you connect both foil fingers with an alligator clip (making sure that the motor is switched on)?

    0
    Mister Gears
    Mister Gears

    Reply 11 months ago

    Yes I've tested the motor with the battery and it's working. But when I connect it to my optocoupler the voltage drop to around 0,12 volts... Here is an image of my optocoupler, it's not exactly the same as yours.

    IMG_20191030_111830.jpg
    0
    reachandteach
    reachandteach

    Reply 11 months ago

    I haven't tried using just an optocoupler for this application. The LCA710 Solid State Relay that I am using definitely does have an optocoupler in it but also additional circuitry designed to switch a larger amount of current.

    0
    Mister Gears
    Mister Gears

    Reply 11 months ago

    Ah that's maybe why it doesn't work... I will check the data sheet and try to do some adjustments

    0
    Mister Gears
    Mister Gears

    1 year ago

    Mmm... very interesting, i've never used an opto-coupler. It seems much more effectiv for low voltage devices :-)