• 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.

12 bit, 8 channel data logger

Status
Not open for further replies.

florinm1982

New Member
Hi!

Unfortunately I posted the previous message in a wrong section... my fault.

I am building a project and need some help regarding an 8 channel, 12 bit data logger. The 8 channels are, obviously, analog channels with the voltage range 0 Volts to 5 Volts. The data logger needs to sample those 8 analog channels 20 times per second which leads to a memory requirement of 35 Mb (64 Mb flash card would cover this requirement).

Does anybody have any workable schematics that would fulfill these requirements? Are they free to use?

Thank you for your help,
Florin
 

Nigel Goodwin

Super Moderator
Most Helpful Member
florinm1982 said:
I am building a project and need some help regarding an 8 channel, 12 bit data logger. The 8 channels are, obviously, analog channels with the voltage range 0 Volts to 5 Volts. The data logger needs to sample those 8 analog channels 20 times per second which leads to a memory requirement of 35 Mb (64 Mb flash card would cover this requirement).
Are you sure of your calculations?.

8 channels of 12 bits only takes 12 bytes, 20 samples per second gives 240 bytes per second, giving 864,000 bytes per hour. Certainly a flash memory card would give you plenty of space, but they are quite difficult to interface to - so for a start I would work on that. The rest is pretty trivial to do!.

Why do you need 12 bit accuracy?, and is the rest of the system as accurate as that?.
 

florinm1982

New Member
Hi there!

The sensors that I intend to use and their conditioning signal circuits are suitable for 12 bit precision measurement.

The way I computed the size of the memory is: 12 bit for 8 channels and 20 times per second makes the following size needed for the memory for 1 second measurements on all 8 channels: 12*8*20= 1920 bits/second.

Now we have 3600 seconds in 1 hour and thus we need: 1920*3600=6912000 bites per hour. For 5 hours I need 5 times that size: 5*6912000=34560000 which makes around 35 Mb. Thus a 64 Mb Atmel flash card should be one method that may be used to store these data.
Did I make any mistake?

Thanks,
Florin

Nigel Goodwin said:
florinm1982 said:
I am building a project and need some help regarding an 8 channel, 12 bit data logger. The 8 channels are, obviously, analog channels with the voltage range 0 Volts to 5 Volts. The data logger needs to sample those 8 analog channels 20 times per second which leads to a memory requirement of 35 Mb (64 Mb flash card would cover this requirement).
Are you sure of your calculations?.

8 channels of 12 bits only takes 12 bytes, 20 samples per second gives 240 bytes per second, giving 864,000 bytes per hour. Certainly a flash memory card would give you plenty of space, but they are quite difficult to interface to - so for a start I would work on that. The rest is pretty trivial to do!.

Why do you need 12 bit accuracy?, and is the rest of the system as accurate as that?.
 

florinm1982

New Member
Hi!

I found a schematics on the Internet. I included it at the end of this message. It interfaces 16F876 with 64 Mb Atmel flash card. 16F876 has 5 channels with 10 bit precision A/D on each channel.

I also found a PIC with 8 channels and 12 bits per channel. This is: 16C774. Could I just replace 16F876 with 16C774? What hardware/software problems should I expect?

I worked with 16F876 but I have never worked with 16C774. I know that the software from one PIC should be pretty portable to another PIC. Would I be able to just use the software from 16F876 on 16C774?

Thank you,
Florin

P.S.: copyright to www.captain.at
 

Nigel Goodwin

Super Moderator
Most Helpful Member
florinm1982 said:
Hi there!

The sensors that I intend to use and their conditioning signal circuits are suitable for 12 bit precision measurement.
But do you need 12 bit precision?, or the expense of buying components of that degree of tolerance?. It's difficult (and VERY expensive) to try and build a circuit to give 0.02% accuracy, not to mention that the lower bits are likely to be lost in the noise.

The way I computed the size of the memory is: 12 bit for 8 channels and 20 times per second makes the following size needed for the memory for 1 second measurements on all 8 channels: 12*8*20= 1920 bits/second.

Now we have 3600 seconds in 1 hour and thus we need: 1920*3600=6912000 bites per hour. For 5 hours I need 5 times that size: 5*6912000=34560000 which makes around 35 Mb. Thus a 64 Mb Atmel flash card should be one method that may be used to store these data.
I was talking BYTES and not BITS.
 

florinm1982

New Member
The project intends to measure position/attitude by using accelerations and thus 12 bit precision is needed.

As far as I can tell I evaluated correctly the number of bits needed which is: 34 560 000 bits (i mean BITS; "bites" was wrong spelling).
34560000 bits mean 32.9 Megabits (Mb).
In my case I just assumed that 1 Mb=1 million bits (not quite true since you have to do 1024*1024 but it gives you roughly the same size for memory and in any case the 64 Mb should do the work as we can see above).

Thanks,
Florin


Nigel Goodwin said:
florinm1982 said:
Hi there!

The sensors that I intend to use and their conditioning signal circuits are suitable for 12 bit precision measurement.
But do you need 12 bit precision?, or the expense of buying components of that degree of tolerance?. It's difficult (and VERY expensive) to try and build a circuit to give 0.02% accuracy, not to mention that the lower bits are likely to be lost in the noise.

