Posts

Showing posts with the label Wise Clock 4

From the mailbox

Image
AlexP managed to port the Wise Clock 4 code to Arduino Mega2560 (shared here , thanks Alex!). He made this video demonstrating it in action: Today I had a great day! I did it! I soldered a development board for my Mega2560. A little corrected code and ... voila!   Wiring diagram: rtc sqw (1hz) - pin 2 menu key - pin 3 set key - pin 4 plus key - pin 5 speaker - pin 6 speaker - pin 7 HT1632_WRCLK - pin 10 HT1632_CS - pin 11 HT1632_DATA - pin 12 HT1632_CLK - pin 13 rtc sda - pin 20 rtc scl - pin 21 (SD while not tested, but I think it works) sd miso - pin 50 sd mosi - pin 51 sd sck - pin 52 sd cs - pin 53 NelsonC built his own hand-wired version of WiFiChron and it looks awesome: MikeM sent in (thanks Mike!) his latest WiFiChron code (available here ). The enclosed zip file compiles under Arduino 1.6.8, though it generates a warning I haven't figured out how to eliminate. Ray ran into a problem with data overruns. When data in an RSS feed was split between multiple packets, so...

Wise Clock 4 software for Arduino 1.6.8

Image
Scott H. put the time and the effort to port the Wise Clock 4  code (also the HDSP-Proverb and WiFiChron code) to Arduino 1.6.8 (the latest, but maybe not the greatest). This is a big endeavor, which I did not plan to pursue any time soon. Now, thanks to Scott, here we have it . I compiled it and uploaded it myself, on Windows (he did it on Mac). The Wise Clock 4 files are all in the same " TheClock " folder, directly under " libraries ", as shown in the following screenshot. But before uploading to ATmega1284, this section needs to be inserted in boards.txt (*): ############################################## atmega1284.name=Sanguino W/ ATmega1284p 16mhz atmega1284.upload.tool=avrdude atmega1284.upload.protocol=stk500v1 atmega1284.upload.maximum_size=129024 atmega1284.upload.speed=57600 atmega1284.bootloader.low_fuses=0xFF atmega1284.bootloader.high_fuses=0x98 atmega1284.bootloader.extended_fuses=0xFD atmega1284.bootloader.path=atmega atmega1284.bootloader.file=a...

A recap of Wise Clock 4 features

The list of code changes and new features at the top of the source files (see WiseClock.cpp , for example) grows longer and longer. I thought of getting this list out in the open, for the people who are not particularly interested in the C++ code or just don't want to look at the source code (or release notes file for that matter, not updated in a long while though) to find out what Wise Clock 4 can do. 1. First and foremost, Wise Clock 4 displays quotes retrieved from text file(s) stored on SD card, with both  FAT16 or FAT32 file systems being supported. This piece of functionality is still the core of the software. 2. Secondly, Wise Clock 4 displays the time retrieved from DS3231 extremely accurate real time clock chip. (These first two features inspired its name: "wise" and "clock" :) 3. The display is tri-color (red, green, orange) LED matrix with a minimum resolution of 16x32 and a maximum of 16x128. Currently, the resolution is hard-coded, meaning t...

Add light sensor to Wise Clock 4

This is long overdue. As we know, the display brightness on Wise Clock 4 can be changed between 5 levels, by pressing the "Plus" button. To adjust the brightness automatically, based on the light conditions, we need to add a light-sensitive sensor of some sort, and the most common is the LDR (light-dependent resistor). Any of the countless articles and tutorials on Arduino + LDR will teach how to connect the LDR to an analog pin, using a voltage divider. For Wise Clock 4 , the LDR is connected between A0 (pin 40 of the processor) and ground, with a 10k resistor between A0 and Vcc, as shown below:   GND|----[ LDR ]---A0---[10k resistor]----+Vcc The automatic brightness adjustment is enabled in software with this macro (in file UserConf.h ): // use an LDR (connected to A0) to automatically adjust // (every 5 seconds) screen brightness to ambient light; #define AUTO_BRIGHTNESS and implemented in this new function: void WiseClock::checkBrightness() { #ifdef AUTO_BRIGHTNESS ...

Hockey scoreboard

Image
What's missing from this picture (of a backyard hockey rink)? You got it (probably the post title helped too): a scoreboard. For those not familiar, a traditional one looks like in the photo below (click on it to see it bigger). It may look simple, but it provides a lot of functionality: display 2-digit home score; display 2-digit visitor score; countdown timer, with the starting time configurable/settable; timer displays mostly minutes and seconds, but under 1 minute, it displays seconds and tenths of a second; stop/resume the countdown; display round/period; number of periods is configurable/user-settable; buzzer sounding at the end of the round, game or on demand; penalty timers for up to four players (that also stop/resume with the main timer); functions as a clock when not used in a game. The control for the hockey scoreboard  is pretty complex too. The control console is usually wired to the scoreboard. Sometimes the console is detachable (brought in to the booth by the score...

Add a barometer sensor to Wise Clock 4

