Arduino Back to Work Reminder

by RonFrtek in Circuits > Arduino

101 Views, 2 Favorites, 0 Comments

Arduino Back to Work Reminder

Arduino Back to Work Reminder

In this tutorial we will learn how to make a work reminder using the Ultrasonic sensor and Arduino. Ultrasonic sensor will track the hand movements and if there is no movement for more then 10s a vibrating module or an LED will turn On for 3s. Once it detects the movement it will turn off the vibrating module or an LED.

Watch the video!

What You Will Need

sku_416860_1.jpg
Vibrating module.jpg
FZEK4WBK3XGYAP0.LARGE.jpg
F5OFEUQJJ4ZYFKY.LARGE.jpg
redled.jpg
download.jpg
breadboard.png
VisuinoAdvrtisemenESPNowESP32C3-1.jpg
  • Arduino UNO (or any other Arduino)
  • Ultrasonic module
  • Vibrating module or (1x LED+ 1k ohm resistor)
  • Breadboard
  • Jumper wires
  • Visuino program: Download Visuino


Brought by PCBWay

2022-08-26_13-41-18.jpg

Thank you PCBWay for supporting this tutorial and helping users learn more about electronics.

What I like about the PCBWay is that you can get 10 boards for approximately $5 which is really cost effective for professional made boards, not to mention how much time you save!

Go check them out here. They also offer a lot of other stuff in case you might need it like assembly3D printingCNC machining and a lot more.

The Circuit

2022-11-05_17-21-01.jpg
2022-11-05_17-18-40.jpg
  • Connect Ultrasonic module pin (VCC) to Arduino pin [+5V]
  • Connect Ultrasonic module pin (GND) to Arduino pin [GND]
  • Connect Ultrasonic module pin (ECHO) to Arduino pin digital (5)
  • Connect Ultrasonic module pin (TRIG) to Arduino pin digital (6)

If using Vibrating module:

  • Connect Vibrating module pin (VCC) to Arduino pin [+5V]
  • Connect Vibrating module pin (GND) to Arduino pin [GND]
  • Connect Vibrating module pin (SIG) to Arduino pin digital (2)

If using an LED:

  • Connect Arduino board pin [GND] to LED negative pin [-]
  • Connect Arduino board digital pin [2] to 1k ohm resistor
  • Connect 1k ohm resistor second pin to LED positive pin [+]



Start Visuino, and Select the Arduino UNO Board Type

select-board-uno.jpg
Visuino-Select-Board-UNO.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add & Set Components

2022-11-05_16-27-13.jpg
2022-11-05_16-27-38.jpg
2022-11-05_16-59-06.jpg
2022-11-05_16-54-37.jpg
2022-11-05_16-55-54.jpg
2022-11-05_16-55-10.jpg
2022-11-05_17-00-10.jpg
2022-11-05_17-02-56.jpg
2022-11-05_17-05-53.jpg
  • Add "Ultrasonic Ranger" component
  • Add "Analog Change Only" component
  • Add "Analog Multi Source" component
  • Add "Pulse Generator" component
  • Add "Detect Edge" component
  • Add "Timer" component


  • Select "ChangeOnly1" and in the properties window set "Threshold" to 10 << This means that the value will pass through if the value (Distance) from the "UltrasonicRanger1" changes for 10 or more
  • Select "PulseGenerator1" and in the properties window set "Frequency" to 0.1
  • Select "Timer1" and in the properties window set "Interval (uS)" to 3000000 << You can adjust this value to your needs

In Visuino Connect Components

2022-11-05_16-26-16.jpg
wr.png
  • Connect Arduino digital pin [5] to "UltrasonicRanger1" pin [Echo]
  • Connect "UltrasonicRanger1" pin [Out] to "ChangeOnly1" pin [In]
  • Connect "UltrasonicRanger1" pin [Ping Trigger] to Arduino digital pin [6]
  • Connect "ChangeOnly1" pin [Out] to "AnalogMultiSource1" pin [In]
  • Connect "AnalogMultiSource1 " pin [0] to "PulseGenerator1" pin [Reset]
  • Connect "AnalogMultiSource1 " pin [0] to "Timer1" pin [Reset]
  • Connect "PulseGenerator1" pin [Out] to "DetectEdge1" pin [In]
  • Connect "DetectEdge1" pin [Out] to "Timer1" pin [Start]
  • Connect "Timer1" pin [Out] to Arduino digital pin [2]


Generate, Compile, and Upload the Arduino Code

Visuino-Compile-UNO.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino UNO module, the vibrating module will start to vibrate if there is no movement for more then 30s.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it here and open it in Visuino: https://www.visuino.eu