Lightning ⚡️ LED flash

Special version of the bitcoinSwitch
See features!

Stable Version



No Config Data

  • Upload a .properties' or .json file
  • Or switch to 'Text Content Mode' to add new properties

tdisplay-image shape shape


Features


English manual ( Deutsch Anleitung, siehe unten! )


The Lightning LED Flash is a slightly modified version of the standard bitcoinSwitch. While an installation with the classic bitcoinSwitch WebInstaller only switches the time set in the LNURLdevice instance, this version (v0.2) switches the time multiple times in a row. This simulates the flash function. For example, if one enters 70ms, then the first flash lasts 70ms, then 70ms pause and again 70ms light, etc. You can also use a simple relay instead of the MOSFET, but the transistor module is noiseless and a relay is not really suitable for this fast switching cycles. These are simple "while loops" and "delays", which can be edited in the code of the firmware.


Alternatively, there are more versions. But there are also other versions. Here are a few examples:


v0.1 - classic = Classic bitcoinSwitch. On for time x (time example = 5000ms)

v0.1i - classic inverted = Classic bitcoinSwitch, just for low level trigger relays. Important: VCC = 3,3V

v0.2 - flash = Recurrent lightning with undercutting. Time x equal to flash period half (time example = 70ms)

v0.3 - strobo = 50ms on/off => 100ms/periode => 10Hz for time x (time example = 4000ms)

v0.4 - signal = On/off ratio 1 to 3 with length factor 10 (time example = 70ms)


You can view the corresponding code excerpt here: version_info.txt. If you want to have induvidual flash rythms or number, then you have to customize the software yourself. You can use e.g. Arduino IDE to edit, compile and flash the firmware. You can find the place with the code here.


The LED light can be powered via the USB cable, the battery compartment or alternatively via the ESP32. Unfortunately, the ESP32 does not work via battery compartment (the 4.5V voltage is low) nor via the supplied USB cable (the voltage drop in the line is too large). Accordingly, if the wiring is correct, you have the following options:


1. USB cable connected => operation via USB cable

2. USB cable not plugged, without batteries connected / powered by ESP32 => Lightning LED flash function

3. USB cable not plugged, with batteries but ESP32 disconnected => operation via battery compartment


The switch on the bottom works as ON/OFF for all three options. Note that there is a switch in the USB cable socket that disconnects the battery compartment / ESP32 when plugged in. So the lamp will not work through ESP32 / battery compartment until the plug is unplugged.


V+ and V- only need to be soldered to the battery compartment. The contacts are marked.


Connection: Bild1


USB powered: Bild2


ESP32 powered: Bild3



LNbits: LNbits



Terminal: Terminal



Deutsche Anleitung


Der Lightning LED Flash ist eine leicht modifizierte Version des Standard bitcoinSwitch. Während eine Installation mit dem klassichen bitcoinSwitch WebInstaller nur die in der LNURLdevice-Instanz eingestellte Zeit schaltet, können diese diese Version (ab v0.2) mehrmals hintereinander schalten. Dies simuliert eine Blitzfunktion. Wenn man z.B. bei Version 0.2 70ms als Zeit verwendet, dann dauert der erste Blitz 70ms, dann kommt 70ms Pause und danach wieder 70ms Blitz, usw. Man kann auch ein einfaches Relais anstelle des MOSFETs verwenden, aber das Transistor-Modul ist geräuschlos und ein Relais ist für diese schnellen Schaltzyklen nicht wirklich geeignet. Programmtechnisch sind es einfache "While-Schleifen" und "Delay-Verzögerungen", die im Programmcode bearbeitet werden können.


Aktuell gibt 4 Versionen zum uploaden auf den ESP32. Die Version v0.1 ist der klassische bitcoinSwitch mit einem Impuls. Aber dann gibt es noch drei weitere Beispiele, die ich alle hier mal aufgelistet habe:


v0.1 - classic = Klassischer bitcoinSwitch. An für Zeit x (Zeitbeispiel = 5000ms)

v0.1i - classic inverted = Klassischer bitcoinSwitch, nur für Low Level Trigger Relais. Wichtig: VCC = 3,3V

v0.2 - flash = Wiederkehrende Blitze mit einer Unterbrechung. Zeit x gleich der Hälfte der Blitzperiode (Beispielzeit = 70ms)

v0.3 - strobo = 50ms an/aus => 100ms/Periode => 10Hz für Zeit x (Zeitbeispiel = 4000ms)

v0.4 - Signal = Ein/Aus-Verhältnis 1 zu 3 mit Längenfaktor 10 (Zeitbeispiel = 70ms)


Den entsprechenden Code-Auszug können Sie hier einsehen: version_info.txt. Wenn du individuelle Blinkrhythmen oder Blinkzahlen haben möchtest, müsst du die Software selbst anpassen. Dafür kannst du z.B. Arduino IDE verwenden. Damit kannst du die Firmware (das Programm/Sketch) bearbeiten, kompilieren und auf den ESP32 flashen. Die Stelle mit dem Code findest du here.


Die LED-Leuchte kann über das USB-Kabel, das Batteriefach oder alternativ über den ESP32 mit Strom versorgt werden. Leider funktioniert der ESP32 weder über das Batteriefach (die 4,5V Spannung ist zu niedrig) noch über das mitgelieferte USB-Kabel (der Spannungsabfall in der Leitung ist zu groß). Wenn die Verkabelung korrekt ist, hast du folgende Möglichkeiten: 1. USB-Kabel angeschlossen => Betrieb über USB-Kabel

2. USB-Kabel nicht eingesteckt, keine Batterien angeschlossen / Stromversorgung durch ESP32 => Lightning-LED-Blitzfunktion

3. USB-Kabel nicht eingesteckt, mit Batterien aber ESP32 abgeklemmt => Betrieb über Batteriefach


Der Schalter auf der Unterseite funktioniert als ON/OFF für alle drei Optionen. Beachten bitte, dass es noch einen Schalter in der USB-Kabelbuchse gibt, der das Batteriefach / ESP32 trennt, wenn es eingesteckt ist. So wird die LED Lampe nicht über den ESP32 oder das Batteriefach arbeiten, bis der Stecker ganz herausgezogen wurde.


V+ und V- müssen nur an das Batteriefach gelötet werden. Die Kontakte sind in den Bildern markiert.


Need some help?


Have a look at ereignishorizont.xyz/bitcoinswitch

Telegram Groups

MakerBits - English

LNbits - English

bitcoinSwitch ⚡️ DACH - German


Contact

Twitter: AxelHamburch Website: ereignishorizont.xyz

Thanks a lot

to Ben Arc for this wonderful bitcoinSwitch




Created with love 🧡 Block 797963 / 831437

– Lightning ⚡ (er)leben –