The Bright Bulb consists of two main components: the sensor array, and the bulb.
The bulb is composed of an outer housing, and a PCB equipped with LEDs and an ESP-32 to handle the smart functions of the light.
We designed the outer housing using OnShape (.stl files included under "files"), and 3D printed it in two parts
The bottom part was printed using an opaque plastic. It starts out as a a 0.95" (outer diameter) cylinder, which a metal light bulb socket is crimped around. The cylinder extends upwards for 0.5", and then expands out to an inner diameter of 1" over 0.25" of height. The part then steadily expands in inner diameter from 1" to 2.75" over 2.25" of height. Upon reaching 2.75" in inner diameter, the part extends up 0.75" as a cylinder. It also has a perimeter shelf 0.5" thick and 2mm tall, located 0.25 inches from the top of the part. The PCB is attached to this shelf via the screw holes around the edges of the PCB.
The top part was printed using a translucent plastic to diffuse the light from the PCB. It is a 2.75" diameter hemisphere, that terminates in a 0.75" long cylinder.
The two parts are connected like a screw-cap on a bottle, with the top part acting as the cap. The teeth of the screws are isosceles triangles with base length of 4mm and a height of 1mm, wound in a CW spiral such that there are two complete revolutions every 8.5mm. Both parts are 1mm thick.
As previously stated, the hardware for this project is divided into two boards: an external sensor array and the board within the bulb. Due to the size constraint of fitting the board into the bulb housing, we decided to design and print a PCB for the bulb board. We did this using EAGLE, and our .sch and .brd files are included in the "files" section. Below is a picture of our assembled PCB.
When fully assembled within the bulb housing, our PCB is supplied power from the output of an AC to DC buck converter (5V, 1A output) to the power input on the left side of the board. We then have a linear regulator (5V to 3V3) that supplies the 3V3 components on the board. The main component of our PCB is the ESP-32. This chip allows for wireless communication to the sensor board through the ESP-NOW protocol, and drives the five neopixel LEDs by way of a logic translator IC. It also sets up our web server which is talked about in detail further below.
In order to upload software to our ESP-32 chip, we added the buttons RESET and IO0 as well as the connector at the top of the board. The connector allows us to attach a USB to UART converter to the board to upload code, and the buttons are required for the board to boot into download mode (this occurs when the user resets the chip while holding IO0 low).
The bulb will have code to receive the communications from the sensors and from the web server, and be able to turn the light on and off.
Each chip is equipped with code that is able to wirelessly communicate with each other using ESP-NOW. This is a one-way communication from the sensor board to the bulb. When receiving data, if the bulb is in "automatic mode," it will turn on the lights and reset a timer each time it receives data from the sensor board. After it has not received data for a user decided amount of time, meaning the sensors no longer detect motion, the light will once again turn off.
NOTE: In order to perform wireless communication, the MAC must be added to the code:
const uint8_t broadcastAddress = // MAC Address for sensor board here // in form of: [0x01, 0x02, 0x03, 0x04, 0x05]
The ESP-32 is also used to host the web server through which users can change the settings of their light bulb. The web server is asynchronous, using a locally hosted webserver on the ESP32. It is formatted using html, and data entered by the...Read more »