The way I computed the size of the memory is: 12 bit for 8 channels and 20 times per second makes the following size needed for the memory for 1 second measurements on all 8 channels: 12*8*20= 1920 bits/second.

Now we have 3600 seconds in 1 hour and thus we need: 1920*3600=6912000 bites per hour. For 5 hours I need 5 times that size: 5*6912000=34560000 which makes around 35 Mb. Thus a 64 Mb Atmel flash card should be one method that may be used to store these data.
I was talking BYTES and not BITS.
 

DirtyLude

Well-Known Member
Do you have a specific microcontroller you want to use, or have experience in? Do you have a $ amount you want to stay under? Is this going to be for a production unit, or one off?

There are devel boards out there for many uC's that already have SD or even CompactFlash connectors with sample software. It would be just a matter of connecting the 12bit AtoD converters of you choice to the devel board.

I'm thinking of the ARM ones right now, since there is a nice FAT file system libraries for free available, which would allow you to just pull the card and read it in a PC. Something like:
http://www.olimex.com/dev/sam7-p64.html

Otherwise, if you want to go cheaper, I'm sure a quick google search will find devel boards for AVR or PIC with SD connectors on board.
 

florinm1982

New Member
Hi!

I was thinking to use 16C774... The dollar amount is somewhere around $150...

I was also thinking to start with the circuit that I included in my previous message and try to switch the 16F876 with 16C774. I don't know if this would work. Does anyone know if it would work?

Thanks,
Florin

DirtyLude said:
Do you have a specific microcontroller you want to use, or have experience in? Do you have a $ amount you want to stay under? Is this going to be for a production unit, or one off?

There are devel boards out there for many uC's that already have SD or even CompactFlash connectors with sample software. It would be just a matter of connecting the 12bit AtoD converters of you choice to the devel board.

I'm thinking of the ARM ones right now, since there is a nice FAT file system libraries for free available, which would allow you to just pull the card and read it in a PC. Something like:
http://www.olimex.com/dev/sam7-p64.html

Otherwise, if you want to go cheaper, I'm sure a quick google search will find devel boards for AVR or PIC with SD connectors on board.
 
H

hyedenny

Guest
The last I heard, Mb meant megaBYTE, not megabit. At least where memory cards are concerned... So youd require only 4.32Mb of storage for 5 hours.
Shouldnt MCLR have a 4.7k resistor???
 

florinm1982

New Member
It may just be a matter of language...

I know that MB is megabyte... and Mb is Megabit. I used Mb notation so I was correct, as far as I can tell, in what I was saying. However I was wrong when reffering to Atmel flash cards- they measure the size in MegaBytes and not Megabits.

quick question: I have noticed that in the above circuit that I posted on the forum the data that is logged can be sent on serial/RS232 port to a computer. Since I want to write the data on a flash card instead (weight limitations), could I use a flash card reader/writer device? I've noticed that there are this kind of devices and they can be interfaced on RS232.
I wait some opinions since this would simplify the things very much.

Thanks,
Florin

hyedenny said:
The last I heard, Mb meant megaBYTE, not megabit. At least where memory cards are concerned... So youd require only 4.32Mb of storage for 5 hours.
Shouldnt MCLR have a 4.7k resistor???
 

Nigel Goodwin

Super Moderator
Most Helpful Member
florinm1982 said:
quick question: I have noticed that in the above circuit that I posted on the forum the data that is logged can be sent on serial/RS232 port to a computer. Since I want to write the data on a flash card instead (weight limitations), could I use a flash card reader/writer device? I've noticed that there are this kind of devices and they can be interfaced on RS232.
I wait some opinions since this would simplify the things very much.
There should be no great problems changing from the 16F876 to the 16C774, however, I presume you are aware that the 16C774 is OTP (One Time Programmable), so you would need to buy an expensive UV eraseable version to work with, until you have you program finished. Obviously a UV eraser would be required as well - this makes for a very slow cycle time, and (if you can afford it?) multiple 16C774JW's are advisable.

Obviously, the software will require some changes, any specific ones for the differences between the chips, and probably the A2D and flash writing routines - but again, changes should only be slight.

Assuming the 16C774 and 16F876 are pin compatible?, which I haven't checked, you might try using the 10 bit 876 at first, and see how that performs for you - I'm still doubtful that the change to 12 bits will make any significant difference?, and I'd be interested to see a comparison between the two!.

As for a flash card reader, they are cheaply available and plug into a USB port - but it rather depends on how you're using the card, to read it on a PC requires using the PC filing system, the PIC might not be doing that, so it will only be readable by the PIC. But you could almays make yourself a seperate PIC based flash card reader to interface to RS232.
 

phalanx

Member
Another controller option would be to use a dsPIC. There are a number of varients that include a 12-bit ADC with at least 8 analog inputs. The least expensive of the bunch is the dsPIC30F2011 which has an 8 input 12-bit ADC all in an 18 pin package.

The 28 pin options are the dsPIC30F2012 and the dsPIC30F3013 both of which have 10 analog inputs on their 12-bit converters.
 
Status
Not open for further replies.

EE World Online Articles

Loading

 
Top