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.htmlThe 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!