Referentie, aandeel, en hop uw favoriete plaatsen met Toolbar SiteHoppin voor Firefox!


  • 1
  • ...
  • ...
  • 0

Zedomax DIY 109 - bouw een digitale thermometer in één minuut!

Binnen gepost DoItYourself! door maximum op 15 September, 2006 in 8:54 p.m.

[DIY 109]

Doe het zelf!


De Digitale Thermometer van Zedomax
Bouw een digitale thermometer in 1 minuut!

Hier is een video van de bouw van een digitale Thermometer in 1 min:

Hier is een video van digitale Thermometer Zedomax in Actie:

Lijst van onderdelen:

1 de Uitrusting van het Begin CB280

1 CLCD420B

1 beschikbare DS1620 (in mouser.com of digikey.com ook)

beschikbaar in cubloc.com

Geschat Time om te assembleren: minuten 1

Geschat Time aan Programma: nul (bron verstrekte code)

O.k., schijnt het als de enige klasse die ik werkelijk van in universiteit heb genoten was de ingebedde computerklasse. Alle andere kringsklassen en klassen van de computertaal droegen de hel uit me omdat zij geen daadwerkelijk product waren.

Met ingebedde computers, wordt u eigenlijk fysisch om materiaal te zien en dat is van wat ik over het hield.

Goed begon ik met de reeksmicrocontrollers van Motorola MC68 en het nam me bijna een week om een digitale thermometer te maken. Ik moest alles van kras maken. Het was nog interessant omdat ik iets fysiek maakte en het werkte!

Anyways, nu ben ik blij ik het zelfde ding kan doen maar neemt het me slechts 1 minuut!

Not because I got smarter but mostly because I’ve done this thousand times now, but I think anyone should be able to accomplish this in 1 minute if you follow these directions. :)

Connections

Just follow the above picture exactly in less than 1 minute and you have the following source code to download and make this thing work!

diy109.zip

Taking it Further…

Okay, now you have a 1 minute guide to making a digital thermometer. Go to your college professor and show him how you can make one in 1 minute… maybe he will give you some extra credit…

If you are having any trouble with above app, please e-mail max@zedomax.com

If you have any cool apps you’d like to share or want some kind of DIY, please e-mail to max@zedomax.com

We do accept free samples for DIYs, please email max@zedomax.com :)

Program Source…

‘ DS1620 Temperature Sensor App v.0.0.1

‘ v0.0.1 - Displays upto 2 decimals

‘ by using DS1620’s precise mode

Const Device=cb280

‘ Set Pin numbers!

‘ Set DQ,CLK,RST pins

‘Connect P24 to RST of DS1620

‘Connect P25 to CLK of DS1620

‘Connect P26 to DQ of DS1620

#define RST 24

#define CLK 25

#define DQ 26

Set Ladder Off

Dim ReturnedTemp As Single, TempF As Single, TempC As Single ‘Floating Point variables for storing temperature

Dim COUNT_REMAIN As Single, COUNT_PER_C As Single ‘Floating Point variables for calculations

Dim tmp As Single ‘Temporary variable for Floating Point

Dim TempString As String *6

Dim TempFString As String * 6

Dim TempCString As String * 6

Set Display 2,0,0,128

‘Erase screen

Cls

Delay 100

Csroff

Locate 2,0

Print “Zedomax Digital”

Locate 5,1

Print “Thermometer”

Locate 0,2

Print “Fahrenheit: “

Locate 0,3

Print “Celcius: “

DS1620Init

‘On timer(5) Gosub MAINPROCESS ‘Timer Interrupt every 500msec!

Do

DS1620

Loop

‘MAINPROCESS:

‘Return

End

Sub DS1620Init()

Output RST

Output CLK

Output DQ

‘Send Initialization to DS1620

Out RST, 1

Shiftout CLK,DQ,0,0×0C,8

Shiftout CLK,DQ,0,0×02,8

Out RST, 0

‘Start DS1620 Temperature Conversion!

Out RST, 1

Shiftout CLK,DQ,0,0xEE,8

Out RST, 0

End Sub

Sub DS1620()

‘——Read Temp——————————

Out RST,1

Shiftout CLK,DQ,0,0xAA,8

ReturnedTemp=Shiftin(CLK,DQ,0,9)

ReturnedTemp=ReturnedTemp/2

Out RST,0

Out RST,1

Shiftout CLK,DQ,0,0xA0,8

COUNT_REMAIN=Shiftin(CLK,DQ,0,9)

Out RST,0

Out RST,1

Shiftout CLK,DQ,0,0xA9,8

COUNT_PER_C=Shiftin(CLK,DQ,0,9)

Out RST,0

‘——Precision Formula (According to DS1620 Data Sheet)

tmp=(COUNT_PER_C-COUNT_REMAIN)

tmp=tmp/COUNT_PER_C

If tmp>0 Then

TempC=ReturnedTemp-0.25

TempC=TempC+tmp

Else

TempC=ReturnedTemp

End If

‘Change from Celcius to Fahrenheit!

TempF=TempC*1.8

TempF=TempF+32

‘Convert floating point value to string and set the number of decimals

TempString=Float ReturnedTemp

TempFString=Float TempF

TempCString=Float TempC

TempString=Left(TempString,4)

TempFString=Left(TempFString,5)

TempCString=Left(TempCString,5)

‘Output to LCD!

Locate 12,2

Print TempFString

Locate 12,3

Print TempCString

‘ Locate 0,2

‘ Print TempString, ” Deg C (w/o precision)”, Cr

‘Print to debug screen!

‘Debug “Current Temperature in is “, Cr,TempFString, ” Deg F “, Cr

‘Debug TempCString, ” Deg C”, Cr

‘Debug TempString, ” Deg C (without precision)”, Cr

End Sub

, ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


RSS feed | Trackback URI

5 Comments »

2006-09-15 21:10:51

[...] Full story via Link [...]

MyAvatars 0.2
Comment by Sriram Sridharan
2006-11-29 05:51:12

I’m making a Digital Thermometer with a DS1620 and a 8051. Do you need a lookup table for that? Could you tell me where i can find the code? Thanks in advance..

MyAvatars 0.2
Comment by max
2006-11-29 07:36:57

Hi there, you don’t need any tables for the DS1620, you just need to talk to it
using the SPI protocol. If you have any Basic programming experience, you can refer to the above Program Source, which you probably easily convert to 8051’s C language.

MyAvatars 0.2
Comment by Joe
2007-02-08 20:39:11

Hello Max, good job! I got a question how you convert the voltage into fahrenheit and celcius. thanks

MyAvatars 0.2
Comment by sai Subscribed to comments via email
2008-05-02 04:07:13

can you maill me one please

MyAvatars 0.2
Name (required)
E-mail (required - never shown publicly)
URI

Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.