You are on page 1of 9

嵌入式系統

Introduction to Embedded System Design

Part10: Auto soap/alcohol dispenser

授課教師
Che-Wei LIN (林哲偉)

1
Introduction

 Because of the pandemic of COVID-19, many medical supplies


are missing.
 Commodities such as auto soap dispenser have been in short
supply.

2
Objectives

 To familiar with how to build the complete system with Arduino


UNO based on different sensors
◆ 12v DC motor
◆ Motor driver IC
◆ Infrared sensor
 To implement an auto soap/alcohol dispenser that can automatically
release soap/alcohol without contact

3
Specifications - 12v DC motor

 Pump size: 90mm × 40mm × 35mm


 Outlet diameter:
◆ Inner / outer diameter: 6.0 / 8.5 mm
 Working voltage: 6-12V
 Working current: 0.6-2A VCC
GND
◆ Power must reach more than 5-6W
 Flow rate: 1-2L / Min
 Suction range: 2 meters
 PIN:
◆ VCC(red): 6-12V
◆ GND(black): GND

4
Specifications - motor driver IC: L293D

 Supply-voltage range: 4.5 V to


36 V
 Drive currents: up to 600 mA
◆ Bidirectional driver current
PIN
Description
NAME NO.
INPUT 10,15 Driver inputs, noninverting
OUTPUT 11,14 Driver outputs
EN 9 When this pin is at a high voltage,
the IC on the right half can be
activated
GND 12,13 Device ground
VS 8 Power VCC for drivers 4.5 V to 36
V
VSS 16 5-V supply for internal logic
translation

5
Specifications - infrared sensor: HW-201

 Operation Voltage: 3.3V - 5V


 Active Output level:
◆ Outputs Low logic level when potentiometer
obstacle is detected
 Detection angle: 35°
 Detection distance: 20-30 cm
◆ It can be adjusted by the
potentiometer
» Clockwise: the detection distance
increases
 PIN
» Counterclockwise: the detection
distance decreases ◆ VCC: 3.3V-5V
◆ GND: GND
◆ OUTPUT: digital 0 or 1

6
Wire connection

out
VCC
GND
IR sensor
D2 D13

Arduino L293D 16

PIN15
Vin 5V GND 14
13 MOTOR

PIN8 9

7
Basic Arduino example

 Use digital 2 input, and digital 13 output start signal

8
Lab Requirement

 Please make a auto soap/alcohol dispenser

 Lab requirements are:


◆ To detect there is a hand in front of the infrared sensor
» Attention: try to avoid false alarm as much as possible

◆ After detecting there is a hand, please release soap/alcohol for one second

◆ Time interval between two soap/alcohol should be at least five seconds

 Your score will be higher if you can design a mold for your auto

soap/alcohol dispenser

You might also like