4. Electronics and Software - Ultimate Union Cutter

Thanks to the highly complex mechanisms involved in this design, the electronics and software were very straight forward. The entire prototype is powered by 12VDC which is fed directly to the L298N motor driver (which contains a 5VDC regulator which powers the Arduino). An Arduino uses PWM to adjust the motor speed and counts the rate at which pulses are received from the encoder to determine the motor's actually velocity. A PID loop is used to adjust the PWM output based on the encoder pulse rate. This results in the motor maintaining a fixed output speed despite changes in loading conditions.

A pushbutton connected to the Arduino allows the user to active the machine. Once half on onion is placed on the cutting board, the user presses and holds the button till the onion cutting cycle is complete. If at any point the button is released, the motor stops immediately. This acts as a simple safety.

Schematic

The following figure shows the electrical schematic for the prototype.

Software

See the Appendix for the complete Arduino code.