Friday, June 29, 2012

Animation on Wise Clock 3/4

Mr Ruud did it again :)  He took this video showing a few more features he added.



1. ANIMATIONS
It is now possible to create your own animations which are stored on the SD card.
The APPS menu entry ANIM allows for continously showing one or all animations files.
Animation files are named: anim0.wc3 - anim9.wc3
There are also 4 special animation files named: time00.wc3, time15.wc3, time30.wc3 and time45.wc3
If ANIM+ is selected in the SETUP menu and the BIG mode is active then every quarter the correponding animation is shown once with a random speed. 
Besides the four time*.wc3 animation file, there are currently 4 sample animations: anim1.wc3 - anim4.wc3.

You may create your own animations (there is NO programming involved) by creating individual screens in Excel and then use a small conversion program to create the *.wc3 file. 
As the animations are stored on the SD card you can make them as big as you like.

2. LOGGING
If the LOG+ menu is selected in the SETUP menu then the following items will be logged in the wc3log.csv file:
  • every hour the current temperature is logged both in Celsius and Fahrenheit (32.5 degrees is stored as 325)
  • all entries created in the time clock (TCLOK) app are now stored in the log file

The wc3log.csv file is an ASCII Comma Separated Values file, which can be opened in Excel for further analysis (or for creating graphs etc).

The average log record is about 25 bytes long. The temperature logging will take 24 x 25 bytes =  600 per day. (So the 2 Megabyte log file will be full after about 9 years.)
A warning message ("log= @ End") will be shown when the log file is almost full, an error message ("log= FULL!") will appear if no more records can be written to the log file.

The SETUP menu entry CLRLG allows for clearing the complete log file, it will take about 10 minutes to clear a 2 megabyte log file.

Mike M. integrated all of the above changes with a previous version that works with FAT32. This code is available here.

Friday, June 1, 2012

Wise Clock 4 with integrated Bluetooth

Wise Clock 4 can now hold a Bluetooth module outside of the XBee socket, as shown in the pictures below.




























The communication with the BT module uses SoftwareSerial on pins D20/PC4 (Tx) and D21/PC5 (Rx).
The module is powered with 3V3 and the Rx line is level-shifted.

I bought a few of these Bluetooth modules from different sources, mostly ebay. Some of them did not work: my PC's Bluetooth could not "discover" them. Once SMD-soldered to the board, it is very difficult to figure out what's wrong and even de-solder and remove them. My advice for anyone using these modules is to check them before soldering them to any board/breakout. An easy way to do this is to solder wires on pins 12 (Vcc) and pin 13 (ground), as shown in the photo below (left), power with 3.3V, then try to pair it with a Bluetooth host (PC, Android; iPhone won't work since it requires an Apple-approved chip).















The module's relevant pins are shown in the diagram below (photo from ebay seller):












I did not test this myself (the experiment may cost about $7), but it seems that these Bluetooth modules only tolerate approx 3.3V and powering with 5V will fry them.

If you already have an Wise Clock 3/4 and want to add Bluetooth functionality (simultaneous to WiFi or XBee), you can add this module to the clock. Connections are through 4 wires: Rx/Tx go to D20/D21 (pins 26 and 27 of the processor), VCC to 5V, GND to ground. Note that this module has on-board power adapter for 3.3V and level-shifter for the logic lines.