USB-capable data logger build - WattFlyer RC Electric Flight Forums - Discuss radio control eflight

Electronic Builders Workshop Discuss how to build motors, ESC's, chargers, mixers, etc here

USB-capable data logger build

Old 06-01-2011, 02:22 AM
  #1  
NJSwede
3D wannabe
Thread Starter
 
NJSwede's Avatar
 
Join Date: Nov 2010
Location: New Jersey, USA
Posts: 1,893
Default USB-capable data logger build

Hi!

This thread is the result of a discussion between me an Dennis (kyleservicetech). We were both interested in building a really capable data logger with an USB interface that can be plugged into a PC for graphing and data analysis.

As far as I'm concerned, the requirement spec looks something like this:

1) Battery amps and volts. Possibly dual power systems.
2) Accelerometer (G-meter)
3) At least three temperature sensors (e.g. motor, ESC and battery)
4) Small and light enough to fit a park flier
5) All channels logged at least once per second, preferably 10 times per second for accelerometer.

It would also be extremely cool to hook it up to a GPS receiver. That way you'd get things like

1) 3D flight path
2) Max altitude
3) Max distance from pilot
4) Climb rate
5) Ground speed. Graphs and max.

If you start correlating the flight pattern recorded by the GPS with things like G readings and amp draw, you can do some really exiting analysis of how your model reacts to various maneuvers.

I'd personally prefer to let the on-board device deal with data acquisition only and let the PC deal with analysis.

As far as what microcontroller to base it on, I know a lot of people how have used the "Teensy" with great success. It comes USB ready and with all programming tools needed.

http://www.pjrc.com/teensy/

There's also a lot of GPS chips around, but most of them seem to be for surface mounting only. Maybe it's not a problem for Dennis, but it is for me.

I'm a programmer by trade, so I think I'd be able to handle the software aspect. I'm ok with electronics, but not a wizard like Dennis.

Sounds like a fun project?
NJSwede is offline  
Old 06-01-2011, 02:40 AM
  #2  
JZSlenker
Member
 
JZSlenker's Avatar
 
Join Date: Jul 2010
Location: Harrisburg, PA
Posts: 206
Default

Sounds like an awesome project. I wish you luck. I enjoy such electronic projects but the surface mount components would be an issue for me as well. Etching circuit boards is easy enough but if its more than through hole components i'll tap out. Programming PLCs has always been fun when the opportunity has presented itself at work. Good luck
JZSlenker is offline  
Old 06-01-2011, 03:05 AM
  #3  
cbatters
Super Contributor
 
cbatters's Avatar
 
Join Date: Sep 2006
Posts: 3,050
Default

Cheap prototype PCB services are available that wipe out the issues of smt.
cbatters is offline  
Old 06-01-2011, 12:23 PM
  #4  
NJSwede
3D wannabe
Thread Starter
 
NJSwede's Avatar
 
Join Date: Nov 2010
Location: New Jersey, USA
Posts: 1,893
Default

When logging all that data, memory obviously becomes an issue and the microcontroller's on-board flash memory might not be enough. Since SD cards have become dirt cheap and most new PCs have built-in readers, storing data on a removable SD card might be an option. Here's a project that might serve as inspiration:

http://www.dharmanitech.com/2011/05/...atalogger.html
NJSwede is offline  
Old 06-07-2011, 12:34 AM
  #5  
kyleservicetech
Super Contributor
 
kyleservicetech's Avatar
 
Join Date: Apr 2008
Location: Wisconsin, USA
Posts: 8,952
Default

Originally Posted by NJSwede View Post
Hi!

This thread is the result of a discussion between me an Dennis (kyleservicetech). We were both interested in building a really capable data logger with an USB interface that can be plugged into a PC for graphing and data analysis.

As far as I'm concerned, the requirement spec looks something like this:

