Shop OBEX P1 Docs P2 Docs Learn Events
Trying to decide which chip to use — Parallax Forums

Trying to decide which chip to use

Project5kProject5k Posts: 58
edited 2008-12-08 20:28 in BASIC Stamp
Hi all, nOOb here.. hehehe

I'm considering using a stamp chip in a project i'm working on.· Basically it would be a differential temperature controller for a solar water heater.

The basic idea is that there will be·5 temperature sensors, 2 in group "A", 2 in group "B", and the 5th will be outside on the actuall solar collector(long wires).· Group "A" will be the input and output of the solar side of a heat exchanger, and group "B" will be the input and output on·the storage side.

There will also be 2 pump control outputs.. I havent decided yet if these should be just on and off, or if they will be PWM outputs to controll the speed, i'm thinking for now that a simple on and off will work.

I would also like to have a display attached.· Perhaps to display things like temps and pump status.

The other thing that i had considered, I have a spare computer that i could leave on all the time, so i was thinking, would it be possible to use the stamp to output its data from the 5 sensors, and the pump status out to a spreadsheet or data file or something that i could use to track it all.

The basic logic is that if the solar side is hotter than the storage side, then turn on the pumps so that the solar energy is stored in the storage tank.· A few safteys will have to be in place, things like, if the collector temp is below 33F then run the outside pump to keep it from freezing.· If the storage side is hotter than 180f, then dont run both pumps unless the solar collector side is less than 180F.

My big question is, which chip to use.. which display to use, and does any one have suggestions on what sensors to use to try and measure the tempature of water inside a copper pipe?

I have both an electrical background and a mechanical background, so the work itself isnt gonna be all that hard, but the more research i do on the chips, the more indecisive i get about which one to use.

Any input is much appreceiated.