Image
While cleaning up my desk, I found a little I2C module that I completely forgot about. It is a breakout for BMP180 barometer sensor, which I probably bought on ebay for a couple of dollars (I just checked , it is still under $2). This tiny board can be added literally to any Arduino clock to display atmospheric pressure, with the help of  Adafruit_BMP085 library . Connecting the barometer to Wise Clock 4 is trivial: I soldered wires directly to processor pins (SDA, SCL, VCC and GND), as shown in the photo. There is plenty of clearance between the board and the display. In the software, as mentioned, I used the Adafruit BMP085 library, which also covers the compatible BMP180. There is no extra setting required from the user: the pressure is displayed together with the temperature, and enabled/disabled from the TEMP+/- menus. Also, there is no extra settings when compiling/building: if the BMP180 module is not installed, no pressure data will be displayed. Essentially, the new code...

New Wise Clock 4 software release

The latest release of the Wise Clock 4 software can be found here . It includes a few new features: support for the XBee-fied ESP8266 (from iteadstudio), courtesy of MikeM; The WiFi settings are configured in the SD card file message.txt , and they look like this: #### ESP8266 configuration # # Esp8266.ssid Wireless SSID to connect to # Esp8266.phrase pass phrase to use (WPA authentication) # Esp8266.sntp optional SNTP server IP address (not hostname) for time synchronization # Esp8266.rssurl optional URL of an RSS feed, like http://w1.weather.gov/xml/current_obs/KMYF.rss Esp8266.ssid   BELL475 Esp8266.phrase 7xyz1E9F6 Esp8266.sntp    Esp8266.rssurl  This feature is enabled in the code by the following line in file  UserConf.h : #define WANT_ESP8266 support for GPSBee  (from seeedstudio): only the minutes and seconds are set from the GPS data, the hours remain as set from the buttons; synchronization is performed once a day and/or when the clock is ...

Wise Clock 4 with the new 3mm 3216 LED display from Sure

Image
My inventory of "old" 3216 3mm displays from Sure Electronics is now depleted. As everybody already knows by now, Sure redesigned the display to be powered with 12V instead of 5V (plus a few other cosmetic changes). The Wise Clock 4 board cannot be plugged into the new display's connectors anymore, since they are now different (10 pins instead of 16), and the assignment of signals to pins has changed as well. Making a seamless  Wise Clock 4 with the new display is still possible, with a little more soldering work. The board will be connected to the display using the ribbon cable provided. To do this, cut one connector off the ribbon cable, then solder 5 wires (4 signal + ground) from the cut end of the ribbon, in the place of the header, as shown in the photo below. The 5V power line from the clock's board (red wire in the photo) will be soldered separately from the ribbon cable, bypassing the display's 5V regulator, as shown in the next photo. The new display ...

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...

Adding RF remote control to Wise Clock 4

Image
Nick asked me once about adding remote control to his mega wise clock, similar to those  pictured here  (or any wise clock that may hang on a wall, for that matter). An obvious way to quickly and easily do this is by wiring the " simple RF M4 receiver " from adafruit to the 3 buttons of the Wise Clock. This 315MHz receiver module works in conjunction with the  4-button keyfob , also from adafruit. Note that the receiver comes in 3 flavors: momentary, toggle and latch. The one that "simulates" the touch buttons is the momentary one, hence the "M4" in the name (momentary, 4 outputs). The schematic I used to connect the receiver module to the Wise Clock board is shown below. I tested it and it works fine. Almost always :) That is, ALWAYS when the display is not plugged in the clock board, NEVER when the display is connected. Which led me to conclude that either the display emits in the 315 MHz band (interfering with the receiver module; which it didn't; I...

July 2014 release of Wise Clock 4 software

Image
This latest code release includes: introduction of the two-faced (Kandinsky) feature, on 2 or 4 displays; fixes related to screen centering for 3 or 4 displays (Big, Stopwatch etc); fix for Pacman app on 3/4 displays; fix for Words app on 3/4 displays (so the text does not start scrolling in the middle of the screen); improved the font definition for digits (effectively making them 5x7 pixels; see photo below); fix for Score app (swapped button functions); I am sure that there are still a few bugs to fix. As well, some improvements would be nice, the most notable being the better use of a screen with 3 or 4 displays, especially for the Big mode, where the time is still shown on the (center) 2 displays. (This would call for spreading out of the digits, or even the definition of a wider font.) (One of the displays in the 3-display clock is faulty, hence the missing pixel in the bottom 1.)

Wise Clock chronometer completed

Image
As I briefly mentioned in my previous post , I re-started working on the Wise Clock chronometer . That old version only displayed the time from the RTC, and lacked basic user functions like setting the time from buttons. Even though it was called "chronometer" it did not have a proper timer functionality (besides showing the time with seconds). I implemented the new software(*) ( available here ) as a state machine, easy to describe, understand and upgrade. Below is the diagram with the states and transitions. This clock uses the same board as Wise Clock 4 , but a jumper connects SQW of DS3231 to D2 (INT2 interrupt pin of ATmega1284). This allows the software to take advantage of an ISR being called every second, which in turn updates the time on the display. Because this approach is in contrast to the existing Wise Clock 4 software (which did polling on RTC to update the time on the screen), its integration into the main trunk would be difficult, if not impossible. In any c...