Exercise, Week 17 - Mechancial Design, Machine Design
Group Assignment
This week assignment is to design and build a Hand Sanitizer Dispenser machine includes
mechanism, actuation and automation. This machine can operate manually or automatic to
dispense hand sanitizer and replace the dispensing bottles to ensure sufficient supply of alcohol
antiseptic.
This is a group assignment done with Ting Kok Eng, Noel Kristian and Lucas Lim.
Our collective work is documented on the SP Fablab Website Assignment 12 and hence only
my learning and reflections are documented here.
Individual work
This is week topic is on Mechancial Design, Machine Design. I am working on the electronic
design for our Hand Sanitizer Dispenser machine. My works involve designing and testing of
electronic circuit, and programming an Arduino UNO to control the electronic setup.
My designing and testing of electronic circuit consist of the following:
1. Design, control and test an Infrared Proximity Sensor (IR sensor) to detect user hand.
2. Design, control and test a Servo to dispense hand sanitizer from dispensing bottles.
3. Design, control and test a second Servo to turn and replace dispensing bottles after maximum compression of a dispensing bottle is detected.
Video of Testing Electronic Design for our Hand Sanitizer Dispenser Machine
Electronic Design for Hand Sanitizer Dispenser Machine
Description of Electronic Design
· Servo A (SM-S4315M) is used in our dispensing mechanism for our Hand Sanitizer Dispenser machine.
· Servo B (Parallax Standard Servo) is used to represent a stepper motor (28BYJ-48) for our bottle changing mechanism, refer to Lucas Lim web site for stepper motor control.
· Red LED turn on to indicate object is detected.
· Green LED turn on to indicate Servo A is ready to turn.
· Both LEDs blinks to indicate Servo B is turning.
· Infrared Proximity Sensor (MOD44) is used to detect user hand, the out port can connect to a microcontroller I/O port.
· Arduino UNO is programmed to control the electronic setup.
Sensor Selection
We need a sensor for our Hand Sanitizer Dispenser machine to detect a user hand, it had to be
small in physical size, non-contact, short distance, and fast obstacle detection. We had
shortlisted 2 different sensors, an ultrasonic sensor and an infrared proximity sensor. Finally, we
chose infra-red sensor as ultrasonic sensor is bigger in size and may not be suitable for
detecting the contour of a human hand.
Selected Infrared Proximity Sensor (MOD44)
Infrared Proximity Sensor MOD44 is a 3-5V DC power input device compatible with Arduino features. The green LED indicator on the board will turn on when the module detects an obstacle in front of the transmitter and receiver, and the OUT port sustains low signal output. The module can detect any object at distance from 20mm to 300mm at angle of 35 °. The threshold comparison voltage can be adjusted through a potentiometer, this set the detection distance for the module. Physical size of the module is 45mm by 15mm and weight is 8g.
Program Code for Controlling Electronic Setup
Description of Program Code
1. Reading the detection status of Infrared Proximity Sensor (IR sensor).
2. Wait and check again the detection status of IR sensor.
3. If detection status is true, red led turn on to indicate object is detected.
4. And green led turn off to indicate tap servo is not ready to turn.
5. Servo A turn to 180 degree i.e. executing compression, then turn back to 0 degree i.e. release compression.
6. Counting compression executed by Servo A.
7. Check detection status, Servo A remain at 0 degree if object remain detected.
8. Read the detection status of IR sensor, if no object detected exit check loop.
9. Reset LED, i.e. Red led turn off and Green LED turn on.
10. Check counter for maximum compression on a bottle used, when reached maximum compression than turn Servo B.
11. Blink Red and Green LED when turn Servo B.
12. Reset counter after Servo B turned.
Video of Testing Electronic Design for our Hand Sanitizer Dispenser Machine
Our machine will be tested with a stepper motor to turn and replace hand sanitizer dispensing bottles, please refer to our group work for more information.
Source Codes for Arduino UNO
1. Arduino Code for controlling electronic Setup, right mouse click and save link: wk17irservo.ino
What I have learned:
1. Infrared Proximity Sensor (MOD44) is a small input device suitable for our machine design, because we need a non-contact, short distance, and fast obstacle detection sensor. And we can use on board potentiometer on the sensor to adjust the sensitivity of detection for our hand.
2. Servo is a compact output device suitable for our machine design, with built-in gear head it can produce enough torque for our mechanical plunger, and it is easy to assemble.