Swap the two AA batteries for a D1 Mini Wi-Fi board and one transistor. The sign then lights up at local sunset every evening and switches off at midnight. Sunset moves with the season, and daylight saving time is handled for you.
Everything except the charger, a cable and the tools comes from your two Amazon orders.
Each D1 Mini came with a few small black plastic strips. These are header pins. Soldered to the D1 Mini, they let it plug into the breadboard.
Lay the breadboard flat in front of you, long side left to right, and turn it so column 1 is on your left. Each hole has a name: a letter for the row (a–j) and a number for the column, like a5. Both are printed along the edges.
a5, b5, c5, d5 or e5 is connected. The f–j half is a separate strip. The two long red and blue rails along the edges aren't used in this project.This is the one idea that makes the rest work: two things are connected when they're plugged into the same numbered column, on the same side of the center gap.
a5 (j5).You'll solder the pins while they sit in the breadboard. That keeps them straight, and it leaves the D1 Mini in exactly the spot the rest of this guide uses.
Do this before touching the sign. Everything here happens on your Mac with the D1 Mini plugged in by USB.
Tasmota is free firmware for ESP8266 boards. It has built-in timers that run at sunset, so you don't have to write any code.
USB Serial or wchusbserial….http://192.168.1.57. Bookmark it.GPIO5 (labelled D1 on the board) is used because it stays off while the board starts up, so the sign won't flash on every reboot.
On the main page click Consoles → Console. Paste each line below into the box at the bottom and press Enter, one line at a time.
DeviceName Halloween Sign
Latitude 42.33
Longitude -83.05
Timezone 99
TimeDst 0,2,3,1,2,-240
TimeStd 0,1,11,1,2,-300
Timer1 {"Enable":1,"Mode":2,"Time":"00:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":1}Time is an offset: use "00:15" for 15 minutes after sunset.Timer2 {"Enable":1,"Mode":0,"Time":"00:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":0}Time for a different off time, for example "22:30".Timers 1
Status 7
You'll run the sign's own LED circuit from the D1 Mini's 3.3 V supply instead of batteries.
Look into the empty battery compartment. At one end, a metal strip joins a spring to a flat plate: that's the bridge between the two cells, so leave it alone. At the other end are a spring and a flat plate that aren't joined. Those are the two terminals you'll solder to.
Unplug USB. The leads from step 7 have a metal pin on the end: push it straight down into the hole until it stops, about 5 mm. A gentle tug shouldn't pull it out.
a5 (j5). That's the free hole directly above the pin labelled 3V3, just outside the D1 Mini's edge.j6 (a6). That's the free hole directly below the pin labelled G.j6 (a6). Leave the red lead in a5 (j5); that's where it stays.If nothing lights, check the sign's switch is ON, then swap the two leads. A few seconds of reversed 3.3 V won't harm the LEDs. If they light only after swapping, you mixed up + and − in step 7. Re-solder them, or remember from now on that your "red" lead is the one that goes to 3V3.
Prove the whole thing works before soldering anything permanent.
The ELEGOO kit keeps transistors and resistors in labelled compartments. Read the printing on the transistor's flat face to be sure which one you have.
Unplug USB before every change on the breadboard. Build in this order, one part per step, and compare with each picture before going on.
g18 (d18), g19 (d19) and g20 (d20): left leg (C) in column 18, middle (B) in 19, right (E) in 20. Check the flat face still points away from you.j10 (a10). That's the free hole directly below the D1 Mini's D1 pin (not D2, not D4).j19 (a19), in column 19 like the transistor's middle (B) leg.j19 to the base leg in g19.j6 (a6), the free hole directly below the G pin.j20 (a20), in column 20 like the transistor's right (E) leg.a5 (j5) from step 8, the free hole directly above 3V3. If you took it out, put it back there.f18 (e18). That's in column 18, like the transistor's left (C) leg, in the hole between the transistor and the center gap.Go down this list and touch each part as you check it. It takes 30 seconds and catches most mistakes.
| Part | Row a at top | Row j at top | What it connects |
|---|---|---|---|
| Transistor (flat face away from you) | g18 C · g19 B · g20 E | d18 C · d19 B · d20 E | Q1 sits right of the D1 Mini |
| 1 kΩ resistor | j10 → j19 | a10 → a19 | D1 pin → base |
| Black jumper | j6 → j20 | a6 → a20 | G pin → emitter |
| Red lead (sign +) | a5 | j5 | 3V3 pin → battery box + |
| Blue lead (sign −) | f18 | e18 | collector → battery box − |
If your D1 Mini's printed pin names don't match the drawings, trust the pin names: each wire goes into the free hole in the same column as 3V3, G or D1.
Power1 1 and Power1 0 in the Console.Not working? See Troubleshooting at the end.
Replace the breadboard with soldered wires so everything fits inside the sign.
You can use the same D1 Mini and solder wires onto its header pins, trimmed short. Or take a fresh one without headers, repeat steps 2–4 to set it up, and solder the wires straight into its holes, which ends up smaller.
Status 7 once more. The Sunset value is when the sign will light tonight.Timers to confirm both timers are enabled.That's it. The sign now lights at sunset and goes dark at midnight every day, with no batteries to replace.
| What you see | Likely cause and fix |
|---|---|
| Chrome shows no serial port | The cable is charge-only. Use a different micro-USB cable. |
| Can't find the device after setup | Wi-Fi didn't connect (2.4 GHz only). The board then opens its own tasmota-xxxx network: join it, browse to 192.168.4.1 and enter your Wi-Fi details again. |
| Toggle does nothing; LEDs stay off | Check the sign's switch is ON. Check that the red and blue leads aren't swapped (redo step 8). Check that the transistor's flat face points away from you (legs C-B-E from your left), and that the resistor goes below D1, not D4 or D2. |
| LEDs always on, even when OFF | Collector and emitter are swapped or touching, or the blue lead is plugged into a G column. Recheck the table in step 10f. |
| LEDs very dim | The resistor isn't 1 kΩ (a 100 kΩ looks similar: brown-black-black-orange). Or the blue lead is in the base column. |
| Turns on at the wrong time | Run Status 7. If the time is off by hours, re-enter Timezone 99 and the two Time… lines. If the sunset time is wrong, check the sign of Longitude: it should be negative. |
| Board restarts when the LEDs come on | The charger or cable is too weak. Use a charger rated 1 A or more and a shorter cable. |