Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I'd like to hear your thoughts on a Thermostat kit design

Status
Not open for further replies.
mum or wife :)

btw, Bill, your site became sloooooow (used to be fast, now pictures open very slowly) ...

bin thinking last night about this .. I noticed that Bill mentioned few HVAC standards (I do not know any of them) but making the device follow them (being able to join the network with other HVAC devices.. communicate with them ..) would be very interesting

I still believe sw part of the project will be a *****.

The IO part: [easy]
- detect all sensors (1wire, i2c, rf, ir) - almost easy
- get data from all sensors - easy
- turn relay's on/off (on board or via i2c port extender) - easy
- serial comm - easy
- ir comm - easy
- log data to i2c eeprom - easy
- read button & rotary encoder - easy
- RTC - easy

The logic part: [tough]
- dynamic menu system [mid tough]
* allow user to control every single sensor
* allow user to set weight for every single sensor
* allow user to go trough log
* full scheduler setup
* RTC control (set time)
- data display [easy]
- data analysis and element controll [tough]

The network part: [I have no idea]
- HVAC standard??

The network part can be "left for kit builder to develop as extension" .. but rest of it have to come with the kit .. and .. it's not easy, the data analysis need to be full dynamic control, not just simple hysteresis on/off switch - and when multiple differently weighted sensors come to story, it gets interesting :D
 
@duffy, I would not use timer1 for RTC ... the external battery backed up RTC is dead cheap and easy to use... most of them come with few extra bytes of eeprom or battery backed up ram that you can use to store the config values .. with timer1 you have to battery backup the whole pic...
 
...which is almost nothing. Sleep mode. One instruction. The 32khz oscillator uses ten times more power than the rest of the PIC (data memory included) but it only amounts to a few microamps.

And you have to have it either way.
 
Last edited:
The 18F6490 has precious few I/O pins left after the LCD is connected.
Code:
RA0    AN0        Rotary Encoder
RA1    AN1        ""
RA6            Pushbutton
RA7            DE/RE (RS485)
RB0    INT0        IR IN
RB5            Relay 1
RB6    PGC    ICD    Relay 2
RB7    PGD    ICD    Relay 3
RC0    T13CKI        7555 output (Humidity)
RC1    CCP2        DS1307 SQW/OUT    (also connects to 7555 reset pin)
RC3    SCL    I2C    DS1307    EEPROM   Temperature
RC4    SDA    I2C    ""
RC6    TX1    RS485    RS232
RC7    RX1    ""    ""
RG5    VPP    ICD    22K pullup to VDD
No free I/O... I could free up one pin if I can locate that auto DE RS485 chip or simply go to RS422 (full duplex) or worse yet RS232
Another concern is the 10ma draw of the CUI rotary encoder, do they make them with just a pair of switches?
 
Well of course I'll add an expansion I2C connector, not so handy for remote sensors though. I would have thought the mechanical ones would have simply switches but that doesn't explain the 10ma current draw.

I'd like to stick with RS485 (although the Aprilare is RS422) and I could allow the 7555 to freerun vs gated by the DS1307

Since the PIC will be running solely on the internal osc it will have to depend on the DS1307 for accurate timekeeping. I do want this to function as a setback thermostat.
 
well, the I2C port extender is not that good for sensors as you cannot control it that fast, but you can move all relay's to I2C port extender. That is 3 ports on the PIC free immediately :) (you already have i2c bus so port extender chip is not taking any)

I'm not sure what 7555 is? some "advanced" 555? if yes, then I assume you want to "start/stop" it using RC0/RC1 ... this can also go to port extender ...

so .. 4 pins freed, you can free the fifth also if you move the button to the port extender but then you either need to pull data often or you need to connect INT pin from port extender to uC (so then that fifth ping is occupied again, but port expander becomes more usable :D and you can use it for other purposes)

btw, as you do not need 3mhz clock on the i2c you can use cheaper pcf8575 port extender.

The port extender (expander) is pretty nifty thingy that many hobbyists ignore. They also have interrupt pin to "notify" the master about the "change" .. MCP23017 have 2 interrupt pin's for example that can be configured to trigger interrupt on different events...
check: https://www.electro-tech-online.com/custompdfs/2009/02/21952b.pdf
 

