16.5 Electronics and Software

16.5 Electronics and Software

Electro-Mechanical Components


The electronics for our project were composed of 5 main components:

  • Arduino Uno Microcontroller - Serves as the central controller, coordinating the operation of the entire encoder system. The Arduino was used to control the time, speed, and actuation of each of the three motors. This microcontroller was chosen due to our experiences with using the Arduino Uno before. Furthermore, the Uno is a cheap, durable prototyping controller that allows for multiple digital and analog inputs and allowed us to reduce the form factor by eliminating the need of a bread board or proto board. Finally, the Uno is also fairly easy to program with the Arduino software.

  • Gearhead 100RPM DC Motors - These standard DC motors deliver simple rotational motion without. In our final product we used two of these motors to drive the crank for the linkage mechanism and to drive the belt-pulley system. These motors were chosen because they were inexpensive and provided enough speed and torque needed to run both our systems effciently. Due to the nature of our mechanism “writing”, we needed a fairly low speed motor and the 100 RPM no load speed of the Gearhead allowed us to have more fine controls over the speed without sacrificing functionality.

  • MG995 Servo Motor - This servo motor was chosen as, once again, the load and speed needed for the application of moving the ground link was very low. This servo allowed us to accomplish accurate and precise positional controls within a lower budget. This motor allowed us to adjust the position of Ground C through specific input angles, toggling the mechanism between dash and dot configurations.

  • L298N Motor Drive Controller - The motor drive controller allowed us to control the DC motors with one controller. This controller served to direct the correct voltage needed for each motor, and allowed for low-level controls of the 2 DC motors.

  • S-100-12 Power Supply - Converts 60V AC to 12 V DC to supply power to all system components through a regular wall outlet.

Screenshot from 2025-04-18 16-47-08.png
Arduino Uno Rev3
Screenshot from 2025-04-21 14-18-01.png
Gearhead 100RPM DC Motor
image-20250422-213447.png
L298N Motor Drive Controller
Screenshot from 2025-04-18 16-49-52.png
MG995 Servo Motor
Screenshot from 2025-04-21 14-21-19.png
S-100-12 Power Supply

Software Script


The software for our project was conducted through the Arduino software to allow easy interaction and testing with the Arduino Uno microcontroller. Our overall script involved multiple test cases and was organized into various functions to define and provide flexibility when coding the application order. Some of these functions include:

  • setup() - Initializes all necessary pin connections, including PWM pins for the crank, paper feed, and servo motors. It also sets up a serial communication port for debugging.

  • loop() - Acts as the main application loop, calling the appropriate functions in order to draw the characters U and T.

  • motorTests() / drawTest() - Helper functions during the development process.

  • drawU() / drawT() - Encodes the respective character into Morse code and triggers the appropriate drawing actions.

  • addSpace() - Controls the paper feed motor to move the paper a specified distance, creating space between symbols and letters.

  • drawCharacter() - Controls the servo motor to set the linkage to the required character profile (dot or dash), then activates the crank motion for a full revolution to imprint the symbol.

arduino_ide.png
Arduino IDE used to write our software

Motor Evaluation and Configuration


A key parametric we developed through testing was the action and run time we needed for each of the motors. This was important as we wanted the crank to effectively do one revolution repeatedly without change in start position. In addition, due to the utilization of a second motor for the paper feeder, to allow the mechanism to write cohesively, we needed to run the paper feeder for different times depending on spacing needed after a “dot”, after a “dash”, and after an entire character. Using the motor controller allowed us to fine tune these metrics and ultimately achieve the correct configuration for different timing and angle setups. The final parameters are outlined in the table below:

Motor

Action

Parameter

Motor

Action

Parameter

Crank

Full Revolution

630 msec

Paper Feeder

Dot Space

300 msec

 

Dash Space

470 msec

 

Character Space

770 msec

Servo

Dot Configuration

36 deg

 

Dash Configuration

85 deg