Tuesday, May 27, 2014

First Power Node - Prototype

Now that I have built and/or gathered most of the parts for a Power Node, I wired up a basic prototype version. Having it spread out makes it easy to make measurements but keeps all the parts stable to prevent accidents like what occurred with my first INA219 current module. I tested the new one out in this prototype and it is working fine. My other current sensor (INA169) is not fairing as well. I have had this module for a while and I had not got around to assembling it and testing it. It is just a analog device as compared to the INA219 that is I2C device. The measurements on the shunts all looked well with a DVM, but the module is just not providing a analog output. I have removed it and will attempt to re-heat the solder joints and will retest it. This is better picture of the actual wiring:

I have placed a standard Bosch relay in the prototype that allows the load to be disconnected under MCU control. The relay is driven by one channel of a L298N Motor control board. Basically this prototype provides monitoring of charge current to the battery from the charge controller and the total load current and battery voltage to the load. I am using the INA219 for the load monitor since it can measure both voltage and current so that I can track power used (watt-hours). I did not think those features were needed for the charge current monitor so that is why I just went with the INA169 device. However, I have been thinking that with another INA219 positioned in the line directly from the PV solar panel would provide useful data since I can measure the panel voltage too. Once I get all the current monitors working I can do all the charge and load tests I need to do to see how/if power transfers from other nodes will be practical.

Saturday, May 24, 2014

Grid Frequency Monitor LCD Test Ended

Well I ran the Grid Monitor for over 6 days and at the 5 day mark the highest frequency seen was 60.126 hz however today as I was capturing the images (6th day) I notice the high was now 66.783 hz (crap!). So again something happened.
I think the next step is to do a long term data capture with full logging so the events can be better examined. I plan to build up a more solid probe circuit now and do the capture on a Raspberry Pi. The interesting part was the accumulated offset reading. In the image it is reading 16.9 sec which was probably influenced by the glitch however I watched it over the 5 days and it went up and down in both the positive (fast) and negative (slow) direction and really never went over 30 sec in either direction. The conclusion then is that the grid for a time base is not that bad and seems to self correct over time so you will never be off more that +/- 30 sec.

Saturday, May 17, 2014

Grid Frequency Monitor - LCD version

Due to the issues I encountered with the 10 hour collection period of grid monitoring I decided I may need to do some filtering on the input of the Grid Frequency Monitor. I decided to try a .1 uF capacitor across the input of the switching transistor. I experimented with various capacitor values using Scopino to actually observe the wave shape. The selected value provided about a 3 ms rise time to the otherwise sharp leading edge of the square wave pulse.

I also did not want to have the computer connected for long term collection and wanted to rule out a serial transmission error so I modified the code to just drive a LCD with my Arduino. The LCD is a 16 character display. The left half always reads the current grid frequency and the right half alternates between the uptime in days, hours, minutes then the lowest frequency sampled followed by the highest.
I ran it over night for over 12 hours and I did not see the issue, however while setting up to take the pictures of the display I some how glitched it and it was reading over 100 hz! I think the prototype board can generate noise if bumped. If I can run it for several days with no issues I will solder up a more permanent probe board. The original code had accumulated offset in ms, sec, etc also which is interesting from the stability of the grid stand-point as the grid drives the old clock with a synchronous motors so I will add that back to the code to see that drift over time.

Wednesday, May 14, 2014

Solar Charge Controller Build

I had  time on Saturday to build my SCC3 Solar Charge Controller Kit. It went together very nicely and I highly recommend the kit. I performed the basic alignment to the battery type I plan to use (SLA - 13.8 volts) with a variable bench power supply.

I hope to have time to test it with my 65 watt solar panel soon. This module will also be part of my Distributed Power Node (DPN) project.

Sunday, May 4, 2014

Measure the Power Grid

I got interested in measuring the frequency stability of the power grid and thought that the Arduino would be a good platform. After a bit of searching I found at site in the Netherlands HERE that contained what I needed. The code was setup for a LCD but I just modified it for writes to the Serial device. That way I can collect the data in either the Arduino serial port monitor or use PuTTY in logging mode. I didn't have the exact parts for the measurement probe but thought the simple 2N3904 circuit below may work just as well.
 I did a few tests and I am getting good readings. I do plan to look at it on a scope just to verify it at some point and may try the opto-coupler circuit too. The frequency measurement do change rather frequently and I was thinking maybe my probe is not as good as the opto-coupler method, so I thought if I drive the pulses from the probe into two different Arduinos it will tell me if they are getting the same data. I would expect the data to be very similar but off by some constant since the clocks are not the same from one Arduino to another. Here are my results:
As you can see they have the same curve with just a slight offset as expected. This was encouraging, so I decided to do a longer collection period. The code is set to count 3600 pulses of the 60 hz grid frequency (60 seconds at 60 hz). So the sample rate is every one minute period.
This was on Saturday for about 10 hours. I did have an issue were a nine (9) minute period [Bad Data on the graph - I just copied the previous minute data 9 times] had erroneous readings of like 61, 65 and even 70 hz which just can not be possible. The grid is usually accurate to one half of one percent. The assumption is that when the grid dips below 60 hz it is under heavy load and when it is higher that 60 hz more capacity is being added on.

I plan to do some long term captures over days or weeks to see if trends are visible, particularly in the summer with hot days, etc.