Programming a DS1821

Discussion in 'Embedded Systems and Microcontrollers' started by Neosec, Feb 25, 2013.

  1. Neosec

    Thread Starter Member

    Feb 25, 2013
    36
    1
    Hi all, New here and starting with a question. I'm looking to program a DS1821 1-wire thermometer/thermostat to operate in stand alone thermostat mode.
    I've been away from micro-controllers for more than a decade but a project has come up that brings me here. Seems to me that some simple (what do I know, I don't write software) software running on a PC and a USB to 1-wire interface would be all that's needed to write the T/R bit to 1 and set the hi-lo set points. I can't find the software though.
    Alternately I could get out my dusty PIC Micro development board and PicBasic Pro and use a PIC in between the PC and the DS1821. I was just hoping for a quick solution so I didn't have to relearn what I've forgotten.
    Any other ideas?
    TIA
    Neo
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
  3. Neosec

    Thread Starter Member

    Feb 25, 2013
    36
    1
    Thanks for the reply!
    It's an awful lot of work to flip a few bits, but it is what it is.
    Thanks again.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    How badly you need this? I can do it for you.
     
  5. Neosec

    Thread Starter Member

    Feb 25, 2013
    36
    1
    I need it quickly, within two weeks or so. But cost is an issue.
    It's for a low temperature alarm for a few greenhouses in case of furnace failure or power outage. I am looking at the DS1821 because of cost savings over a mechanical t-stat that will withstand the very high humidity. Something like this http://www.grainger.com/Grainger/DAYTON-Line-Voltage-Thermostat-6EDY5?Pid=search is what I'm wanting to avoid because of cost. It's for three greenhouses so DS1821 X 3 vs. Tstat X3.
    The three DS1821's will be wired into 3 Linx transmitters each on a different button http://www.digikey.com/product-detail/en/CMD-HHLR-315-MD/CMD-HHLR-315-MD_-ND/1577198 one button for each house. These will transmit to the Linx relay http://www.digikey.com/product-detail/en/FCTN-RLY4-315-2/FCTN-RLY4-315-2-ND/340079 where the outputs of the relays will be paralleled to the existing DC powered alarm.
    What's your schedule and price?

     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    I don't ask for money but I can't do it in two weeks. Sorry.
    Maybe someone else on AAC wants to give it a shot.
     
  7. Neosec

    Thread Starter Member

    Feb 25, 2013
    36
    1
    No problem, thanks for the offer.
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Perhaps you may want to consider getting an Arduino Uno from your nearest RadioShack store and use it to interface to the DS1821. You stated that you wanted to operate the DS1821 in a standalone mode. The sweet thing about using an Arduino is that the library of functions for reading and writing to the DS1821 (a 1-wire device) are already written and ready to use. (http://playground.arduino.cc/Learning/OneWire)

    The Arduino can serve as the smart interface to the device. This would mean that you would be using the 2 weeks to develop the software since the hardware is pretty much ready to go.

    hgmjr
     
  9. Neosec

    Thread Starter Member

    Feb 25, 2013
    36
    1
    I didn't know about the Arduino and may have gone that route if I saw your post earlier.
    Since my earlier posts I've got PicBasic Pro up and running as well as my EasyPIC3 development board. I have a DS1820 installed and communicating with a PIC16F88 and temperature being displayed on an LCD running in 4-bit mode (default on the EasyPIC3 board). So making progress.
    I'm having second thoughts about using the DS1821 in thermostat mode though due to power consumption. It runs continuously in that mode with typical I= 500uA. I'm guessing about 2 months on a set of AA batteries. Could use D-cells. Or drop in a PIC and I can add sleep, battery monitor, test function, etc.
    K.I.S.S - Keep it simple stupid.
    Haven't decided.:confused:
     
Loading...