PDA

View Full Version : Newbie: Temperature measurements



Budda
- 29th March 2007, 09:53
Hi,
Please bear with me while I fill you in on some background info before I ask my question. I am a total newbie to PICs and have barely understood what is possible. I have gotten myself a book and a programmer is on the way. Meanwhile I am using a simulator.
I have a sound understanding of programming and while I have not used Basic before (or at least not this kind of Basic) I am confident that Ill manage.
I have however no real background in electronics and am often stumbled but the simplest things.
My goal is to create a circuit based on the PIC16f84a that can "sit" somewhere battery powered for ca. 48 hours and take a temperature reading every minute/10minutes/hour. After 48 hours I will pick it back up and connect it to my PC (via USB or serial) to get the data in textform and repeat the process.
Now, with that in mind I pose my questions:
1. Is that even possible?
2. Do you think that the electronics involved will take years to learn?

Please don’t misunderstand me. I am very prepared to learn and put my time in. Especially since once having accomplished this, I could go on and do the same for humidity and pressure for what seems a very reasonable price. However, it is possible to do all this with USB ready hardware and that is what I am using at the moment.
On the one hand I am very tempted by the flexibility PICs seem to offer but on the other I am daunted by the electronics involved.
This forum seems to have its share of experienced Members. What do you think? Please feel free to tell me that I am wasting my time or ask for any more information that you might need. Meanwhile I will try to get that silly LED to blink...

PS: In case you have any further newbie electronics website, please list them. Especially ones with Tutorials and Case studies. Magazines are not really an option for me.

Acetronics2
- 29th March 2007, 10:31
Hi, Budda

The Project for a PIC is interesting ...

BUT you have such a thing already-in-one-package from MAXIM ...

Just have a look to the DS 1615 chip ... that you even can get free from MAXIM Integrated Products.

I know it is a bit less funny ... but if you're a beginner ... a simpler project would really be better !!!

Alain

PS: For the "chocolate box" ... you'll have to wait a bit more ... Cf.: Cat Stevens !!!

T.Jackson
- 29th March 2007, 10:36
Easily accomplished, but I don't recommend it as a first project to cut your teeth on. Better to know your key ingredients first. Break it all down into sections - building blocks - study each block before constructing the building.

Key ingredients for a simple temp logger:

1. PIC (16f628a, forget about the 84)
2. EEPROM (24LC256, PIC hasn't enough internal memory)
3. Temp sensor (LM335Z or better)
4. Power supply (Preferably regulated w/ adequate decoupling)
5. Serial interface for the PC (Max 232)

Five building blocks to study. Build & test each one before constructing the 5 story high rise. Same story applies for coding. Suggest getting blinky to work first before diving into a project like this. It's not terribly difficult but it is at 'novice intermediate level'

Trent Jackson

Acetronics2
- 29th March 2007, 11:05
Hi, Jackson

Just forgot the RTC ... good idea, no ???


Alain

mackrackit
- 29th March 2007, 11:33
A NEWBIE that wants to learn!!! Welcome.

http://www.rentron.com/pic.htm Has some good tutorials .

None of this is hard if you take it step by step.

Years to learn? Depends on how many hours a day you work on it. Hour or two a day and in a few weeks this project should be running.

HAVE FUN

T.Jackson
- 30th March 2007, 06:59
Just forgot the RTC ... good idea, no ???



A Real Time Clock wouldn't be a too bad of an idea if extremely accurate time keeping was required. I personally wouldn't bother with its expense if all I wanted to do was take a temp reading every 10 mins for a couple of days.

Well structured code can be written to suffice for a simple clock that may only lose or gain a few seconds here or there in a period of 48 hrs.

Trent Jackson

Acetronics2
- 30th March 2007, 08:43
Well structured code can be written

Trent Jackson

Trent,

Do you remember our friend wrote " I'm a beginner ..."

Cheers ...

Alain

paul borgmeier
- 30th March 2007, 08:58
Then the OP is in luck - the second code set listed here
http://www.picbasic.co.uk/forum/showthread.php?t=2129
maintains time as well as most RTC ICs and could easily be ported to 628A or similar. This code is around 30 lines or so of instructions to do this.

Also, if the OP only wants 10 minute intervals over 48 hours, the 628A could be used without external EEPROM ... stash some in the on-board EEPROM and the others in DATA MEMORY. It's battery powered - just do not turn it off until the data is downloaded. This could be a stepping stone to more data and and external EEPROM.

The manual has the "RS232" connection for PIC direct to PC - see SEROUT for example. No need to add MAX232 unless he want to do it really right. Again, a stepping stone to more complexity.

Just some ideas - good luck blinking your led.

Budda
- 30th March 2007, 09:19
Thank you all for those encouraging messages!

Trent,
thank you so much for your post. It seems like a very sensible and logical idea to do that. My Programmer is on the way (i hope I can do 16f628a with it) and i will get into researching each block. Are there any webpages you would recommend so I can understand those steps better?

mackrackit,
Great site thanks! i already spend a good amount of time there and am in the process of taking the whole tutorail step by step. Is it a problem that everywhere I look for entry level stuff I see 16F84? Will it be difficult for me to switch to 16f628a later?

Acetronics, thanks for the tip. It would be great to see a ready-built solution as something I could aspire to. However, after spending 1 hour (seemed like days) on the Maxim site I gave up. The site is clearly written for people who deal with electronics a lot and don't need explanations. I found several temperature elements and even some references to Time/Temperature/Event Recorders but they were nowhere to be seen as products...

Paul,
while your posts are still over my head I understand the need for something that gives me the time. After all I need a timestamp to record a timeline. Thank you for the tip about the memory. I will probably first build one without external memory and then a couple with. That would enable me longer logging times, no? A week would be great.
But more about that later, once I got the basics down...

mackrackit
- 30th March 2007, 09:29
Is it a problem that everywhere I look for entry level stuff I see 16F84? Will it be difficult for me to switch to 16f628a later?
Not a problem. You can do more with the other chips, but that is all part of the learning curve. Basically all of the micro chips are the same.16F, 18F The same as a Chevy and a Rolls. You can drive one, you can drive the other. Might have to look around a bit for the wiper control, but still the same.

Bet I get slammed for this analogy.:)

Acetronics2
- 30th March 2007, 09:56
Thank you all for those encouraging messages!

Acetronics, thanks for the tip. It would be great to see a ready-built solution as something I could aspire to. ...

Hi, Budda

You have here ... as a starter kit !!!

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2820

http://datasheets.maxim-ic.com/en/ds/DS1921K.pdf

http://datasheets.maxim-ic.com/en/ds/DS1921G.pdf

Seems DS 1615 and 1616 ( 1615 + 3 Analog recording channels ...) have been stopped ...

Now, there is the 1Wire "thermochron" you can interface straight to the Computer !!!


Alain

PS: ya ... their site is not so easy to browse ....