From Flashlight to MQTT with ESP8266

Flashlight

Parts needed:
  1. an N-channel MOSFET (IRF540N $1.62/10pcs , 30N06, $.1.75/10pcs)
  2. an NPN transistor (such as S8050)
  3. 3.9 ohm – 2W resistor, the current limited around 0.5/3.9 = 125mA
  4. 100kR (1/4W) resistor
  5. A push-lock switch
  6. 0.5W 8mm LED, $3.18/100pcs
  7. A 18660 Lithium battery. I salvaged a few of them from a power bank. Laptop battery (4, 6, 8 cells) made from 18650 cell but careful with that stuff.
  8. 1 boost-up to 12V board, like this one , $0.56
  9. 1 lithium charger such asthis one, $0.30
  10. The main difference to the circuit above is using a Lithium battery (18660) with boost up board instead of a mock-up 5V power adapter.


We are going to make a flashlight (v2). first the boost-up board pushes the voltage of the lithium battery (3.7V norminal) to 12V that is sufficient to power 3 LEDs in series.

flashlight v.2
Let put things together
parts charging

We can charge the flashlight we needed.

Limiting current

The last photo shows the final flashlight and it was charging from any micro USB source (>1A).