Categories
TUTORIALS

Using 433MHz Receiver and RGB LED to visualize parking availability

Overview

This tutorial is the last one in the series corresponding to the Smart Parking Philadelphia for CPLN 5710: Sensing the City, which is taught by Allison Lassiter in University of Pennsylvania’s Department of City and Regional Planning.

The tutorial focuses on receiving data from the RF 433MHz Receiver Module, then using RGB LED to visualize the availability level of remaining parking spots in a street section. Our team’s goal is to give drivers a concise signal for their parking decision, which could save both time and energy. This tutorial doesn’t cover the communication between Arduinos, but how to receive data and visualize it. For instructions on how to transmit and receive data between Arduinos, please see the tutorial by Jingyi (link). For instructions on how to detect passing vehicles and calculate available parking spots, please see the tutorial by Changhao or Hang.

Reference

Complete Guide for RF 433MHz Transmitter/Receiver Module with Arduino, published on January 19, 2019. Link: https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/

Elegoo Super Starter Kit for UNO Lesson 4: RGB LED

RGB LED example sketch Version 2.0, by SparkFun Electronics. Link: http://www.arduino.cc

Parts List

The Receiver could be used to receive signal wirelessly from a transmitter up to a distance of 500 feet.

RGB LED actually consists of three LEDs, one red, one green and one blue. By controlling the brightness of each individual LED, we can mix and show the yellow light we need in the following section. By varying the quantities of red, green and blue light, we can make it possible to mix any color we like.

433MHz Receiver & RGB LED

Software

After downloading it, we should unzip the library, then move it into Arduino’s installed libraries folder)

Wiring Diagram

Wiring diagram using wokwi.com

Assembling & Testing

  1. Connect the breadboard to a ground pin and the 5V power pin.
  2. For the signal receiver, we use male-female Dupont wires to connect the power leads to the ground and 5V power pins.
  3. Besides, we also need to connect the input lead of the receiver to digital pin 11 to ensure signal input.
  4. Insert the RGB LED to the breadboard. Each positive lead of the LED should be connected to a 220 Ω resistor to prevent too much current flowing through it.
  5. Wire each positive lead to Uno’s digital pin. The red lead is connected to pin 3, the green lead is connected to pin 5, the blue lead is connected to pin 6.
  6. Connect the longest negative lead of the LED to the ground. Now that all parts are wired.
  7. Connect the Arduino to the laptop, Upload code from the <Code> section below. 
  8. Turn on the serial monitor and test the system by entering different data of remaining parking spots (RPS) in the transmitter’s code (link). We can verify if the receiver is working correctly, and LEDs are showing different colors based on the data we entered.
  9. For example, if RPS <=2, the red light will be turned on. If 3<RPS<=5, the yellow light will show up. If RPS>6, the green light will be turned on. In this way, we could visualize the level of remaining parking spots.

Picture & Video

Circuit of testing prototype

Code

It’s difficult to run the code separately, as we need to maintain consistency with other parts and use two Arduinos to transmit and receive data. Therefore, this part of coding is a collaborative section with Jingyi, but our tutorials still have different focuses. Her tutorial focuses on the communication between Arduinos, while this one is used to process the data from the 433MHz Receiver and visualize it with different colors.

Now, you could detect, calculate and visualize remaining parking spots in a street section following the tutorial series of Smart Parking Philadelphia.

Leave a Reply

Your email address will not be published. Required fields are marked *