To format for printing, click here.
Motor/Sensor Expansion Board
Plugging It In
The Motor/Sensor Expansion Board is easy to use. Start off by plugging it into your Handy Cricket. You can use either bus port they're both the same.
The Board provides two additional motor outputs, named c and d. The Handy Cricket includes commands for using them; they work just like the Crickets built-in motors.
The motor outputs respond to the standard motor commands on, off, thisway, thatway, rd, onfor, and setpower.
For example, to turn on motor output c:
To turn on motor output d at full power for 2 seconds:
d, setpower 8 onfor 20
There are four sensor inputs on the Expansion Board, numbered from 1 to 4. These inputs use the same connector as the analog sensor connector on the Handy Cricket itself. Any sensor for the Handy Cricket may be used with the Expansion Board; plus, the Expansion Board gives new sensor capabilies (encoders) that the Handy Cricket does not have.
All of the sensor command require the driver file shown below. The contents are also available here. These driver procedures should be copied and pasted into the Cricket Programs window, along with your own procedures for running the Cricket.
Basic Sensor Inputs
There are four new commands for reading the sensor inputs 1 through 4: sensor1, sensor2, sensor3, and sensor4.
For example, to beep if the value of sensor 1 is less than 50, try this test program:
to beeptest loop [ if sensor1 < 50 [beep] ] end
The four inputs can also be used with switch/pushbutton sensors. The commands then used are switch1, switch2, switch3, and switch4.
For example, to beep if a switch plugged into sensor port 1 is pressed, try:
to beeptest loop [ if switch1 [beep] ] end
The sensor ports have 8-bit A/D converters; converted readings are in the range 0 to 255.
Using Two Motor/Sensor Boards on One Cricket
Up to two Motor/Sensor boards may be used on one Cricket. The second board should be modified by soldering a jumper wire across the ID holes located along the top edge of the board.
After a board is jumpered, its sensors are renumbered from 5 to 8, and its motors are relettered to e and f.
One jumpered board and one non-jumpered board can then be controlled from a single Cricket.
Here is the driver file with additional commands for the second board.
The Motor/Sensor Expansion Board measures 2.00 x 1.425. There are four mounting holes at the corners of a 1.70 x 1.15 rectangle.
The Expansion Board can be used with an external power supply by cutting the marked trace on the underside of the board and applying the supply voltage to the pads labeled EXT + . The external power will run the motors only; logic circuits will still draw power from the Handy Cricket.
A voltage supply of up to 12v may be used. Please note that the trace on the underside of the board MUST be cut if external power is attached. Otherwise, the voltage will flow back into the main Cricket's supply and potentially burn out the circuits that require no more than 5v.