Smart Street Light: Energy Conservation



Posted in TechnologyReuse

Introduction: Smart Street Light: Energy Conservation

The Smart Street Lights is an effort to conserve electricity on a large-scale by implementing a motion sensor to allocate minimal light brightness according to the amount of surrounding traffic. As traffic near the sensor increases, the brightness (or in our case, our LED value) will increase in magnitude from off to dim to brightest. At the control of a button, we can have the option to have the light off, sensitive to traffic, and always on, giving the user options to control the light brightness at their preference. In all, this small-scale design can translate into large-scale use by college campuses in an attempt to conserve energy, as well as create a safe environment during low-light times of the day.

Step 1: Background

Our idea stems from an attempt to accomplish two tasks that evade college campuses today: conserving energy and creating a safer campus climate during low-light hours. Our small-scale attempt can bring light to a topic that is not often considered to be an engineering approach, but a societal conversation. Here, we are able to implement our digital design knowledge into a more practical and impactful channel.

Although the concept may seem a bit too complicated for streetlights, the energy saved by this initiative goes much further than just a few dollars here or there. With so many street lights in America unadvised, running the power used to keep them on accumulates. According to “My LED Lighting Guide” website, Los Angeles uses 209,000 street lights - that add up to 197,000,000 kWh of electricity used every single year. According to, the standard price for kWh is $0.12. Every year the street light in Los Angeles uses over 23 million dollars every year. Keep in mind, these dollars are coming from multiple places - including the tax-payer. Extend this idea to all major cities in America and you can see how keeping them on all night can lead to a substantial waste in money. Additionally, that energy used is not only accumulating in dollars spent, but also more pollution into our air. Realistically, most parts of America between 2 AM - 4 AM, the roads are not very populated. This is why we saw the need to help improve our nation environmentally and economically by changing our street lights to a new better concept. Implementing this design in college campuses would save a large amount of energy and money and can even be implemented in a bigger scale for larger results.

Step 2: Materials

The 3 prong motion sensor was connected to the board by three wires. The middle port (white wire) connects to the 5V port on the Arduino, the left port (red wire) connecting to port 7, and the right port (black wire) connecting to the ground. The yellow and black wire connected to port 10 and 8 - these are the output wires that are then hooked up to the top two furthest right ports on the JA ports on the Artix-7.

The following materials were used in the implementation of this design:

- Basys 3 FPGA Board

- Arduino Uno Board

- Micro-USB-to-USB Cable

- Arduino A-B USB Cable

- Vivado Software Arduino Software

- 5 M/M Wires

- Ultrasonic Ranging Module (Small Motion Sensor)

- Breadboard

Step 3: VHDL Modules


This module takes two one-bit inputs and adds them together to create a one-bit output with a one-bit carry-out output. The function of the half adder is to take two different signals to determine if both, one, or none of the outputs is high.


This module takes a 4-bit input and determines which output should be displayed onto the board based off the 4-bit input it is receiving and its present state. This module also allows for states to change based off of a single button. The single button is hooked up to the clock function and if you press the button more than once, it continuously switches through the three different states.


This module brings the half_adder and the BCD_7_segment together by stamping them down onto the same VHDL file. The function of this module is to take the two single-bit outputs received by the half adder and convert them into a single 4 bit input that can be read in the BCD_7_segment module. By creating a signal and assigning each bit to a certain output or constant, allowing the two different modules to work together.


This is the constraint file that allows the code to work with certain functions on the board, such as the buttons and pin inputs. This allows everything from the code to work on the board. The original code was given by Professor Danowitz and updated to match all of the previous mentioned files. This code connects everything to the board from the clock, to which button to press, to what pin to input the 1 bit inputs received from the arduino.

Step 4: Implementing Arduino and Motion Sensor

The motion sensor is able to calculate the distance by sending out signals and then measuring the time it takes for the signal to bounce off an object back to the sensor. After finding this time it is inputted into an equation (which is already written in code) that can be outputted into the Arduino to be read through the code. The sensor can read up to 3 meters.

Arduino Code

This module is designed to read the distance recorded based on how far it reads an object is away from this. Then we place that input into categories which gives us two separate outputs. Then this module hooks both outputs to output out of a pin port using a digitalWrite file to turn the number into an output that the Artix-7 can understand. We then are able to connect wires from the Arduino output ports to the Artix-7 input ports.

In order to complete the implementation, we need to incorporate the external Arduino software in order to take in the motion sensor input and translate it into our VHDL code. To do so, we coded the motion sensor to do the following:

- If no motion is detected, return no HIGH values (0)

- If motion is detected within 50cm-25cm, return 1 HIGH value, 1 LOW value

- If the motion is detected within 25cm, return 2 HIGH values

If you want to change these values, change the numbers next to all the places where it says cm in the Arduino code.

From the Arduino return values, we can wire the Arduino Uno board to the Basys 3 board with M/M wires. This connection allows the values to be processed through the half-adder defined in our VHDL code. The half-adder will take the input signal and display a 0, 1, or 2 values on our Basys LED SSEG-display.

In short, the external Arduino design allows the input to be read from the motion sensor, translate that reading into a HIGH or LOW signal to our VHDL code. This signal then is returned to the SSEG as an output, relaying the “brightness” of the light, proportional to magnitude.

Step 5: Bringing Everything Together

Once we gathered all of our materials and ran our program without immediate errors, we then pursued the final implementation of the motion detector and how it could best be geared towards our final goal of energy conservation. Although our time and materials were limited, we wanted to produce a design that minimized cost in all aspects - the design above is a mobile motion sensor (able to be adjusted position-wise) with a minimized wire connectivity.

Through several testing attempts, we decided that the best definition of our light sensitivities would be as follows: - Distances greater than 50 cm: ‘0’ value (Off)

- Distances between 25 cm - 50 cm: ‘1’ (Dim)

- Distances closer than 25 cm: ‘2’ (Bright)

By combining the Arduino hardware and software with our Basys board and VHDL, we are able to translate the motion in front of the sensor into an output light setting of 0-2.

Step 6: Implementing Tips

If the Arduino is having trouble programming, try checking the tools tab to make sure that the board is set to Arduino/Genuino Uno and the port is set to USB. When programming the the Artix-7, make sure to keep it on a flat surface to avoid the board deprogramming randomly. Lastly, always double check the power/connecting cords and all the connecting wires. Use an open area for testing the motion sensor properly where it can measure up to 3 meters. If you do not have an open area, like we didn’t when we tested, you can use small values for reading the High output so it won’t detect other objects.

Step 7: Educational

This project can help you gain experience if you have interest in going into the electrical or computing world. It gives you practice where you can implement work with two different languages on the different devices. On the electrical side, it shows how you can use two different processing boards to work with each other, as well as take inputs from out of board devices. Furthermore, it shows how to use a breadboard to connect the out of board device to the board and implement all 3 devices. The ability to combine the main board, peripheral board, and peripheral sensor is an incredibly desirable trait for any engineer in the tech industry. With the addition of guidelines to combine combinational and sequential logic, we then had to re-invent the outlook of our design, which, in the end, created a smoother flow of data throughout our circuit. Thus, this design project incorporates digital design and its role in large-scale engineering efforts.

We hope you enjoy this project!



    • Casting Contest

      Casting Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Woodworking Contest

      Woodworking Contest

    We have a be nice policy.
    Please be positive and constructive.