I’m a bit of a data nerd and have been gathering metrics from my local machines for sometime now. The ability to see trends is really powerful when diagnosing problems and tuning performance.
I’m using the TIG stack – Telegraf (data collection), InfluxDB (time series database), and Grafana (visuals and alerting).
I wanted to utilize these same tools for monitoring energy usage in my house. I set out a goal to be able to see energy usage in near real time, per circuit, using mostly free software and hardware.
I ran across an excellent post on boredman’s blog that describes the hardware side of a system that very closely matches my goal. I immediately went out and acquired the pieces to play with this for myself. It wasn’t long before I had something working on my bench.
With a working proof of concept it was time to think about next steps. For me this was form factor, scaling. The Arduino Due supports 12 analog inputs. One will be consumed for Voltage measurements using an AC-AC transformer and the others will be for current measurements from current transformers on each circuit in my house. I have 22 circuits in my electrical panel — I will need two Arduinos or find better way to add analog inputs.
Input board 1.0
Fritzing is software for creating PCBs for newbies. Perfect. I was able to cobble together a board with CT (current transformer) and voltage inputs to a pin header thinking I could run a ribbon cable from the input board to Arduino. It wasn’t too hard to get going in Fritzing but I found it difficult to get something that looked nice and wasn’t even sure it would work. This board only has a burden resistor for each CT input.
I was worried that I would be getting a lot of interference since I’m dealing with AC signals and overall felt I could do better. I iterated, this time using Eagle PCB design software. I extended to scope to capture the remaining components for each input and make it be able to plug directly into an Arduino Due.
There simple wasn’t enough room on the Arduino for 11 x 3.5mm TRS (audio jacks) inputs so I had to design the board with some margins to accommodate the inputs.
Version 1.1 was born
I followed this tutorial on Sparkfun for Eagle basics. You start by building your schematic in Eagle. You can pull in libraries of parts from places like Sparkfun which is really convenient. You then connect parts together using nets. Nets are like a virtual wire. Any wire/pin/whatever on Net1 will be connected.
After you’ve connected all your parts to nets, you then can switch to the PCB view. The PCB view will be a mess of parts all over but the important thing is that you can see how they’re connected by a yellow line. This is the virtual wire of the net. Organize your parts and click that ratnest button often. Don’t get too attached to one layout. I wish I had spent more time on one part of the board before moving on to duplicate my layout to the rest (ended up going back and changing all the things multiple times).
Here’s the most important thing I’ve learned when building boards: Take advantage of your copper layers!
I’m sure this is obvious to anyone but a newbie, but each layer of a PCB contains a copper plane. Most simple boards are dual layer, that means you have two planes of copper to work with. You will almost always need to connect many components to ground and power. Use one layer as a ground plane and another as power. Now components that need a ground or power connection get it almost for free, no need to route long traces!
In Eagle you choose the layer you want to work on and draw a polygon then click the ratnest button to connect components to that layer of copper. Note that for top layer components to connect to the bottom copper layer, you will need to use a via.
I submitted the board to OSH Park for fabrication and ordered all the parts off mouser. Excited to test out the board. Next post I will talk about how assembling the board using SMD components go (I have three boards on the way, bound to screw up :)). Fingers crossed.
We are indeed horrible at updating the site. I pledge to fix this, but I’ve said that before.
Meetings will always happen. First Friday of the month. Click that calendar in your taskbar. Is it the first Friday of the month? Yes? Then we have a meeting at 7 and you should be there, even if you get there late, don’t worry. Today is not the first Friday? Then get hyped for the next meeting. Also: https://www.meetup.com/dc414group/
I was locked out of my account and had problems resetting it. The root problem was found to be related to salty meat that comes in a can. In other words: SPAM. As you can tell, I’m back in now.
Meetings do have rules, DC414 has rules. I’m not bothered to define them right now, but I want to establish that we’re not crazy anarchistic and if something bugs you about a meeting, let us know. We really only say something if it gets to be a problem. In summary, our rules derive from DEFCON, and are mostly “Don’t be a dick”
The Meeting Recaps are what I’ve seen, or what the other writers have seen. There is almost always some other cool thing that I didn’t see or write down. If I missed a cool thing that happened, just give me a writeup on it and I’ll get it out there.
We are really growing. Seriously, about 20 or more per meeting, lots of fun things. And we’re glad you showed up even if we didn’t get a chance to tell you that directly.
Okay, so on to a summary of cool things we did this past meeting. I’ll update with video and images when I can.
Lots of chatter
This meeting was a lot more social. Less demos, and more talking with each other. Seems to just be the December motif, and that’s fine if it is more social than demos. Lots of beer swapping, candy, and candy corn beer.
Nothing that a good probing can’t fix
There was discussion over tracking down a possible break in an ethernet cable at someone’s place of business. Another hacker was kind enough to bring in an amplifier probe, and demo’d how that would track down a break.
Messed around with a safe dial that was mounted on an orange acrylic stand. We didn’t know the combination, but we figured it out. And then set a new one.
And in a first for DC414, I will include the details of that combination:
We chose to do the square of 414. 414 x 414. Which is 171396. So the combination is 17-13-96. Congrats, you know the combination to a lock on an acrylic stand, that secures nothing. It is a really janky combination, and talk to one of us and we’ll go over why.
This lock will also probably be tuned and updated. We’ll practice safe dial manipulation later.
But can you pick it with a fork?
This will be the writeup on the lock that we picked with a plastic fork. Pictures and video support this, and will be put here in a fun writeup.
So, again, under construction, but I’m getting something out there as soon as I can.