|
Nick's Engine with LEGO attachment |
I alluded to this creation in a previous post but could not be specific until I had completed the design and given it to my grandson in AK. I do not know what he will do with it, but it was fun making it.
Long, long ago I made a similar smörgåsbord of electromechanical controls for my nephew though with no electronic control and, apparently, he appreciated it. Whether it had any bearing on the high tech job in electronics he now holds I know not. Thinking of this mixed with my foray into trying to market my
LittleDoctor low cost data logger resulted in Nick's Engine.
The idea was to provide a bunch of electrical input and output devices with an inbuilt simple way of associating its inputs to its outputs. These controls can be integrated into something bigger as suggested by the LEGO attachment in the picture. And there is a USB socket for charging the internal battery and also for future control via a computer.
For example, by suitably pressing the button it is possible to associate the knob with the stepper motor. Turning the knob clockwise will then increase the stepper motor speed clockwise, likewise anticlockwise if the knob is turned the other way. Or you can associate the temperature sensor with the stepper motor to create a thermometer. Or make a musical instrument by associating the XY-pad with the loudspeaker. It is also possible to record and replay short audio clips.
The kit is controlled by a
PIC18F1320 microcontroller as used in the
LittleDoctor. So doing posed an additional challenge because this micro is hardly powerful enough for the job. In retrospect it would have been easier using a more powerful micro but, apparently, I like challenges.
The electronics was assembled on a circuit board I designed for the purpose, except that there had to be rather a lot of "patches" because I did not give as diligent thought to the design as perhaps I should have done. And the board is connected to the electrical controls by one or two wires.
|
Showing the lithium cell, circuit board and interconnects |
|
Almost assembled |
For those readers who still have my attention, here is a list of the controls:
Input devices
- "mouse" pad
- microphone
- temperature sensor (thermistor)
- light sensor (LDR)
- digital encoder knob
- push button *
- two analog (0V to 5V) electrical inputs "A" and "B" *
- USB interface *
- light gate phototransistor *
Output devices
- stepper motor (driving cog wheels)
- d.c. motor (with pulley)
- loudspeaker (with headphone socket)
- RGB colour LED behind a translucent window
- 11 indicator LED's *
- light gate IR emitter *
- single pole changeover relay with volt-free contacts *
- two analog (0V to 5V) electrical outputs "C" and "D", one is balanced *
- USB interface *
The items marked * are available only when the Engine is programmed via its USB interface. In stand-alone mode (i.e. no USB control) the button is used to pair an input with an output, and which input and output is active is shown by the corresponding indicator LED being alight. In USB mode the button and indicator LED's are available as separate controls.
I created the Engine because I think a lot of my grandson and, of course, because it is exactly what I would have loved to have had given me when I was that age. I am aware that his inclinations are unlikely to exactly concur with mine so I am now "hands off" - let him do what he wants and I will try not to be offended!
But the job isn't finished yet. Whether or not it is ever used I have started writing PC software that will provide a very simple programming interface to the Engine so that a construct like:
when noise
color = red
wend
will change the colour LED to red if the noise level is above a preset level, the construct being event driven by the Engine.