We created a small demo “how to drive a step motor from scratch”
Scratch is a development environment from MIT to learn to program. All programs are open source. For this reason you can very easily copy and share the programs. To get the demo running, press the green flag in the scratch environment after you clicked on the link above.
Scratch does offer options to communicate with the outside world but this requires advanced computer science. For educational purposes we created a small program called “color communication” to drive a step motor using the computer sound card. The “color communication” program looks at 3 positions on the scratch screen to see if a color changes. If the color changes from red to green, the step motor starts. Because we look at 3 location, we have 3 bits (and we probably all know that a bit can be on or off).
Flipping bit 1: Step motor makes 100 steps
Flipping bit 2: Step motor makes 1000 steps
Flipping bit 3: Step motor makes 10000 steps
You can also put a color communication point of interest at the rotating heart. Then your step-motor runs with the rotating heart frequency.
Thus by means of scratch and “color communication”, you (or your children) can move a step-motor with minimum effort. This is important because your children will become the future box joint specialists.
For those interested, you have to follow these steps:
- Download the color communication application in the shop
- unzip and start colorcomm.exe.
- Start the demo in scratch
- follow instructions inside the color communicator to reposition the color location that is monitored.
- Click inside scratch on one of the bits. When they flip from red to green, the step motor runs.
Now do you really need the color communicator ? Of course not. We drive the step motor by means of sound. Thus you can copy the .wav files directly into scratch as an event that happens when one clicks a button.
– drive up to four step motors.
– read and process G-code. GCode is exported from blender (open source 3d modeler) using the blender CAM module.
– automatically home your step motor.
– read stop-switches status (step motor is stopped automatically when a stop-switch is hit.)
– turn direction by means of software.