Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Which chip will work best?

Status
Not open for further replies.

jclaudii

Member
I am leaning towards the picaxe family of chips, but I have seen several writeups for what I want to do using just pic chips. Anyway, I mainly want to have a half dozen or more temperature (ds18B20's) and read a input from a homemade anemometer (probably a reed switch) and have it store at least 30 days worth of data on board. This will keep me from having to keep the pc going all the time for data storage. Also, an issue I am not familiar with, does it know the time/day so it could do a time stamp or is that something I will not be able to get? Is the time stamp another small circuit that is easy to do? Also, I think I'll need an extra eeprom or so as I don't think the pic controllers have enough memory to hold the temperature for several days plus wind speed for several days.

Now it has been several years since I played with picaxe and pic microcontrollers and I want to make sure I get a chip that will grow with me. I know the little 08m can do the duty of the anemometer, but I am unsure of the temp sensors, plus I am limited to only 4 in/out's and small memory. That is why I will probably choose one of the larger family of chips with more input/output options. Also, I notice some of the higher chips have a one wire tab. Now if it's possible, that would mean I could hook up several sensors just to that one tab off of the chip. This is the best resource I have found on using multiple sensors on one tab like multiple 1-wire sensor on One pin - PICAXE Forum This looks like it's available only on the 40x1 and the 28x1 through a special command "One-wire - owin, owout"

I am looking at the TheBackShed.com - Gill's Data Logger that uses an picaxe18x

So I am mainly looking for some guidance for building this thing. Any and all help would be appreciated before I place an order on a chip or design board.

Thanks
jclaudii
 
Last edited by a moderator:

blueroomelectronics

Well-Known Member
How many samples in 30 days?

Have you looked at something that will grow with you like a PIC programmer and Swordfish BASIC (yes I like BASIC too, it's just so easy to use) having a programmer means rolling your own PICs, more memory, newer parts and hundreds of PIC choices and your selection of languages like C or asm even JAL.

That 8 pin PICAxe will have very little memory for logging your data, as for the backshed datalogger I would use a larger PIC (40pins) and you could get rid of those 4026 display drivers. Also 1Mb I2C EEPROMs exist so you'd only need two instead of 8 for the same amount of storage.

Swordfish also supports the 1wire protocol as a free module.

PS the DS1307 is the RTCC, but you can do the same thing in firmware with a 32.768kHz crystal on the TIMER1 osc.
 
Last edited:

Diver300

Well-Known Member
Most Helpful Member
I suggest going onto one of the 16 bit processors.

They have a real time clock module, a couple of serial ports, and loads of memory for storing lots of readings. You can write to the program space if you want it non-volatile, but a small battery will keep it going for ages if you go to sleep or a low power mode.

I have run 3 of the DS18B20s on one pin of the pic24FJ series pics. I can post the code tomorrow if anyone wants it. The program got all of the DS18B20s to convert the temperatures at the same time, then read them individually.

It is possible to make a program work out the serial numbers of all the DS18B20s on one wire. However, you then have the problem of working out which serial number is which sensor. On my application, the sensors are all on one water tank so the highest temperature is the physically highest.

If you need to work out which is which, you can wire to separate pins on the pic, or you can write code that displays the serial number and connect one DS18B20 at a time. Alternatively, you can heat each sensor in turn and see which result goes up.
 

jclaudii

Member
I was thinking I may be able to do the below with a 40x2 picaxe chip. I know they are bit more pricey compared to the smaller ones, but it has a built in clock, several adc's and is has the one wire support like I am looking for. I mainly want to get the anemometer up and running to see if I have any good wind speeds, then I can add the temp sensors when I get my solar water system set up(pex style like on builditsolar). I also don't know where to get all the parts, so I may end up ordering a bit here and a bit there...cause I am not paying 20 bucks for a solderless breadboard at radioshack! I still got to find a reed switch for the anemometer.

Also, I wonder if this chip will have enough onboard memory to record one wind sample at 1 minute increments for at least 30 days. I can plug it into a wall wort, I just didn't want to leave the pc running the entire time. Please let me know where my circuit can be improved. The eproms are just for "spot holding" as I am not sure I will even add them at the moment.

I'm also a little confused on the internal clock, so does this mean that this particular chip can record a timestamp along with the data, cause that would be useful.

**broken link removed**
 

jclaudii

Member
I guess you mean a hall effect sensor correct? A opto sensor would work, but I have never played with any of those.

I'm leaning towards the picaxe 40x2 chip that is only 10.95 at https://www.phanderson.com/picaxe/index.html

He also has a solderless breadboard for around 6 bucks and an 40x1 kit with usb support for 30 bucks ( I may call and see if he can put the 40x2 chip in instead).

the temp sensor is 4.50

which way is better to go for data storage?
Microchip 24LC16B/P, 256 bytes X 8 EEPROM, 8-pin DIP - $0.50
Microchip 24LC256, 32K X 8 EEPROM - $2.00

all in all, I think this may be all I need to get the anemometer up and running....anyone see anything wrong? I tried finding specifics about the 40x2 chip, but it keeps taking me to the same .pdf that is a general overview and digs down for all of the picaxe chips.

hall
**broken link removed**

opto
**broken link removed**
 

colin55

Well-Known Member
A hall effect device would be the best as you can get them with Schmitt trigger output and they are easy to interface and easy to connect to detect the rotation of a shaft.
You can use PICAXE or write the code in assembly using a cheaper PIC chip.

Don't forget one thing: When the program doesn’t work, it will be much easier to work out what is going wrong, when you are using assembly code.
"C" or "tokens" or any high level language is alright when you are experienced in programming. But when you are starting off, you really need to write each sub-routine separately and get each section to work, before combining them.
And in your case I can see at least 10 sub-routines will be needed.
It's all up to you, but I consider high level languages are like "key-hole surgery." You are fumbling around in the dark wondering if the PIC instructions produced by the language, are incorrect or if you have made a mistake in the high level language itself.
When you write the instructions yourself, you know where the fault lies.
You can choose any way you want. Everything is wonderful until the program doesn’t work. So don’t say we didn’t warn you.
 

jclaudii

Member
Do regular pic chips allow incircuit programming?
is a regular pic chip the way to go for this instead of picaxe?
 

jclaudii

Member
I looked around a bit and I have no clue about actual PIC programmers, circuits, code etc. It looks like most of it is already done in assembly instead of C or some other language I am familiar with. I have no clue...continuing to research!
 

blueroomelectronics

Well-Known Member
Do regular pic chips allow incircuit programming?
is a regular pic chip the way to go for this instead of picaxe?

Yes, all the newer Flash based ones do (usually an F in the part number)
IMHO if the PICAxe is all you need then use it, if you want to go deeper into the rabbit hole get a decent PIC programmer.

Have you looked at Swordfish BASIC SE (the free version)
 
Last edited:

jclaudii

Member
I have and like it, but looking at the STAMP board that supports it is alot more pricey than a picaxe. I have not made my mind up as of yet as I am still working on the anemometer part.

Can any of you guys think of other ways for me to collect wind data?
 

3v0

Coop Build Coordinator
Forum Supporter
I looked around a bit and I have no clue about actual PIC programmers, circuits, code etc. It looks like most of it is already done in assembly instead of C or some other language I am familiar with. I have no clue...continuing to research!

C is by far the dominant computer language used for most micro controllers including PICs. There are a good number of compilers for the PIC chips and arer free if somewhat limited versions.

You can even compile and run C code on the little 8 pin PICs like the 12F675.

3v0
 
Last edited:
Status
Not open for further replies.

Latest threads

Top