Introduction: IoT-Toy-Trafficlight ( Spielzeugampel )

About: Indem ich mich weiter entwickle bleibe ich mir treu !

Welcome to my first instructable,
Willkommen zu meinem ersten instructable,

----------------- english ---------------

it is a guide for you to build a toy-trafficlight for yourself or your kids. On top there is an included police-mode, an moodlight and an sleep timer. The Light is controlled with your smartphone using WiFi.

----------------- deutsch ---------------

Es handelt sich um eine Anleitung um eine Spielzeugampel selber zu basteln. Zusätzlich hat die Ampel einen Polizei-Modus, ein Moodlight und eine automatische Abschaltung. Die Ampel wird mittels Smartphone über Wlan gesteuert.

Step 1: Materials and Tools / Bauteile Und Werkzeuge

----------------- english ---------------

Materials

  • ESP8266 Board ( i like the YISON ESP-01/ESP-202 Development Board from Eckstein-Shop)
  • usb power bank
  • some ws2812b addressable LEDs aka neopixels ( i use a stripe in this Projekt )*
  • some cable ( i used some IDE-cable from old PCs )
  • USB-cable ( depends on your ESP8266 Board )
  • Housing for the light

Tool

  • soldering equipment
  • scissors
  • tongs
  • hot glue gun
  • Old Smartphone (optional)
  • Ruler / pen

* You can use single Neopixels an solder them in the Way you need them, cut the Stripe or buy pre soldered rings in different sizes. The amount depends on our project. You decide how many LEDs per Lamp and how many Lamps you need. In my project i use 8 lamps with 3 neopixel per lamp.

At least you need an PC with an installed Arduino IDE (with ESP-Support) ... and my Code

----------------- deutsch ---------------

Bauteile

  • ESP8266 Board ( ich mag das YISON ESP-01/ESP-202 Development Board von Eckstein-Shop)
  • usb power banksome
  • ws2812b addressable LEDs auch bekannt als neopixels ( ich setze hier in Stripe ein)*
  • einige cable ( hier die alten IDE-Cabel aus nem verschrotteten PC )
  • USB-cable ( je nach dem ESP8266 Board )
  • Ampelgehäuse

Werkzeuge

  • Lötausrüstung
  • Schere
  • Zange
  • Heißklebe-Pistole
  • Altes Smartphone (optional)
  • Lineal und Stift

*Es können einzelne Neopixels verlötet werden, der Stripe in Stücke geschnitten werden, oder es werden vorgefertigte Ringe eingesetzt. Wie viele LEDs benötigt werden hängt vom Projekt ab, die Anzahl der Lampen und der LED pro Lampe ist variable. In meinem Projekt kommen 8 Lampen mit jeweils 3 Neopixeln zum Einsatz.

Zum Schluss benötigt man noch einen Rechner mit installierter Arduino IDE ( und ESP-Unterstützung) .... und meinen CODE

Step 2: Circuit Sketch / Skizze Des Aufbaus

----------------- english ---------------

Solder the Databus to GPIO - 02. Get the 5V from the Board. Do not use the VSS from the ESP8266 it uses only 3.3V. Connect GND to the GND from the Board.

Then you have to connect the ws2812b LEDs. Solder the firsts pixel DIN ( Data IN ) to the GPIO - 02. The Following Pixels DIN is connectes to the previous DOUT ( Data Out).

----------------- deutsch ---------------

Der Datanbus der ws2812b wird an GPIO-02 angelegt. 5 V werden von Board abgegriffen. Nicht den VSS des ESP8266 nutzen, denn der hat nur 3,3 V. GND wird mit GND des Boards verbunden.

Der DIN (Data IN) des ersten Pixels wird mit dem GPIO-02 verbunden. Die folgenden Pixel werden mit dem DOUT (Data Out) des jeweiligen Vorgängers verbunden.

Step 3: Upload the Code / Hochladen Des Codes

----------------- english ---------------

