top of page

Light Alarm

I created a wirelessly controllable lamp for my bedside table. The lamp is a basic LED desk lamp. The negative terminal is connected to the collector of a bipolar-junction transistor. The emitter is grounded, and the base is connected to a GPIO pin of a NODEMCU microcontroller. The biasing is not perfect, but it works. When the controller writes high to the base of the emitter, it forces the BJT into saturation and allows current to flow through the lamp. When the controller writes low, the BJT is cutoff and allows no current to flow through the lamp. In addition, I wrote a function that switches the output pin several times to create a visual alarm. The NODEMCU also polls time.gov every 20 seconds to accurately keep time. These features synergize to form an alarm clock. 

20201221_002425.jpg
Light Alarm: Welcome

The NODEMCU runs a local server that can be accessed via the device's IP address while connected to Wi-Fi. Once connected, a page is displayed with buttons that turn off and on the lamp. On the website, a user can set the alarm. For the frontend, I collaborated with a fellow University of Michigan student, Shazeen Biviji.

lamp.PNG
Light Alarm: Welcome
bottom of page