Microcontrollers > Microcontrollers/General

Arduino Based Datalogger

(1/2) > >>

SparWeb:
My personal "Rock of Sysiphus".  I've built two dataloggers before, but neither worked very well.
There wasn't anything particularly wrong with the other datalogger recipe projects, they just weren't suitable for my equipment.
The first was the Backshed PIClog, however the tachometer data was useless coming from my motor-conversion projects and the current measurement was far too crude.
My second was an attempt to add many features to a 28-pin PICAxe chip, but I got drowned in all the little details of building the board for the thing, which comes as a single microchip and needs all the power supply, clock, memory, interfacing, and pin impedance protection details taken care of before every thinking of hooking up an analog input!  Furthermore I still didn't have a good tachometer strategy so I would have ended up with more dud RPM data.

I finally hit on the tachometer solution which I documented here:
http://www.fieldlines.com/index.php/topic,149270.0.html
The key was realizing that no matter what warped and scrambled waveform comes out of my motor conversions, it comes to one phase, then the second, then the third, and then repeats - so instead of trying to measure peaks or times, all I really needed to do was cycle through series of triggers, one phase at a time, until it came back to the first.
Here's an example of the messy waveform I'm dealing with:



Yes this project was also an opportunity to invest in a classic Tek 422 oscilloscope.  Nothing newer than 1960's technology for me!



I got that tachometer working nicely back in July, and spend the next month figuring out if I wanted to make it a real data logger and pack more stuff into the box...  Yes I do!

Here are photos from July, after I "packaged" the tachometer with a pretty LCD display and everything.







I am finally able to see my way through a whole datalogger project that could actually monitor my complete system.  So far I've got 4 channels of current measurement, 4 channels of "misc" analog inputs, and a LCD display.  The analogs are all scaled 6:1 right now so that I can measure up to 30V anywhere in the system (eg. battery, solar, wind).  The Arduino runs at 5V so these analog inputs have a 5k+1k voltage divider to scale them.  At least one more (unscaled) analog input is needed so that I can measure temperature, allowing me to calibrate the current measurement somewhat.  The current sensors are boxed up separately so I'll show them later in a separate post. 

Since I'm using an Arduino MEGA 256, the board has lots of spare digital pins that I haven't used yet, but only a dozen or so analog inputs.  I have space set aside for 2 more analog inputs but there are still some more - for anything I've forgotten!  I'm running out of space anyway on the expansion board that's stacked on top.  It's getting a lot more crowded than it was in July when I took that last photo. 

I started this post before realizing that I haven't unloaded the most recent photos from my phone, which shows the current look of the datalogger.  Updates coming shortly then!

SparWeb:
Here's the schematic I'm working on:




Part 2 of the schematic:

SparWeb:
Quick update:
Lots of pieces have been added since the last posting.
I installed the kit in my system 2 weeks ago, and I'm pleased to see BELIEVABLE RPM numbers now!
I also hooked up the current sensing box, but now I have decided that running the current carrying wires to that box I should be running the sensors to the current-carrying wires.
This will force me to re-built the box a bit.  While the circuit board itself is fine, I need to run data connections out where there used to be a big-a$$ terminal block.

I have also added a bank of 6:1 scaled voltage dividers to I can connect any pin to any voltage up to 30V safely and get a proper voltage reading on the LCD.  I have only calibrated 1 channel (battery voltage) so far but the process for the rest will be just the same as for the first.

Below: the current sensor box with the sensors inside.  I'm not sticking with this arrangement but for the sake of displaying where I am right now...


Below: layout of equipment on the wall as it was last weekend.  At the very top: 12V fusebox.  Next row, from left to right:  Wind Charge controller (Morningstar TS60) - Datalogger - Solar charge controller (Xantrex C40) - current sensor box.  Photo was taken before much of the data stuff was hooked up, so the datalogger LCD still reads 0-0-0 for most things.  The wind AC comes in through the blue CAT-5 cable so that works at least.

SparWeb:
Another test run, this time with RPM, voltage, current, and timestamps all coming in simultaneously.



The output graphs look like this:



Very happy!
This is just 10 minutes of data, and there is a long way to go yet, but so nice to see believable numbers coming out of the system.

SparWeb:
Here's the schematic, in 2 parts:






Navigation

[0] Message Index

[#] Next page

Go to full version