1) Battery amps and volts. Possibly dual power systems.
2) Accelerometer (G-meter)
3) At least three temperature sensors (e.g. motor, ESC and battery)
4) Small and light enough to fit a park flier
5) All channels logged at least once per second, preferably 10 times per second for accelerometer.

It would also be extremely cool to hook it up to a GPS receiver. That way you'd get things like

1) 3D flight path
2) Max altitude
3) Max distance from pilot
4) Climb rate
5) Ground speed. Graphs and max.

If you start correlating the flight pattern recorded by the GPS with things like G readings and amp draw, you can do some really exiting analysis of how your model reacts to various maneuvers.

I'd personally prefer to let the on-board device deal with data acquisition only and let the PC deal with analysis.

As far as what microcontroller to base it on, I know a lot of people how have used the "Teensy" with great success. It comes USB ready and with all programming tools needed.

http://www.pjrc.com/teensy/

There's also a lot of GPS chips around, but most of them seem to be for surface mounting only. Maybe it's not a problem for Dennis, but it is for me.

I'm a programmer by trade, so I think I'd be able to handle the software aspect. I'm ok with electronics, but not a wizard like Dennis.

Sounds like a fun project?
Sounds like this would be an excellent project. I like the idea of using those SD memory cards for the data. Would have to look up on how to interface with one.

I've used several different microcontrollers over the years. The units I like best is those made by Microchip. They have a PicChip PIC18F25K22 that would work well with this project. http://search.digikey.com/scripts/Dk...F25K22-I/SP-ND. Microchip has one good benefit, that is their PicKit# programmer. This $45 unit can be connected directly to the PicChip with one of those IC clips, and can be used to program the PicChip after soldering the chip to the circuit board. These chips can be programmed thousands of times. But the prime benefit of the PicKit3, is it allows programming, single stepping, break points, and display of all the chips registers on your PC. Sort of a poor mans logic analyzer.

Thi PIC18F25K22 has its own built in 1% accuracy clock oscillator, so that eliminates whats required for a clock. It's got many inputs, both analog and digital. And its analog inputs are 10 bits.

The accelerometer is an issue. I found the ADXL326 three axis accelerometer unit in www.digikey.com for about $7.00. http://search.digikey.com/scripts/Dk...ADXL326BCPZ-ND

So, with the ADXL326 accelerometer chip, the PicChip could read it as often as desired, and store the raw data, in three axis, to the SD card. The PicChip can read its analog inputs some 4000 times a second if desired, so that is not an issue.

We could either store the data on an SD card, or use one of Microchips memory chips. The memory chips would require connecting to a PC with a USB adaptor, something I've never done. Do recall some information on storing data on an SD card in the "Nuts and Volts" magazine, will have to look that up. The PicChip has 28 pins, of which 24 are I/O ports. They can be programmed as either inputs, or outputs, or analog inputs. They can be changed from "In", to "Out" in software if desired while the program is running.

So, at least for the accelerometer, this would be a fairly straight forward project, with the SD card as an unknown. Reading altitude would be an issue, in trying to find a good, inexpensive pressure indicator that could compensate for atmospheric pressure and the like. GPS, I've never done. Receiver battery voltage could be done, but I'd prefer this unit be completely independent from the radio's receiver. Never know what type of RC equipment this thing would be used on.

Reading battery Amps and Volts is a fairly straight forward project. I've built up 8 of these units that reads battery amps from zero to about 80 Amps. (Limited by the shunt 1% 0.001 ohm resistor)Problem with reading battery amps, that requires heavy duty wire connections to the circuit board, like #12 or so. You do get a little "Jitter" on the current measurements. Quick way to get rid of that is to read it maybe a hundred times, and get an average. Since the PicChip can read analog inputs some 4000 times per second, a hundred readings per channel is not an issue.

So, the most expensive components would be the circuit board, accelerometer, SD card parts, and the PicChip itself. If we don't use an on board LCD display like I did, that will really cut the weight of the unit. That LCD display alone costs some $9.00.

