Multifunction Device STANESCU-FLOREA David-Ioan
Introduction
Short presentation of the project:
Measures the atmospheric temperature around the device, acts as a proximity detector(Sonar Ranger), can be used as a potentiometer and has both a stopwatch function and a 24h Clock function.
This device isn't focused on solely doing one thing - just as a multimeter - can have different uses in different scenarios ; and it's main advantage is the modulation - can be added or swapped any kind of function
As mentioned before, having a multifunctional device is an advantage in an uncertain situation - so, I wanted to create a device with multiple uses
General Description
Hardware Design
Modules & Pieces:
Multifunction Shield
Arduino Uno R3
HC SR04 Sonar Module
LM35 Temperature Sensor
3 Resistors
3 LEDs
Colored Wires
Project Design (without the Multifunction shield *not found on Tinkercad)
Software Design
Firmware Description:
Arduino IDE
MultiFuncShield Library, Timer1, Wire
for each mode there will be a separate function which on button press, it will reset (if already in a mode) or change to the assigned mode (if in neutral mode)
Sources: Hackatonics ; implemented functions: startFunc(), temp(), potentiometer(), sonar(), stopwatch(), alarmClock(), displayTime(), clockISR() ;
Obtained Results
The project works as intended - with selectable modes, with multiple functions and modular:
Button 1: Temperature Mode
Button 2: Potentiometer Mode (it is also used as a bridge between the modes that must be Long-Pressed)
Button 3: Sonar Mode (or Proximity Sensor/Parking Sensor Mode)
Button 1 Long-Pressed: Stopwatch Mode
Button 2 Long-Pressed: Alarm-Clock Mode
Conclusions
This project was thought to be much like a multimeter - modular and with many uses.
Download
User's Manual
Connect the Arduino through the USB port using a computer or using the 5V special socket.
Please do research before using the special powering socket because you might connect an improper PSU and risk to damage irreparably the device and its components
After the device has power, on the display will appear a message: “HI […] Lets Code” ; you will also see the Red LED turn on, then the Yellow LED
When the device is ready to use, only the Green LED will be turned on and you will hear a beep (after a short delay, the Green LED will turn off)
There are 5 different selectable modes from which you can use the device for:
By pressing once the LEFT BUTTON, you will select the Temperature Mode
By pressing once the MIDDLE BUTTON, you will select the Potentiometer Mode (bridge between modes)
By pressing once the RIGHT BUTTON, you will select the Proximity Sensor Mode (Sonar Ranger)
By LONG-PRESSING the RIGHT BUTTON, you will select the Stopwatch Mode
By LONG-PRESSING the MIDDLE BUTTON, you will select the Alarm-Clock Mode
To go from one mode to another, you must press once one of the buttons of the modes that ARE NOT IN USE! When the device is good to change modes, the message “CODE” will appear on the display.
If you are in the MODE 4, to reset the mode, you must LONG-PRESS the MIDDLE BUTTON - this will change to the Alarm-Clock Mode (both modes 4 and 5 are thought to be used together, so they are linked)
If you are in the MODE 5, in order to reset the mode, go to the alarm-setting mode and LONG-PRESS the RIGHT BUTTON
Please note that the MODE 4 and MODE 5 have different uses for the buttons, so please read ahead
MODE 4 BUTTON MAP:
When in the MODE 4, the Yellow LED will turn on and will stay on until either Start/Stop the countdown
By LONG-PRESSING the LEFT BUTTON when the counting is stopped/reached 0(notice the Red LED being turned on) you will reset the counter (and the Yellow LED will be turned on)
By pressing the RIGHT BUTTON when the counter is either reset(or reached 0) or stopped, you will add 10sec to the counter
By pressing the MIDDLE BUTTON when the counter is either reset(or reached 0) or stopped, you will add 60sec to the counter
The display will prompt any modification done to the counter
When the counter reaches 0, you can add seconds right away (notice that the Red LED will remain on to prompt that the stopwatch wasn't reset)
To exit the Stopwatch Mode, LONG-PRESS the MIDDLE BUTTON
MODE 5 BUTTON MAP:
When in the MODE 5, the display will prompt 12:00 in 24h-format
By LONG-PRESSING the RIGHT BUTTON when showing the Hour or the Alarm-Hour, you will be able to modify the clock
By LONG-PRESSING the LEFT BUTTON when the clock is showing the current time, you will activate/deactivate the alarm (see the top built-in Red LED turning on/off)
By pressing the MIDDLE BUTTON you will be able to change between the clock and the set alarm
The display will prompt any modification done to either the clock or the alarm
To exit the Alarm-Clock Mode, go in alarm set mode (MIDDLE BUTTON) and LONG-PRESS the RIGHT BUTTON
—
David-Ioan STANESCU-FLOREA (116583) 2022/05/23 17:47
Bibliography/Resources