blueroomelectronics
Well-Known Member
Here in Toronto, Ontario, Canada we have variable electricity rates.
I thought it would be fun, practical and educational to build a wee rate indicator using a BiColor Red / Green LED.
So when rates are high it's Red
medium Yellow
cheap Green
Here's the hardware spec
PIC12F629
32,768Hz crystal
Red / Green (yellow) LED
Simple serial port 9600 for setting the time & date
Pin count
1 reset (set time date) or DTR input via 22K from serial port
1 RX via 22K resistor
1 Red LED lead and TX on same pin
1 Green LED lead
2 Crystal on TMR1 osc
Thoughts
DB9 connector with RI used for power when not connected to a serial port
Supercap for backup power
4MHz running but only when used briefly when the PIC wakes up every second or two
Could be run from a small solar panel (want to be green after all)
Sleeps (no LEDs) from 2am till 6am (for a small solar cell)
LEDs could flash to save power but this might be annoying
Fairly fancy RTCC as it needs to determine DST and different rate tables depending on day of week and time of year.
Doing the tables in EEPROM would allow reprogramming via the serial port as I'm sure these rates vary from place to place.
How I'm going to go about it
I like using hardware debugging but the wee 12F629 doesn't have hardware debug built in (you need a special version of the chip if you want that) so I'll prototype with the similar 16F88 which has hardware debug. It's also the type of project that most of the debugging could be done with MPLAB's built in simulator or even OshonSofts simulator.
Just thinking aloud. Comments welcome.
**broken link removed**
I thought it would be fun, practical and educational to build a wee rate indicator using a BiColor Red / Green LED.
So when rates are high it's Red
medium Yellow
cheap Green
Here's the hardware spec
PIC12F629
32,768Hz crystal
Red / Green (yellow) LED
Simple serial port 9600 for setting the time & date
Pin count
1 reset (set time date) or DTR input via 22K from serial port
1 RX via 22K resistor
1 Red LED lead and TX on same pin
1 Green LED lead
2 Crystal on TMR1 osc
Thoughts
DB9 connector with RI used for power when not connected to a serial port
Supercap for backup power
4MHz running but only when used briefly when the PIC wakes up every second or two
Could be run from a small solar panel (want to be green after all)
Sleeps (no LEDs) from 2am till 6am (for a small solar cell)
LEDs could flash to save power but this might be annoying
Fairly fancy RTCC as it needs to determine DST and different rate tables depending on day of week and time of year.
Doing the tables in EEPROM would allow reprogramming via the serial port as I'm sure these rates vary from place to place.
How I'm going to go about it
I like using hardware debugging but the wee 12F629 doesn't have hardware debug built in (you need a special version of the chip if you want that) so I'll prototype with the similar 16F88 which has hardware debug. It's also the type of project that most of the debugging could be done with MPLAB's built in simulator or even OshonSofts simulator.
Just thinking aloud. Comments welcome.
**broken link removed**