a mega-thermostat

For hardware talk only (please avoid ROM dumper stuff)
Post Reply
evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

a mega-thermostat

Post by evildragon » Tue Jun 26, 2007 2:59 am

I was thinking, about turning my Genesis into a working thermostat for the house. I have a spare genny to do this too..

I propose I use relays to turn the certain units on (air handler, heat pump, compressor, blower, etc), and use the second controller port to achieve this..

BUT, how the heck can I interface a thermistor to the controller port? It doesn't have to update very fast, around 1 time every 20 seconds is fair enough...

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Tue Jun 26, 2007 4:25 am

LOL

the thermostat is a switch so wire it to key UP for example and use the 68000 to read the control port, but is that thermo suitable for the range temperatures you're dealing with?

I have one but it toggles at 25~50 (it's ajustable)

there is no need to mod a mega drive board AND you could control the relays with the model1 ext port at the back

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Jun 26, 2007 4:40 am

Jorge Nuno wrote:LOL

the thermostat is a switch so wire it to key UP for example and use the 68000 to read the control port, but is that thermo suitable for the range temperatures you're dealing with?

I have one but it toggles at 25~50 (it's ajustable)

there is no need to mod a mega drive board AND you could control the relays with the model1 ext port at the back
oh, no, you misunderstood..

the thermostat on the wall is being removed ;) the Genesis is to take the place.. the genesis on a small TV monitor will show room temperature, set programs (stored in NVRAM on the cartridge), and the current "mode" (heat/cool)...

The only problem I am seeing though, is a way to get the Genesis to read the thermistor (the resistor that tells temperatures).. I got the ratings for this specific thermistor, but how can I wire it up to the Genesis controller port, to actually read it? I don't see how something varying in resistance can be used without some form of encoder..

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Jun 26, 2007 5:15 am

here's how I propose the program look like on the Genesis.. hopefully I used a valid color palette ;)

Image

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Tue Jun 26, 2007 8:20 am

You have way too many colors on that picture... more specifically shades...

MD has fantastic controller ports... you have 7 I/O pins and you can program each to be as input or output.

Each of the three ports (1, 2, ext) have this control register which is used to configure the pins. Any bit thats 1 is output, and 0 means input.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Tue Jun 26, 2007 2:10 pm

evildragon wrote: The only problem I am seeing though, is a way to get the Genesis to read the thermistor (the resistor that tells temperatures).. I got the ratings for this specific thermistor, but how can I wire it up to the Genesis controller port, to actually read it? I don't see how something varying in resistance can be used without some form of encoder..
You'll need an ADC (analog to digital converter).

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Tue Jun 26, 2007 2:30 pm

Ahhh its a thermistor, so it's a variable resistor...


Build a voltage divider -> put the output in a 8bit ADC, mux the 8bit input to a 4bit output like a megadrive controller does, then use the 68000 to read the controller port, setting TH high then low


http://img461.imageshack.us/my.php?imag ... digun3.png
Image

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Jun 26, 2007 4:30 pm

i'll try and see how an ADC works.. I had a feeling it would need to be encoded..

I'll make a new mockup that should be more realistic.. I think when I did the mockup, I had the 32X's graphics in mind ;)

8bitwizard
Very interested
Posts: 159
Joined: Sat Feb 24, 2007 11:35 pm
Location: San Antonio, TX

Post by 8bitwizard » Wed Jun 27, 2007 2:40 am

Or you could build an I2C interface for one of the joypad ports (basically a plug, some wire, and two 4.7K resistors), and hook up a temperature sensor to it, like one of these: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2407

Of course while the hardware is easy, it's quite a bit of programming work to get an I2C interface up and running. I did it for a cartridge, but the joy port will be a bit different. (you will have to manage the control port to tri-state the SDA line to send a '1')

Someone made an I2C EEPROM dongle for the Atari 2600, and I have a sample unit. If I didn't have lots of other things to do, I'd write some code for it.

Post Reply