EggBotBoard

The Eggbot kit comes with an electronics controller board called the EggBotBoard, or EBB. This board takes instructions from your computer over a USB cable, and translates them into control pulses to the two motors and solenoid. This lets your Eggbot draw on the eggs!
NOTE: Because of the way stepper motor drivers work, the two driver chips on your EBB will get hot. Even if the motors are not moving, these chips will get hot. Not hot enough to burn you (or even close) but definatly hot to the touch. The power regulator chip in the lower right hand corner of the EBB by the power connector will also get warm with use. This is completely normal, and is no cause for concern. Both the motor driver chips and the power regulator have internal thermal cutouts so that if they ever were to get too hot, no damage could occur.
EBB v1.1 Description
The EggBotBoard contains a microcontroller (Microchip PIC18F45J50), two stepper motor driver chips (Allegro A3967) and a high current digital driver for the solenoid. It takes power from a barrel jack connector (5V to 30V DC) and has two push buttons. One button resets the board, and the other is normally used to enter bootloader mode. A current adjustment potentiometer allows you to set the maximum current to the stepper motors from about 250mA/phase to about 750mA/phase.
For complete design files (schematic, board layout, gerbers, BOM) please see SchmalzHaus.com/EBB

The motor drivers are set up to driver bi-polar stepper motors in 1/8th microstep mode, although this can be changed in software. The Allegro motor drivers are chopper microstepping drivers, which means they will limit the current to the motors and never deliver more currrent than is set with the current adjustment pot.
There are a total of 8 LEDs on the EBB that help you see what is going on at any time. Each motor has red LEDs for step and direction signals. Normally the step signals pulse so fast that their LEDs do not light up much. But the direction LEDs (DIR1 and DIR2) can be usefull for monitoring what direction each motor is rotating. There is a red LED for the solenoid output as well that turns on whenever the solenoid is receiving power. A green LED (3.3V) lights when power is applied to the EBB, and there is a green USB LED that blinks when the EBB is connected to a computer. The red USR LED may be used in future firmware versions.
The EBB also contains 12 general purpose I/O pins. With custom firmware, these pins can be used to control other things or as inputs.
EggBotBoard Commands
The EBB firmware connects to computers over USB, and it appears as a virtual serial port (CDC USB class) on the PC. This allows anyone to write a program in just about any language to communicate with the EBB. If you want to interactively communicate with your EBB, open up a terminal emulator (like Tera Term) and find the COM port that your EBB is on. Baud rate and hadshaking settings do not matter. Then you can issue any of the commands below to your EBB.
The EBB firmware is based off of the UBW firmware D version 1.4.3. All commands that work with that firmware will work with EBF (EggBot Firmware).
Two new commands were added to support the functionality of the Eggbot:
SetPen command
Format "SP,<value><CR>"
<value> is 0 or 1
Use this command to command the pen to go up (0) or down (1).
Stepper Motor command
Format "SM,<duration>,<axis1>,<axis2><CR>"
<duration> is a value from 1 to 65,535 and is in milliseconds. It represends the total length of time you want this move to take.
<axis1> and <axis2> are values from -32,767 to +32,767 and represent the number of steps for each motor to take in <duration> ms.
If both <axis1> and <axis2> are zero, then a delay of <duration> ms is executed. <axis2> is an optional value, and if it is not included in the command, zero steps is assumed.
Use this command to make the motors draw a straight line at constant velocity. The maximum speed that the EBB can generate is 25,000 steps/s. It is helpful to use this command with zeros for both <axis> parameters after moving the pen up or down to give it time to finish moving before starting the next motor move.
Bootloader - Updating Your EBB Firmware
The EBB is programmed with Microchip's USB HID bootloader. This means that you can use the USB connection to your computer to put new code on the EBB in the future.
Follow these steps to update the firmware on your EBB:
- Download the HIDBootloader.exe application (only do this the first time)
- Download the new HEX file that contains the firmware you want to program (see below)
- Plug in the USB cable and the power cable to your EBB, and connect it to your computer
- Press the PRG button, and press and release the RST button, then release the PRG button.
- If this is the first time, Windows will install the new HID device
- Your EBB should be alternating red/green USR and USB leds. This indicates successful entry into bootloader mode.
- Run the HIDBootloader.exe application. In the window it should say "device attached".
- Click "Open Hex File" and navigate to the HEX file you downloaded in step 2.
- Click "Program/Verify" and wait for the programming to finish.
- If no errors occured during programming, click "Reset Device"
- Your new firmware should now be running on your EBB. To confirm that you are running the version you downloaded, open up a terminal emulator (we like Tera Term), and open the COM port that the EBB is on. Then type V and press enter. You should see a version string print out that tells you what version of firmware is currently on the EBB.
Availalable Firmware Versions:
Firmware Version 0.8 for EBB v1.1 (HEX file) - inital public release - right click and choose 'save-as'