The electrical subsystems were a less iterative process than the mechanical parts. They were implemented as needed to integrate functionality from the software to the mechanical systems. To control each of our electrical subsystems, we use an Arduino Uno. The user will optimally have no interaction with the electrical systems, however, we still use our electrical system to meet our goals for the user experience.
Z Axis and Extrusion
The Z axis is manipulated by a 12 V DC motor running a lead screw. In order to keep the tip of the applicator pen at the optimal distance from the hand, an infrared sensor near the tip gives a proximity reading to the motor controller. This feedback loop allows for more accurate henna design execution, and also protects the user's hand from uncomfortable prodding. To run the motor and protect the Arduino, we use an Adafruit Motor Shield with a 12 V power supply.
In early an iteration, the proximity infrared sensor was used apply henna when the hand was close to the applicator pen. The following link was the early proof of concept for accuracy of the IR sensor as a proximity sensor.
X and Y Axes
In order to manipulate the gear belts on the X and Y axes, we use 12 V stepper motors. Unlike the DC motors used in the Z Axis, the stepper motors draw 1.3-1.5 A of current, over the Adafruit Shields limit of 1.2 A. In order to protect the Arduino, the motor shield, and to provide 12 V to the motors, we decided to buy separate stepper motor drivers, rated for 8-35 V and a maximum of 2 A. This allowed us to run our motors for extended periods of time without fear of overheating. In addition, they are very sensitive to small changes in input voltage, requiring some capacitors in order to smooth out the VMOT. The motor drivers are controlled via an Arduino Uno pulsing the STEP input, where each positive edge leads to one step. The video below demonstrates our first iteration, with basic code to move the gantry in a desired direction.
Emergency Stop Kill Switch
The electrical switch at the side of HennaBot is used for the stopping of the machine in the case of an emergency. It cuts the power supply provided by the Adafruit Shields, thus disabling all motors running in the process. This addresses the goal of a safe and comfortable user experience, because it gives the user an additional safeguard of control in case of a malfunction. In addition to a hard electrical stop, the code turns off the motors whenever possible, preventing stray bits from causing malfunctions. This is not intended for regular use in order to turn off the HennaBot, because it would disrupt a design, but is an important addition.