Electronics Edit

The router is uses an Arduino Uno as its brain, which is connected by USB to a computer running the host application that sends it commands. The Arduino is powered by the USB connection. There are two other power supplies: one for the spindle motor (which provides 0-100V DC varying in accordance to the resistance on a potentiometer) and one for the stepper motor drivers (24 VDC). Incoming power must be 240 VAC for the spindle supply (the stepper supply can be either 120 or 240), so make sure to plug the router into the converter box rather than directly into the wall.

The stepper drivers take step, direction, and enable signals from the Arduino and output the appropriate voltages to the four stepper wires. They also take the +5V signal from the Arduino as a reference voltage. The signal wires are color coded: step signal is yellow, direction is green, enable is blue, and +5 is, as usual, red. The drivers have a series of small switches on their sides; these control the microstepping, maximum current, and "decay mode." They can be run at the maximum current (3A); I'm not really sure what decay mode does, but the default of 'no decay' seems to work fine. If you adjust the microstepping, make sure to adjust the steps per mm settings in the firmware. There is a chart on the driver that indicates which switches do what.

The router uses mechanical limit switches for its endstops. They are wired in the normally open configuration and make use of the Arduino's internal pullup resistors, so they will read high when they are not pressed. When they are pressed, the circuit is closed, connecting the pin to ground. Black wire is used for the connection to ground, and white wire is used for the signal.

A better solution for switching power on/off to the spindle motor is necessary; currently there is no way for the Arduino to do this - it must be done by having a human flip a switch. Also, the emergency stop switch is not rated for as much current as Mouser had claimed. Using a relay, which is an electromechanical switch, to open and close the high-current circuit in response to a low-current signal is probably the way to go. Even the current needed to operate most relays is too high to be run directly off an Arduino output (which are limited to an absolute max of 40mA), so an intermediary transistor is required.

Software Edit

I (Nathan) have written firmware and a host application for the router. Routers aren't so different than printers that a printer host/firmware couldn't (with some modification, perhaps) be made to work, but this way I got to learn how these things work in great detail, and they are more customized to this particular machine.

Firmware Edit

Link to firmware on github

The firmware is what runs on the Arduino on the router. Its two jobs are to communicate with the host (which is being run on a separate computer), from which it will receive commands, and then to execute those commands.

Host Edit

Link to host on github

The host software works essentially the same way as Repetier Host for a 3D printer. It presents a GUI to the user, who can load a Gcode file, or type individual Gcode commands, or press buttons to move the axes. It also handles the communication with the router over the serial port (really a USB connection pretending it's a serial connection, like usual for Arduinos).

CAM Edit

Computer Aided Manufacturing software performs some combination of the roles of Slic3r (for printing) and a 3D modeler. I am starting to write my own CAM software, but this is a much bigger and more difficult project than either the host or the firmware. This will be what generates Gcode for the router.