Comments everyone

Last edited by kyleservicetech; 06-07-2011 at 01:04 AM.
kyleservicetech is offline  
Old 06-07-2011, 07:49 AM
  #6  
Wildflyer
Past President of PSSF
 
Wildflyer's Avatar
 
Join Date: Sep 2009
Location: Lacey WA, 1 mile E of Mushroom Corner
Posts: 2,071
Default

As far as the SD card is concerned, I would respectfully suggest the micro SD cards.

They are far smaller is physical size, but come as large as 32gb, that should store all you can possibly monitor in several different flights.

This sounds like a interesting project.
Wildflyer is offline  
Old 06-07-2011, 05:21 PM
  #7  
kyleservicetech
Super Contributor
 
kyleservicetech's Avatar
 
Join Date: Apr 2008
Location: Wisconsin, USA
Posts: 8,952
Default

Originally Posted by Wildflyer View Post
As far as the SD card is concerned, I would respectfully suggest the micro SD cards.

They are far smaller is physical size, but come as large as 32gb, that should store all you can possibly monitor in several different flights.

This sounds like a interesting project.
Just did some quick investigation on the USB system. The March 2009 issue of "Nuts and Volts" magazine has an article on the CP2103 USB interface chip. This chip measures about 0.2 inches, square, and has 28 pins on it. Most USB Interface chips have several times that many pins on them. Soldering that CP2103 chip to a circuit board would be a real problem for a lot of wattflyer readers, including me. And, I've soldered connections to IC's smaller than the CP2103.

Just noted that PicChip has a microchip with built in USB capability, as their part number PIC18F2450. It's available as a standard 0.1 inch dip chip, with 28 pins. Problem is, Microchip indicates this is for experienced USB designers, and their manual has some 26 pages devoted to the USB interface alone.

So, guess the next step is to try finding anyinterfacing info on the SD cards.

I've looked at the Teensy product. Looks like it could do what's needed. But it's programmed in the "C" language, and I've got zero experience in that language, and do not have the compiler for it either.

The Teensy ++ has 8192 bytes of static ram, and assuming we can use about 70% of it for data storage, that would be about 5 minutes of data, reading 10 times per second.

The only scary part of this whole project, is that it has been done before by Eagle Tree. And, probably costs a lot less than what it would cost to build this project.

Last edited by kyleservicetech; 06-07-2011 at 05:59 PM.
kyleservicetech is offline  
Old 09-19-2011, 08:48 PM
  #8  
philipa_240sx
Super Contributor
 
Join Date: Jul 2009
Location: Ontario, Canada
Posts: 1,046
Default

Originally Posted by kyleservicetech View Post
The only scary part of this whole project, is that it has been done before by Eagle Tree. And, probably costs a lot less than what it would cost to build this project.
That's what I was going to say.... it's been done already:

http://www.eagletreesystems.com/
I own/used my Eagletree v3 eLogger in nearly every plane I own. At ~25g with connectors it easily fits in most parkflyer type planes. I've used it in planes as light as 10oz. It's an invaluable tool for testing power systems.

That being said, I don't take it out on every flight. Usually it get used during bench testing and the first few flights to check out new planes. After awhile I get bored of looking at the data though... I prefer to just go fly.
philipa_240sx is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
hillbillynamedpossum
Scratch and Kit Built Aircraft
107
08-26-2013 11:23 PM
Tom Frank
Field Equipment For Sale & WTB
3
11-28-2011 09:48 PM
Propjobbill
Scratch and Kit Built Aircraft
19
05-11-2011 04:08 AM
dumo01
Scratch and Kit Built Aircraft
36
04-03-2011 10:52 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Quick Reply: USB-capable data logger build


Contact Us Archive Advertising Cookie Policy Privacy Statement Terms of Service

Copyright 2018 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.

Page generated in 0.10104 seconds with 12 queries