Posts

Showing posts with the label WiFiChron

WiFiChron "user manual"

Image
With the daylight saving time ("DST") fall back fast approaching (Nov 5, 2017 for North America), a few explanations and details are required to prepare the WiFiChron clock to automatically set itself. As much as I would like the menu items to be intuitive, I have to acknowledge that some of them look a little cryptic, and the reason is the 8-character space constraint of the display. Below is the list of all menu items, in the order they appear when the "Set" (left-most) button is pressed. Alrm on/off - alarm on or off by pressing either the "Up" or "Down" button; Al 00.00  - alarm time; first set the hours (flashing) by pressing either the "Up" or "Down" button, then move to the minutes by pressing "Set" (minutes will flash); set minutes with "Up"/"Down" buttons; HH.MM.SS - current time; move from hours to minutes, to seconds by pressing the "Set" button; set the flashing value by p...

Remixed WiFiChron board

Image
Thanks to all buyers who waited patiently for the new batch of re-designed WiFiChron PCBs to arrive. The new board eliminates the need for the 2 extra wires on the back (that connected Rx and Tx to ESP8266). The XBee socket, intended for the $45 GPSBee, was also dropped, and replaced with a 3-pin header, used for connecting the $5 GPS modules available on ebay. Here is the list of notable changes: the only RTC now supported is DS3231; DS3231 is now powered from the regulated 3V3; GPS module is now connected to D17 (already supported in software ); as mentioned above, Rx and Tx already connected to ESP8266 module (no need to solder the 2 wires on the back); as before, remember to unplug the ESP8266 module from its socket when uploading a new sketch ; This is how the new board looks like: and assembled: Below is the new schematic (compatible with the old one, just re-mixed): The latest release of the WiFiChron software should still work unchanged with the new board. On the assembly f...

On the GPS features of WiFiChron

The WiFiChron GPS-synchronized clock was begging for some documentation on the menu options and some details on its features. Here they are. The GPS-WiFiChron uses TinyGPS library to read the time from NMEA sentences  (specifically GPRMC and GPGGA strings) from the uBlox Neo GPS module . The clock starts reading the data from the GPS module (using SoftwareSerial library, receiving on pin D7) 2 minutes after power up. Once a valid GPRMC or GPGGA sentence is received, the minutes and seconds (but not the hours) are automatically re-set from the satellite UTC time. The successful synchronization is indicated by the "up arrow" at the end of the scrolling date (e.g. Sunday August 21, 2016 ^). In order to automatically set the hours as well, I added a new menu option, GPS? (Yes/No) . When this is selected (set to "Yes"), the local hour is calculated based on the longitude, by estimating the timezone using a simple formula: // estimate time zone from longitude; int8_t g...

WiFiChron with ATmega1284

Image
The WiFiChron code, with support for ESP8266, nearly reached the program memory limit of ATmega328, yet still missing a few features, the most important being the much needed debugging capability. Naturally, the next step in WiFiChron 's evolution was to upgrade to Atmega644P/1284P. Since there was no room on the board for the 40-pin DIP package, I settled for the SMD version. The schematic is shown below. Although functional, the board I designed is far from perfect: requires pull-up resistors for buttons; I relied on software pull-up, but that does not work in the current Sanguino library; requires a couple of more decoupling capacitors; (I soldered all these extra parts on the bottom side of the PCB, as shown in the next photo. The 595 shift-register is soldered on the bottom by design. The next revision will have the currently missing parts in the SMD package.) The WiFiChron-1284 board has the same dimensions as the previous revision , and it still fits in the Serpac A20 box....

WiFiChron fix and other WiFis

Image
The peculiar feature of the "May 2015" revision of WiFiChron board is that it was designed to use software serial to communicate with either the XBee or ESP module. The reason is related to debugging. I wanted to be able to send messages to the serial monitor while (software serially) communicating with the serial device. This solution works well for XBee ( GPSBee , BTBee ), but not for ESP8266, only because the software takes more than the available 2K of RAM in this case (WiFi + software serial). The immediate fix to use the ESP module is to connect its Rx/Tx lines to Rx/Tx of the processor. The existing connections can be left uncut, since they are not used in the sketch for ESP8266 . The wiring should be like in the photo below. The "permanent" fix would be re-designing the board to use ATmega1284 SMD (DIP-40 would not fit). Talking about 1284,  take a look at Farit's WiseClock4 mod. He used the WiseClock4 board, but completely re-wrote the software, in...

Modding WiFiChron with GPS or Bluetooth

Image
The latest revision of WiFiChron has an XBee socket (beside the ESP8266 8-pin socket), which allows the addition of a few individual features: GPS-based time synchronization, by using the GPSBee ; displaying messages sent from a Bluetooth device, by using the BTBee / BLEBee ; displaying data acquired from an XBee / ZigBee network of sensors (not implemented yet); Things did not go smoothly, without some drama though. Naively (I always seem to forget that there is a difference between theory and practice), I designed the XBee/ESP to connect to the serial port, with the expectation that once the development (including testing with debug statements to the serial monitor) is done, I will just plug in the serial module (either XBee of ESP8266) and things will work properly. Well, I had to re-consider this approach once again. Luckily, I had two pins left available (D7 and D17), which I could use for software serial. I re-wired those to the XBee/ESP and used the hardware serial for console...

WiFiChron with software support for ESP8266

Image
Another great software update from MikeM (download here )! This one has support for the ESP8266 module, allowing the WiFiChron clock to: join a specified wireless network in a user-friendly manner (with only the on-board, existing and minimal, hardware resources); synchronize the time from a specified NTP server (e.g. pool.ntp.org ); read and display RSS feed from a specified server (e.g. http://w1.weather.gov/xml/current_obs/KRDU.rss ); Before getting excited and jumping to compile and upload the new sketch, there are a few steps to be done on the ESP8266 module: 1. pull the CHPD pin high with a 10k resistor to Vcc; 2. make sure you can communicate with the module using a serial port; this could also include checking the version of the installed firmware (AT+GMR); 3. upgrade the firmware on ESP8266 to version 0.9.6 . After you download the bin files, the next step is to find a tool that would upload those bin files onto the chip. There are many tutorials on how to do this, some ...

WiFiChron clock kit now available

Image
Update Sep 18, 2017:   Here is the latest revision of the PCB included in the kit. Update Oct 8, 2015 : The latest revision of the PCB (pictured here and here ) has hardware support for XBee (which also covers GPSBee, WiFiBee and BTBee). With this kit you build a clock like the ones shown in the photos below. Last one, courtesy of Nick, features an yellow/amber display. There are two buying options: 1. use or make your own enclosure  (US$47, free shipping to North America) 2. enclosure included ( Serpac A20 , transparent front panel, screws, back panel hand-drilled with 3 holes for buttons and rectangular opening for the USB connector )  (US$61, free shipping to North America) The kit includes the following electronic parts: main PCB display adapter PCB ATmega328 with 8MHz bootloader, programmed with a clock sketch + 28-pin socket 74HC595 shift register + 16-pin socket HDSP-2534 8-character alphanumeric display + 4 x 6-pin machined headers DS3231 + ...