Comments

  • awesomeduckawesomeduck Posts: 87
    edited 2008-12-03 22:57
    I would start with a BS2 of the p variety...only cost a little more and gives you a lot of flexibility. The Parallax serial LCDs are great too.
    If you think you can get away with out PWM, then code it up, and if you need it you can biuy the PWMPAL which is super cool and easy to use...as long as you use the right 4 IO pins from the start. The key..plan ahead so its a simple plug and play operation to add the PWMPAL.
    I would not leave a spare PC on all the time for this app..you can do it all with a BS2.
    If you really want to log the data, get the USB Datalogger...its easy to add to your BS2 application and a standard USB flash drive plugs into it.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-03 23:11
    The BS2p/pe/px has built-in statements for Dallas Semiconductor's 1-Wire protocol and there are some nice temperature sensors and addressable switches that could (with a power transistor for a driver) control solenoid valves. Several of the thermostats have an alarm output with programmable upper and lower limits that could be used to trigger an alarm or activate some kind of bypass valve for automatic fail-safe operation. The DS18B20 (www.maxim-ic.com/quick_view2.cfm/qv_pk/2812) is one typical device. You should be able to find examples of its use (or similar devices) in the Nuts and Volts Columns (www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx).
  • Project5kProject5k Posts: 58
    edited 2008-12-04 12:20
    awesome, i can just use one of my little flash drives! i wonder.. how much data am i talking about.. i would like to start off recording my data fairly often, maybe take and save the data once a min to start, then when i revamp the code(which I'm sure I'll do several times) after i learn the system a little, i could reduce the data logging to a longer interval...

    What format would the data be in? any chance i could do something like a comma delimited txt file or something similar so i could just import the data to excel?

    The PWM isn't really necessary, it was just a thought for down the road, but i will keep it in mind when i start to pay attention to what pins I'm using so if i decide to add it later i can.. good heads up, thanks on that one...

    I've only read a little about the one wire devices.. but i was definitely intrigued by it.. sounds like a handy easy way to do things...

    Its been a really long time since I've coded anything, so I'm sure once i get closer, I'll be asking lots of questions.. i guess the first step is to sit down and draw myself a logic flow chart... make sure i don't make any endless loops by accident..

    Thanks for the info folks.. I'll look at the links when i get to work, and compare the p, pe, and px, and see which one i think will do what i wanna do vs. price. Money is always an issue, that's just one of the reasons i wanna build this myself, rather than buy an off the shelf unit.. that, and i love to tinker, and with colder weather coming, this sounds like a great indoor project for those days i don't want to go outside.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-12-04 12:38
    Why not PLOT the data coming from your application? Here's a real easy way to do it:
    http://www.selmaware.com/stampPlot/home.htm

    I also picked up a couple of flow charting programs (freeware) which I've hardly had a chance to look at, but they look like they'll do a real professional job. If you want the names of the program, or links to them, just PM (private message) me.

    Regards,


    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • Project5kProject5k Posts: 58
    edited 2008-12-04 14:48
    the plotting software is a really neat idea, i'm just wondering what the difference between that and just loading it into excel is, and then generating the graphs that way.. not to mention the fact that i can manipulate the data any way i want to...

    another question that came into mind while i was driving in this morning, if i use the temp sensors that communicate with the stamp, how many i/o pins does that take, vs if i were just to use thermisters. I was thinking that if i made a voltage devidor with a resistor over the thermister, then i could just use that for comparison between it and the others to make the dicisions.. but i guess doing that wouldnt give me a ferinheight reading, just a relative voltage, so that would make the coding more complex to have the readings converted from a voltage to a temp.. not to mention that it would also complicate the data output...

    I guess the real question is should i get the 40 pin version or the 24 pin...

    another question i was thinking about, with my desire to do all the data logging, will i need some kind of a real time clock so that the data will have the time stamp on it?

    Post Edited (Project5k) : 12/4/2008 2:54:19 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-12-04 15:19
    Project5k said...
    the plotting software is a really neat idea, i'm just wondering what the difference between that and just loading it into excel is, and then generating the graphs that way.. not to mention the fact that i can manipulate the data any way i want to...

    another question that came into mind while i was driving in this morning, if i use the temp sensors that communicate with the stamp, how many i/o pins does that take, vs if i were just to use thermisters. I was thinking that if i made a voltage devidor with a resistor over the thermister, then i could just use that for comparison between it and the others to make the dicisions.. but i guess doing that wouldnt give me a ferinheight reading, just a relative voltage, so that would make the coding more complex to have the readings converted from a voltage to a temp.. not to mention that it would also complicate the data output...

    I guess the real question is should i get the 40 pin version or the 24 pin...

    another question i was thinking about, with my desire to do all the data logging, will i need some kind of a real time clock so that the data will have the time stamp on it?

    Different temperature sensors require different numbers of pins. In addition, some protocols can share pins, so for example if you use "1-wire" sensors,
    Wikipedia people said...
    Many devices can share the same bus. Each device on the bus has a unique 64-bit serial number. The most significant byte of the serial number is an 8-bit number that tells the type of the device. The least-significant byte is a standard (for the 1-wire bus) 8-bit CRC.

    en.wikipedia.org/wiki/1-Wire

    Re. the real-time clock, yes, you'll need a separate one of those. The Stamp chips do not have real-time clocks in them. Parallax sells at DS1302 chip for this,

    www.parallax.com/Store/Components/IntegratedCircuits/TimeMathCoprocessors/tabid/617/CategoryID/82/List/0/SortField/0/Level/a/ProductID/233/Default.aspx

    or you can get it in a breakout board with battery from Sparkfun.
  • JonathanJonathan Posts: 1,023
    edited 2008-12-04 15:40
    I have a virtually identical project running right now. It's a solar/wood stove heated hot tub. I have two pumps, one for the solar panels and one for the stove. I'm using LM34 sensors. I'm actually using a Propeller instead of a Stamp, but the idea is of course the same.

    One thing I did that I would reccomend is to have manual over-ride switches. That way if I need to work on the system or want to test, I can manually turn anything on and off. They are three position switches, so I have off, on and auto modes. I have a box down by the pumps and such with the overrides. I have a controller box in my work area upstairs that has software override switches and the LCD display.

    I plumbed mine so that I'm not using any valves, but if you need valves, look into zone valves insteadof solenoid valves. They only use power when openeing/closing, whereas a solenoid valve uses power all the time it's open. I'm building my system for the day that I move to my off-grid property. I will make a more efficient system using valves when I can afford the valves, but golly are they expensive.

    I have a graphic LCD, so I can grpah if I want. I also have the hot tub temperture displayed on Nixie tubes, just for fun. I'm not bothering to graph anymore, I just display the temps of the various sensors.

    I use the surface temperature of the panels to trigger the pump, rather than a sensor in the output. The reason for that is that on a cold day the external plumbing in which the output sensor can read too cold to run, butin reality there is hot water to be had. So, I tigger the pump when the surface temp is high enough, then monitor the differential between the input and output to decide when to shut of, which I do when the differential drops below 5 degrees.

    Another reason not to just use tank and panel output temps to decide when to run the pump is thermoclining. Assuming that your pump draws from the bottom of the water tank, the water on the bottom will be cooler (in the morning) than the temp at the top of the tank. So, it might look like the differntial is too low to run the pump while in reality there is heat to be had. On my hot tub the difference can be as much as 15 degrees on a cold morning.

    If you want to discuss probe consruction and such, feel free to send me an email.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Project5kProject5k Posts: 58
    edited 2008-12-04 16:28
    well see my thinking was to have the water come out of the drain port on the water heater, go into the heat exchanger then go back in either the t/p valve, or go in the hot water out port on the tank. Havent decided which yet. I would still keep the drain and t/p valve of course, just put a "T" behind them. as for having valves and such, i would have a manual ball valve on each end of the tank so that if i needed to take the exchanger out i could just close thoes valves, and the water heater would still be usable in its normal mode.

    See my big plan is to have the solar heat the water during the day to the point that the electric dosent come on. Then at night, or in the early morning, when we use more hot water than any other time during the day, the electric would function normlly just like if there wasnt any solar stuff attached. I'm not looking to make a complete solar system, just augment what we already have to save on the electricity during the day that its using to just keep the tank hot when we're not useing it.

    But back to the stamp stuff.. if i put a temp sensor at the output of the tank, and then one going back in, and then one on each side of the solar side of the exchanger, that would be enough to make the decision of weather or not to run the pumps to grab the solar heat. My thinking was to have a 5th sensor on the solar collector to monitor its temperature... My thinking is that i can use this to decide weather or not to pulse the solar side pump to move the heated water down to the exchanger and then at that point make the decision of weather to turn on the storage pump or not to get heat. I know that there will be some heat loss between the collector and the exchanger, so i was thinking that the extra sensor and step would also allow me to measure this heat loss, so that my attempts to insulate the tubing from the collector to the exchanger could be measured...

    the other part of the equasion is that for right now i'm seriously considering using a satelite dish as my concentrator collector, that is till i can find a good design of a rooftop flat panel that i can build myself at a reasonable price. so the other part of all of this that the stamp will control is the tracking of the dish. I would like to write the code in such a way that it checks the position of the dish, then checks the temps, and then starts all over again. all of this under an if statement that if the time is between x and y that it just moves the dish to point east for the morning, and if the time is not between x and y that it runs the positional part during the day.

    I'll send you an email if i can figure out how.. and we can discuss more of the solar parts off the forum and try and keep the stamp part on here...
  • JonathanJonathan Posts: 1,023
    edited 2008-12-04 19:55
    Joe,

    Got your email and I'll reply later in depth to some of your solar stuff.

    I don't think you really need to check the temp on both ends of the solar system. If you insulate the pipes well there will be very little loss. Might be informative IF you calibrate both sensors REALLY well, but the bottom line is what the tank temp is, what the input/output temp diff is and what the rise per hour is. I suspect in the end you will no longer care what the temp drop is across your pipes.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Project5kProject5k Posts: 58
    edited 2008-12-06 07:51
    well, actually if i go with the dish concentrator/collector system that i'm thinking about, it will have to be a good distance from the storage tank, and so there will be considerable loss... not to mention that with that kind of distance, i will need to use the collector temp to decide if i should even try and get heated transfer fluid to the heat exchanger...
  • JonathanJonathan Posts: 1,023
    edited 2008-12-06 15:53
    Well, if it is far enough that temp drop is really a concern, then put the sensors on there. Although you could probably just measure the drop on a really cold day and just use that for a worst case scenario. It also depends on where you live. For me in Northern CA, the daytime temps are never that low, so heat loss isn't too big a deal even on non-insulated pipe. If there is sun for my solar panels, it just can't be that cold. Whereas if you live where it is snowy, that is another story.

    Also, you will want to take into account the dreaded "cold water sandwich". All that means is that you want to make sure that the output water is hot enough to make it worth shoving all the cold water in the pipes into your tank.

    Speaking of snowy, do you need freeze protection where you are?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Project5kProject5k Posts: 58
    edited 2008-12-08 12:24
    well, i think i need some freeze protection, true, i live in Texas, just south of I-10 between San Antonio and Houston. The chances of us having a freeze here are slim to none, but there are those few nights where i actually will wrap my faucets...

    and with the heat exchanger, i wouldn't be shoving any cold water into the tank... i would test the temp at the collector, and if that was high enough, then i would start the solar side pump, if the incoming temp to the heat exchanger was hotter than the water coming out of the bottom of the tank then i would turn on the tank side pump.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-08 15:16
    Gentlemen,

    ·· In reading along it seems the discussion isn’t related to the subject, at least not after the first message. Has this thread migrated away from BASIC Stamp discussion? If so I can move it into the Sandbox were it would be more appropriate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Project5kProject5k Posts: 58
    edited 2008-12-08 20:28
    Yea we kinda took a hard left there..

    But now back to the topic.

    So if i use the 1 wire communication method, does any one know what the max distance i can run that is? Oh, and i'm sure that it might be called a 1 wire, but i'm sure that there has to be a ground as well, so reaslistically, how far could i go with my temp sensors, using something like 2/24 telco wire? also, do i remember correctly that these temp sensors can also get thier power from the same wire that is carrying the signal?
Sign In or Register to comment.