-
Battery voltage measurement
05/02/2022 at 11:22 • 0 commentsChanged battery voltage measurement to measure input of voltage regulator battery voltage measurement using circuit from https://jeelabs.org/2013/05/17/zero-powe-battery-measurement/. Also display battery level on the clock screen.
Previous version measured voltage output from GPIO pin so value is capped to 3.3V, which was enough to see if battery is too low but not so nice for displaying battery level.
Fortunately it wasn't hard to modify - replace resistor between Vout and Vmes with BSS138, connect drain of BSS138 to new resistor, and connect the other side of the new resistor to vcc.
Unfortunately, measurement didn't work. It shows greater value than correct voltage. Modification was worked fine when tested with develeopment board. It turned out that ADC of the ESP32 of the clock seems to be broken. The adc pin reads as almost 0 as expected when connected to GND, but the adc pin reads as 4095 (maximum of 12bit) when it is left open.
-
Firmware update
12/26/2021 at 08:42 • 0 commentsAdded firmware update to Web UI. Firmware can be updated by uploading file using browser or curl.
I first tried to use multipart/form form but it turns out it is difficult to handle multipart/form data.
I searched a bit and I found that javascript can be used to upload file without any encoding/encapsulation. So ESP32 simply writes recieved body to flash. This is same behavior as previous version, but I added callback functions to receive start/end of update and display start/end status.
-
Add alarm functionality
11/23/2021 at 08:56 • 0 commentsAlarm and deep sleep functionality is added. Also say time is implemented.
It is working as alarm clock for 2 weeks now.Here is a demo video for alarm and say time.
-
Implemented display
10/04/2021 at 12:01 • 0 commentsShow SSID and password while in soft-AP mode.
Show clock.
Next things to do:
- Sleep when idle
- Check and show battery level
- Alarm at configured time
- Automatically synchronize clock
- Update firmware from web interface
-
OLED worked... at least once
08/30/2021 at 12:00 • 0 commentsI assembled updated PCB and it worked at least once. And it stoped working after I soldered optional LEDs.
I suspect too much heat damaged the panel.But that is not a large problem as I have one working display and display is not critical for this alarm clock.
Anyway I finally implemented the speaker and electronics part is done. I did not make much progress to software part though, considering electronics part took more than 1 year to be done, I believe it will be reach somewhere in the future.
As for the speaker, I picked CES-26138-16L030 and CDS-25148-L100 for their sizes. Then I compared 2 speakers and felt that CES-26138 sounds better and used it.
By the way, I used this repository to test display.
-
Uploaded files and code to GitHub
07/26/2021 at 12:28 • 0 commentsUploaded files and code to GitHub:
https://github.com/ktmizugaki/wifi-voice-clockCurrent status of code is:
- When ESP32 is started, it becomes AP and HTTP server.
- SSID and password is printed to serial console.
- WiFi settings can be added using Web UI.
- URL will be
http://192.168.4.1/wifi_conf
- URL will be
- ESP32 can connect to added SSID.
I haven't touched displaying part yet.(SSID and password will be shown on the display in the future)
- When ESP32 is started, it becomes AP and HTTP server.
-
Fixed display board
07/05/2021 at 12:35 • 0 commentsI fixed display board and satisfied with layout. I hope this will be good this time.
And it's about time to order a speaker...
While waiting for new parts arrive, I'll start coding using almost working object here.
My plan is, when first powered up, the clock becomes an AP and user sets SSID and password via Web UI. So first thing I need to implement is:
- Put SSID/password of clock AP on display
- HTTP server and HTMLs
-
Make OLED work
06/29/2021 at 13:34 • 0 commentsI solderd OLED FPC cable to board. Then connected it to ESP32 dev baord and nothing happend.
I was depressed and didn't know what to do next. All what came up is checking datasheet and checking voltage of each pin.
When I compared pin table of datasheet and schematic, it turns out the symbol I used is not for my OLED panel.
Guessing from pin names, it seems like I referenced SH1106 version when I created the symbol.I was able to patch circuit and now it works. Pins marked with red needs to be connected to GND and green pins are connected to GND, I added jumper cable to connect them
-
2 in 1 PCB
06/25/2021 at 13:47 • 0 commentsOne thing I am concerning about ordering PCB is minimum quantity is usually 5 but I only need 1 clock, and remaining 4 boards will be unused.
So I tried to reduce unused boards by creating 2 in 1 PCB.
Since this clock is rectangular box, each opposite panel has same dimensions and I combined each opposite pair of panels to single panel.
This theoretically reduces unused materials by roughly 60% when measured by area.I also made the MCU board as minimal and exposed as many pins as possible so that the board possibly be used for future projects.
Well, in the rea world, PCB manufacturer send me 8 wrong thickness boards and 8 correctly remade boards.
Now I have 14 unused PCBs. lol