Ice Tube Clock: Sync Clock with Router
I have a tp-link 1043 router flashed with dd-wrt that runs 24/7. The Ice Tube clock is sitting infront of the router and I figured why not use the router to sync the clock since the router's time is already ntp sync'd.
The drivers and modded firmware are in the attachments. Do this at your own risk, I'll not be responsible for any damages!
What you'll need:
1. usb-to-serial TTL cable that uses the Prolific PL2303 chip
2. tp-link 1043 dd-wrt drivers for the usb-to-serial cable (usbserial.ko and pl2303.ko)
3. modded firmware of the Ice Tube clock (iv.hex)
4. Solder 2 wires to the clock, one to pin 2 (Rx) of the atmega168 and one to gnd
5. a bit of linux knowledge
1. Plug the usb-to-serial cable to the router
2. load the router drivers, ssh to router then run insmod usbserial.ko then insmod pl2303.ko. if drives loaded ok, you'll see /dev/usb/tts/0
3. program the modded firmware (iv.hex) to the atmega168
4. connect the wire from pin 2 of m168 to tx (green wire on my cable) of usb cable. connect the wire from gnd to gnd (black wire) of the usb cable
5. ssh to the router, use stty to set baud rate to 19200, then run echo "T$(date + %H%M%S%d%m%Y)E" > /dev/usb/tts/0
6. the time+date of the clock should be changed to the router's
7. create a cron job on router to do the above periodically, i.e. daily etc.
Make sure the usb-to-serial cable outputs TTL levels and not RS232. If you connect RS232 levels directly to the m168 it will damage the chip. If you use RS232 levels you will need to use a level shifter (a MAX232 or similar).
The modded firmware accepts time+date data in the format "TXXXXXXXXXXXXE" at 19200 baud. So you can substitute the router for anything that outputs serial data in that format.
You can expand the mod by grabbing weather/financial data from the internet and then displaying it on the clock.
- (74 KiB) Downloaded 97 times
- modded firmware
- (26.3 KiB) Downloaded 155 times