Open in App
  • U.S.
  • Election
  • Newsletter
  • Tom's Hardware

    Anyone can control these IoT-enabled dorm room traffic lights

    By Ash Hill,

    2 days ago

    https://img.particlenews.com/image.php?url=0wkHra_0uwOOIst00

    Sometimes you need a project that can really motivate you to go—or in this case, also slow down and stop. Today we've got just such a creation thanks to maker and developer Riley Hutton. With the help of an ESP32 microcontroller, he's managed to modify a decommissioned traffic light so that anyone can control it remotely from a web browser.

    According to Hutton, the project began as a decorative light piece for his dorm room at University. The idea was to make it web-controlled so that other students could check it out and activate the lights from a webpage. After it was completed, however, Hutton decided to release the project to the world by posting a link to a livestream video of the traffic light over at Reddit . This was met with great success and thousands of visitors visited the website to interact with the salvaged hardware.

    We took the opportunity to reach out to Hutton who shared more details about the project and its creation. Hutton confirmed that at one point, the website had over 12,000 visitors and 100 people trying to change the light at once. This was enough to blow the green light, forcing a rapid repair. The traffic lights will change instantaneously but there is a 3 to 4 second delay in the video feed.

    You can view the livestream and control the traffic lights via the embedded content below.

    Trying to control a traffic light can be tricky, especially if you haven't tinkered with one before. Hutton explained that he found a transformer behind each bulb that's used to step down the UK mains outlet 230V power to a modest 12V AC. To control these transformers, he's using solid state relays instead of mechanical relays as they silently operate (although we do love the click of a mechanical relay.)

    Hutton chose the ESP32 after using the ESP8266 in a myriad of projects. The ESP32 has a faster clock speed, providing extra bandwidth for the many users attempting to DDOS a traffic light. Programming the ESP32 was made possible via the Arduino IDE, Hutton also took the opportunity to add an OLED display for debug purposes.
    We know what you are thinking. "Could a Raspberry Pi Pico W do the same job?" The answer is yes, and the Raspberry Pi Pico 2 could also do a great job, you'll just need to hack Wi-Fi onto it... with an ESP32!

    Image 1 of 2

    https://img.particlenews.com/image.php?url=03K0YA_0uwOOIst00

    (Image credit: Riley Hutton)
    Image 2 of 2

    https://img.particlenews.com/image.php?url=3yDTb1_0uwOOIst00

    (Image credit: Riley Hutton)

    The ESP talks to the web app using an MQTT broker with the help of Amazon Lightsail. The webpage uses this MQTT broker to receive the user input. The ESP32 subscribes to the correct MQTT topic, then waits for input. As a user clicks on the web app, it publishes a message via MQTT to the broker, where the subscribing ESP32  is waiting. This provides real-time control of the lights used in the traffic lights, with only a few seconds delay being visible on the YouTube livestream

    If you want to see this project in action, you can check it out over at Riley Hutton's website . Hutton will be a guest on a future episode of our show, The Pi Cast.
    We also recommend perusing our list of best Raspberry Pi projects for more cool creations from the maker community.

    Expand All
    Comments / 0
    Add a Comment
    YOU MAY ALSO LIKE
    Most Popular newsMost Popular
    Cooking With Maryann6 days ago
    CBS Miami13 days ago

    Comments / 0