Please forgive me the missing Comments (at the moment, i hope i'll fix that soon). You can download the Code at github. Adjust the values for the amount of Lamps and LEDs per Lamp to your project settings. If you want to, you can change the WiFi-settings.

  • Connect the ESP-Board to your Computer
  • Open the Arduino IDE
  • Copy-Paste the code and save it in an empty sketch
  • Following the tutorial you should have the correct Board chosen
  • Set the ESP in Programming-Mode (jumperpin next to the powerswitch, then switch on the ESP)
  • Upload the Code

The Code is not written all by myself, i used parts and thoughts from other developers and from the arduino examples. For now its mostly in german. I really love the international DIY-Scene and i don't want to disappoint anyone, but this project was made for the younger Kids from my sister and they don't speak english (at the moment). Maybe there is an english menu soon, ore someone of you guys fork and translate in in future.

Remove the jumper from the pins, if you want to run the installed program.

----------------- deutsch ---------------

Zunächst möchte ich mich für das fehlen der Kommentare im Code entschuldigen, ich hoffe ich hole das später noch nach. Der Code kann in der jeweils aktuellen Version unter github heruntergeladen werden. Dann müssen die Werte für die Anzahl der Lampen und der LEDs pro Lampe an das Projekt angepasst werden. Wenn bedarf besteht, können auch die Wlan Einstellungen verändert werden.

  • ESP-Board mit dem Computer verbinden
  • Die Arduino-IDE (Software) öffnen
  • Den Code in einen leeren Sketch kopieren
  • Wenn der ESP-Support gemäß dem Tutorial erfolgt ist, sollte schon das richtige Board ausgewählt sein.
  • Den ESP in den Programmiermodus bringen (Jumper auf die beiden Pinne neben dem Powerschalter, dann erst den ESP einschalten)
  • Den Code dann mittels der IDE uploaden

Den Code habe ich nicht komplett selber geschrieben. Ideen und Teile sind von anderen Makern, Entwicklern und aus den Arduino Beispielen.

Step 4: Prepare the ESP8266 / Einrichten Des ESP8266

----------------- english ---------------

Solder the data und power cables to the ESP. I used the plug and socket from the stripe, to disconnect it if i want, but that ist optional

----------------- deutsch ---------------

Anlöten der Daten- und Spannungsleitungen an den ESP. Hier wurde der Steckverbinder des Strips noch eingesetzt um den ESP später einfacher vom System zu trennen. Das ist aber nur optional.

Step 5: Install the First Lamp / Die Erste Ampellampe Installieren

----------------- english ---------------

Install all the other Lamps (in this case 7 more / 8 all together) and sun shields to the housing. And you are done with it .... technically .... if You want you can add a paint job, a stand or do a second one :D :D :D

----------------- deutsch ---------------

Anbringen aller Lampen (in diesem Falle 7 weiter / 8 alle zusammen) und Blenden am Gehäuse und fertig ist die Ampel ... technisch fertig ... bei Bedarf kann noch eine Lackierung, ein Ständer oder eine zweite Ampel gebaut werden :D :D :D

Step 6: Operation Manuel / Biedienungsanleitung

----------------- english ---------------

  • Use the Automatik An/Aus to toggle automatic mode
  • Gruen : switch off (Aus) automatic and let the traffic light switch to the next green (Cars light / Pedestrian traffic light)
  • Schritt means Step with (-) you go to the previous switching state and (+) leads to the next
  • Ogg ( i ll rename it to mood light soon) is a moodlight-mode with static color
    • change color and brightness with the sliders : color -> rainbow-slider; brightness: grey-slider
  • Ample switches to traffic light mode an set automatic on (an)
  • Polizei switch to an police light simulation (in Germany its only blue) ... if one of the Kids ignore the red light ;-)
  • Sleep toggles 10, 20, 30, 40, 50 , 60, 0 and sets the minutes for the ESP to fade out light, if there is no more activity on the webserver. If the value is set to 0, it will not got to sleep mode.
  • Rainbow I is an moodelight with color cycle and all lamps got the same color
  • Rainbow II is an moodelight with color cycle and all lamps got different colors
  • Schaltzeit means cycle time and it sets the amount of seconds for the green light time.
    • it also effects the speed of the color cycle in rainbow mode I and II

----------------- deutsch ---------------

  • Automatik schaltet den Ampel-Automatik-Modus An und Aus
  • Gruen wechselt zur nächsten Gruenphase alternierend von Auto zu Fußgänger
  • Schritte erlauben die Ampelphasen rückwärts (-) oder Vorwärts (+) zu durchlaufen
  • Ogg (wird zukünftig in mood light umbenannt) ist ein Stimmungslicht mit statischer Farbe
    • Farbwahl mit dem Regenbogen Schieberegler
    • Helligkeit mit dem Grauen Schieberegler
  • Ampel schaltet zurück in den standard Ampelmodus mit Automatik an
  • Polizei simuliert ein Blaulicht ... falls eines der Kinder mal über Rot fahren sollte ;-)
  • Sleep wechselt zwischen 10, 20, 30, 40, 50 , 60, 0 und stellt die Minutenanzahl ein, welche bis zum sanften Ausschalten der Ampelbeleuchtung vergehen soll, sollte keine weiter Interaktion auf dem Webserver stattfinden. Bei Sleep (0) ist der Schalf Modus ausgeschaltet
  • Rainbow I ist ein Moode Light modus mit wechselnder Farbe, alle Lampen haben die gleiche Farbe
  • Rainbow II ist ein Moode Light modus mit wechselnder Farbe, alle Lampen haben die unterschiedliche Farbe
  • Der Schaltzeit Schieber stellt die Länge der Grünphase in Sekunden ein
    • Ausserdem hat er Einfluss auf die Farbwechsel-Geschwindigkeit der Rainbowmodi

Step 7: Feedback and Support / Rückmeldung Und Unterstützung

----------------- english ---------------

Feel free to leave an comment or an Image from your traffic light .

Fork the Code an make it more stable, increase the usability oder translate it

Tell me if you find really bad spelling mistakes. (Most parts i wrote at night oder with tired eyes)

Enjoy your DIY-Traffic-Light !

----------------- deutsch ---------------

Über eine Rückmeldung wie einen Kommentar oder ein Bild Eurer / Deiner Ampel würde ich mich freuen

Verbessert den Code macht ihn Stabiler, besser Bedienbar oder fügt neue Sprachen hinzu

Nennt mir schlimme Rechtschreibfehler (große Teile habe ich übernächtigt oder in der Nacht geschrieben)

Viel Spass mit Deiner / Eurer Ampel !

First Time Author Contest

Participated in the
First Time Author Contest

Box Contest 2017

Participated in the
Box Contest 2017