Traffic Lights (Ampel) for Arduino / ESP32 & Co.
We calculate the final price from your selected file. You review and accept it before payment.
Saved on this device.
Simple traffic light using a WS2812 / Neopixel Stick - control by Arduino, ESP32, Raspberry, Microbit, Calliope, ...
- Rating
- 5 / 5
- Likes
- 61
- Downloads
- 600
- Makes
- 1
- Views
- 3,335
- Reviews
- 2
Updated at source:
Model information
- Source
- Printables
- Category
- Electronics
- License
- Open Community License v1
Traffic light (Ampel)
A Neopixel Stick traffic light - Quick and easy to build - Snap fit - no screws needed
Final dimension (assembled): height 17.5cm, width 4cm, depth 4cm
- No support
- Orientation as in the files
- Infill 15%
- Material: PLA
- Filament clear 4g / Filament black (matte) 42g
Parts needed
- Microcontroller of your choice (Code examples see below)
- Neopixel Stick (or similar e.g. https://www.roboter-bausatz.de/p/8bit-rgb-led-leiste-aehnl.-neopixel
- Jumper cable ≥ 20cm e.g. https://www.roboter-bausatz.de/p/40-pin-dupont-jumper-kabel-buchse-stecker-40-cm
Solder
Cut the jumper cable on one side and solder it to the LED stick (GND, 5V, DIN)
Assemble
- Insert the stick as shown in the pictures
- Fix the stick with using the spacer (make sure it is in the right direction)
- Push the cable including connector through the standpipe
- Connect the stand pipe
Connect & Code
Pls. note that the WS2812 (Neopixel) stick is directly connected to the controller. It does NOT need a own power source. Connect just the controller.
This is possible by using only a few LEDs. The controller can deliver enough current. Voltage 3.3V or 5V does not matter in this case.
Calliope:
LED Stick 5V → Calliope +
LED Stick GND → Calliope -
LED Stick DIN → Calliope P0
ESP32:
LED Stick 5V → ESP32 3.3V
LED Stick GND → ESP32 GND
LED Stick DIN → ESP32 D16
Code example: https://wokwi.com/projects/397147458586094593
Arduino:
LED Stick 5V → Arduino 5V
LED Stick GND → Arduino GND
LED Stick DIN → Arduino D6
Code example: https://wokwi.com/projects/397144578284602369
LEDs are named from 0 to 7 (from top to bottom) visible are: red (0,1) yellow (3,4) green (6,7)
Covered by spacers are LED 2 and 5.
Pedestrian Traffic Light
A matching pedestrian traffic light you can find here: https://www.printables.com/model/1314088-pedestrian-traffic-lights-ampel-fuer-fussgaenger
Its using the same stick and similiar code.
######################################################
More information about Neopixel, code examples, connections and warnings at: https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels.
The sample code has been tested with original Adafruit Neopixel sticks and may require adaptation when using other sticks.
Disclaimer
Pls check the documentation of your microcontroller before connecting.
I do not take any liablity for damages or injuries. Build and use at your own risk. The linked products and pages are for reference only. I dont get paid for from the owners.
#######################################################
[German translation]
Ampel
Eine schnell und einfach zu bauende Ampelfür Calliope, Arduino, ESP32, Raspberry & Co.
Benötigt wird:
- Arduino, ESP32, Raspberry,ESP8266, Microbit... oder Calliope
- Neopixel Stick oder ähnlich z.B. https://www.roboter-bausatz.de/p/8bit-rgb-led-leiste-aehnl.-neopixel
- Jumperkabel ≥ 20cm z.B. https://www.roboter-bausatz.de/p/40-pin-dupont-jumper-kabel-buchse-stecker-40-cm
- keine Stützstrukturen nötig (ohne Support)
- Orientierung auf dem Druckbett wie in den Dateien
- Füllung (Infill) 15%
- Material: PLA
- Filament klar, durchsichtig 4g / Filament schwarz (matt) 42g
Abmessungen (zusammengebaut): Höhe 17,5cm , Breite 4cm, Tiefe 4cm
Löten
Jumperkabel hinter dem Stecker abschneiden und am LED Stick anlöten (GND, 5V, DIN)
Zusammenbauen
- Stick wie auf den Bildern zu sehen einlegen (Richtung beachten)
- Stick mit doppelseitigem Klebeband befestigen
- Kabel mit Stecker durch das Standrohr schieben
- Standrohr ins Gehäuse stecken
Verbinden & Programmieren
Calliope: 5V → + , GND → - , DIN → P0
Arduino: 5V → 5V, GND → GND, DIN → D6, Beispielcode https://wokwi.com/projects/397144578284602369
ESP32: 5V → 3.3V, GND → GND, DIN → D16 , Beispielcode https://wokwi.com/projects/397147458586094593
Bemerkungen
Die LEDs werden im Programm mit 0 bis 7 benannt. (von oben nach unten) Sichtbar sind: rot (0,1) gelb (3,4) grün(6,7) Verdeckt durch die Abstandshalter sind: (2,5)
Mehr Informationen zu Neopixel, Codebeispiele, Verbindungen und Warnhinweise unter: https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels
Der Beispielcode ist mit originalen Adafruit Neopixel Sticks getestet und benötigt ggf. Anpassung bei Verwendung anderer Sticks.
Disclaimer
Das ist ein Hobbyprojekt. Bitte prüft vor dem Anschluss die Dokumentation Eures Mikrocontrollers. Ich übernehme keine Haftung für Schäden oder Verletzungen. Bauen und benutzen auf eigenes Risiko. Die Links auf Produkte oder andere Informationen dienen nur der besseren Erklärung. Ich erhalte keine Vergütung von den Seiteninhabern.