Attachments

  • mcp23017_interrupt.png
    mcp23017_interrupt.png
    98 KB · Views: 149
  • mcp23017_interrupt1.png
    mcp23017_interrupt1.png
    102.4 KB · Views: 175
Last edited:
The HS1101 Humidity sensor uses a CMOS 555 in its datasheet to convert the humidity to frequency and is specific about the 555 (7555)
I planned on cheating by using the RTCC 1Hz output as a start / stop on the 555 (50% duty) and also feed it to the PIC as a RTCC timebase (instead of reading the I2C bus constantly)
I could put the pads on the PCB but I'll have to think about putting the relays on it. As it stands I'll have a switch or jumper to enable Relays 2 & 3 when you're using the debugger/programmer.

Edit: it would probably be more economical to simply go to the 80pin PIC vs an I/O expander. I would rather go to more pins than parts.
 
Last edited:
Edit: it would probably be more economical to simply go to the 80pin PIC vs an I/O expander. I would rather go to more pins than parts.

That's transfer from DIP to TQFP ... donno what's the price difference of 40pin PIC vs 80pin PIC + CshmartBoard .. nor I have idea how much is the i2c port expander (I got them in bulk with bunch of other equipment I have no idea how much they were) ....

It is also "learn to use SchmartBoard" vs "learn to use i2c port expander" ...

I like both options .. maybe SchmartBoard is more "exotic" so maybe that's the right way to go ... (never saw one except on picture)
 
Actually its from 64pin TQFP to 80pin TQFP, the 40pin 16F917 just doesn't have near enough I/O. Plus I do love the 18F instruction set and compiler choices vs the old 16F.

I've used a couple of Schmartboards and they do work, the part falls in place you just add flux and heat (they have enough solder on the tracks already)

I may have an idea / method for soldering TQFP with a standard PCB. The trick is getting the part to stay in the right place. Soldering is actually the easy part. Most just blob it down and wick it up.
 
I think an HCH-1000 is cheaper still.
 
Well I may sell the kit with the TQFP presoldered as an option.

The HCH-1000 looks cool, very similar to the HS1101 and could probably use the 555 in the same way.

It's also 1/4 the price. Nice.

Still stuck on the encoder though.
 
Last edited:
The Female Catch

All of the highly logical design stuff is really cool, and extraordinarily well thought out...but unless this unit sits on my workbench, and not on my wall, it better have a really cool, attractive, streamlined case. Believe it or not, my wife picked out the last thermostat by looks....not functionality.

I wish that thermostats would have remote sensors that would "average" the temperature throughout the house. I know that thermostats are supposed to be in a "sweet spot" that represents the average...but still, one room ends up suffering. Maybe even the ability to plug in booster fans that mount over registers that would be switched on and off automatically, forcing heat and cooling into some rooms to assist in the balancing of temperature.
...just my little wish in a thermostat.
 
Appearance is tough but I'm working on it. As for average temperature that's why I've made them RS485. You can use more than one and perhaps even simple RS485 temperature nodes would make a nice secondary kit.

RS485 has massive range and multidrop. At low speeds they can go up to 4000' and 32 or depending on RS485 IC 64 or 128 nodes.
R.E.Smith Serial Communications RS485 shows dozens of RS485 converters with schematics too.
 
Bill is going to support 1 wire network devices. You can slap many DS18S20 on a twisted pair.

...
I wish that thermostats would have remote sensors that would "average" the temperature throughout the house. I know that thermostats are supposed to be in a "sweet spot" that represents the average...but still, one room ends up suffering. Maybe even the ability to plug in booster fans that mount over registers that would be switched on and off automatically, forcing heat and cooling into some rooms to assist in the balancing of temperature.
...just my little wish in a thermostat.

Bill needs to ship this with working software but more then a few will want to modify it or maybe roll their own.

I have a kluge on my workbench doing temp, humidity, and keeping time. Fun stuff.

I am sure Bill's will look nicer.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top