Skip to content

A brief Arduino program that samples the voltage outputted by a photoelectric liquid-level sensor.

Notifications You must be signed in to change notification settings

jilinzheng/RainResponse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Rain-Response

Description

The program begins by setting predetermined Arduino pins to inputs and outputs needed in the device. Two helper functions are used throughout the program, namely countDropsand motorControl, with the former sampling the amount of 'rain' detected on the photoelectric liquid-level sensor and the latter setting the speed and direction of a DC motor (behaves as windshield wipers). The loop function in the program continuously checks the number of 'drops of rain' on the photoelectric liquid-level sensor by calling the countDrops helper function, and changes the brightness of the LEDs, as well as the motor configuration via the motorControl helper function, accordingly.

Usage

This program was used for the microcontroller in a hands-on project, namely a "Rain-Sensing System for Automobiles." At the top of the program, multiple variables are mapped to various components of the device:

  • rainSensor maps to the photoelectric liquid-level sensor;
  • ledMOSFET maps to a MOSFET that controls the brightness of two LEDS;
  • motorMOSFET maps to a MOSFET that controls the speed of a DC motor;
  • relayControl controls the direction of a DC motor (by flipping the voltage polarity across the motor).

The device in action can be found in the YouTube video below!.

Demo Video

A full report of the project can be found here.

Project Timeline: May - June 2023

About

A brief Arduino program that samples the voltage outputted by a photoelectric liquid-level sensor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages