Photo #1 is the Tail Light operating. Photo #2 is the Brake Light operating.
Step 1: This Is the Tail/Brake Light.
The box is from an old Laptop power supply that burned out. I had to crack it open to get the guts out so the only way to hold the two parts together would be to glue or tape it. I used electrical tape so it's easy to get apart if I need to work on it. I used a bracket from an old drapery bar that's riveted to the cargo rack. You could also use an angle bracket
The LEDs are from Ebay. They can be used with 3 volts - 12 volts https://www.ebay.com/itm/10-PCS-Red-10mm-LED-Pre-Wired-Light-9v-DC-12V-Bulb-3V-5v/302489144413?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649
Step 2: Photos of the Brake Switch and Power Supply
Photo #1 is the switch. It's just a strip of flexible plastic from a paint pail bent in half. The contacts are brass plated paper fasteners as in photo #3. Being brass plated, it's easy to solder wires to them. Two of the LED red wires are connected together separate from the other LEDs for the Tail Light and share the ground with the other LEDs. Photo #4 is the wiring diagram.
I used a RC Plane wheel stop on the cable (photo #5) to press against the plastic when the rear brake is engaged, also from Ebay. It takes a little trial and error to get the tension adjusted to work correctly. You want the Brake Light to come on before the pads contact the rim enough to slow the wheel down but not too soon.
Photo #2 is the power supply also from Ebay. This uses 3 18650 Lithium Ion batteries that can come from an old laptop battery but you can use a USB power bank or a battery box for AA batteries. https://www.ebay.com/itm/5-12V-Mobile-Power-Bank-...
The Tail/Brake Light and Headlight are all running on 12 volts.
gandymarsh made it!