20 posts, 5 voices
, Tagged: segmeter build testing arduino
|
Hi, So I’ve put together my SEGmeter PCB with the basic componets, as per the “”bookmark" href=“../../../samotage/posts/75-Build-your-SEGmeter”>Build your SEGmeter" blog post, with 3 sensor circuits. Connected a 13mm sensor and clamped around the 240v active of a 300w lamp supply (1.25A) Ran up a quick sketch to do a basic Analogread with a serial monitor output on an Arduino board. (Powered from USB port). My readings were 0 with no load, but only a small fluctuating reading of 0-3 (of 1023) with the 300w load on. (Only hiting 1-3 every 5 seconds) Am I on the right track? Having not seen a schematic or source code, I can only guess the analog inputs should be reading 0-1023, proportional to current flow. I tested with another 13mm sensor on all 3 inputs and got the same result. Haven’t tried a different load yet. Took a photo: http://flic.kr/p/8Hv9QY Do I need the 4.7k resistor on the PCB perhaps, or the 10k and 100k around the reset button? Thanks Darg
|
|
From what I can tell from the pic you have enough components to get things running (i have setup a basic segmeter without the xbee/temp sensor/relay/etc too). The source code you need to upload to your arduino is here: http://github.com/samotage/Aiko/blob/master/aiko_node/aiko_segmeter.pde. Download the entire Aiko branch (http://github.com/samotage/Aiko), and you will need a few extra libraries – OneWire, PString, and NewSoftSerial. Once you have it compiled the aiko_segmeter.pde sketch and uploaded it to the arduino, it should start sending out on the serial the power and energy readings.
|
|
Hey Kayno… thanks, got the aiko_segmeter.pde to compile and changed my DEFAULT_NODE_NAME , now getting:
with a ~300w load. (node dargs ? (p_1 2374.81)(e_1 15.79)(p_2 2561.22)(e_2 17.08)(p_3 0.00)(e_3 0.00)(p_4 0.00)(e_4 0.00)(p_5 0.00)(e_5 0.00)(p_6 0.00)(e_6 0.00)) with a ~2400w load.
Interesting that both sensors 1 & 2 are on the same circuit (one on Active, one on Neutral) and the readings are different.
Now to fire up the router and see how far I can get. I see the header on the 520GU labeled as: -,T,R,+ and I’m seeing 5V on that supply….. Should I use that supply for the Vin Arduino/SEGmeter ? Is as simple as a 4-way header cable between the two headers? Thanks darg
|
|
Next question already, username/password for the 520GU ? I can hit the router @ 192.168.110.1 and I get a login page OpenWrt Firmware
But it wont let me in with Root/admin etc.. |
|
@samotage might be able to help with the default credentials – i don’t have a segbox. with the sensors and readings, i too have noticed some variation. i tested a 13mm sensor and a 5mm sensor at the same time with a 150w halogen lamp, and it read: (p_1 162.14)(e_1 1.08)(p_2 176.48)(e_2 1.17) |
|
Thanks… paging samotage to the forum.. :) Looking into the Router – SEGmeter serial connection some more, haven’t measured the serial levels yet, but I think I read somewhere they’re 3.3v levels… Darg
|
|
Hey Simon, Nice work on getting your board put together, good stuff. :D Some notes: The current version is the v_12, though the aiko_segmeter.pde has a couple of issues for non 6channel SEGmeters, yours is a 3. There is a new version coming soon too, Read up the top, there are config instructions. There is a little variation on the readings, such is the way of things, they are pretty close with the calibration work in software (peeps are welcome to make this better too btw), but it’s really it’s important to get your sensor settings right on the sketch, the 13mm are coded SENSOR_SCT_013_060 and the 5mm as SENSOR_CSLT as this triggers the calibration routines! eg: channelSensors0 = SENSOR_SCT_013_060; SEGbox default details: I will put together a setup the wifi guide shortly. These creds also work for ssh into the box, I suggest you may like to change these? But please remember there is no way to easily recover if you loose them!
The SEGmeter can be powered directly from the header pins on the SEGbox. Make sure to get the polarity right, and to ensure the SEGbox Rx goes to the SEGmeter Tx
SEGbox Tx goes to the SEGmeter Rx The voltage I believe on your SEGbox is 5V (if there is the wire running away from the header to a power feed on the board) The SEGmeter, the 5mm sensors in particular need the 5V supply otherwise they become noisy :D Sam, now on the thread. |
|
And a link to the WiFi Setup details |
|
thanks to all your help I now have my system up and running! I’m impressed how easy it was once I had all the right bits’n’pieces.. I had been looking into building my own system years ago, but figured it would take too much time and learning to do it from scratch! Here’s another pic, this time built into the enclosure. (might need some vents, and it’s kinda just hanging in there, with some foam to seperate the boards… but for now works well) http://www.flickr.com/photos/dargs/5085858950/
Cheers
. |
|
Hey Simon, Nice work! One little tip, normally I use the UART header in the middle of the board, that has the power, and RX/TX all in one easy spot. Then it’s a matter of one ribbon cable across to the header on the OpenWRT SEGbox end. Though what you’ve done here will work just fine! Keep up the good work. Sam.
|
|
Ah of course, didn’t twig to the label “G T R 5” until now… too easy.. oh well next time! |
|
what brand/model of router is used for the openWRT SEGbox? |
|
Hey Kayne, At the moment, the Asus WL-520gU is my favorite, and the one we are using. It then gets some magic, and some hacks, and special softwares. I have my home on a venerable Linksys version, all it needs is 4MB flash, 16MB Ramz and an internal serial port and rock and roll. Some have USB2 and other fluff. I’ve also used D-Link DIR320’s however these can be problematic to flash. Our image works with the Asus ones, and there is also an alternate image for the D-Link variety available on request. Sam.
|
|
Hi managed to get an asus wl-520gu… on the blogs you mention “the Router will need to be wired up for 5V”, can you give some details about this ? pictures maybe ?
Thanks
|
|
Hey Hennie, It’s a very simple hack to take the 3.3V internal header of the 520 and make it output 5V. The three pins of the special header attach to the board. The 4th, which will supply the SEGmeter with 5V power has a little wire, which then attaches to the back of the power Jack, where 5V is available.
Sam. |
|
|
Hi All, I'm new to this forum!! I'm confused on how to build this project, I'm able to solder everything together, Electriciian by trade, but the below items have me confused?
So what items do I need to purchase to build my own Segmeter, I would like to include the Temperature, as I will connect to the solar panel. I own a wireless router already do I new to purchase the one mention in the shop or the "Zigbee gateway" I'm a little confused here as will, this is product it not explained to well? Anyway can someone please explain the above items in greater detail? Cheers Drew |
|
Hey Andrew, Great stuff on the bits you can do! The Aiko code is based on the Arduino open source micro-controller platform, find out more here at http://www.arduino.cc/ It's kinda straight forward if you have computer saavies as well, certainly a lot easier than the gateway build! If we know what you are going to build, we can send pre-programmed arduino's and zigbees to get you over this little hump. Also our Starter kit comes with pre-build OpenWRT SEGbox, ready to discover! Hope this helps! Sam. |
|
Hi Drew I found with series 1 xbees, that by default they would just talk to each other with their default programming. possibly the same for series 2 too. The default baud was 9600 from memory, so your sketches on the arduino and code on the segbox would need to be set to 9600. Programming the xbees is straight forward too. Grab something like one of these: http://cgi.ebay.com.au/Arduino-Shield-XBee-RF-module-Meg-a-nano-Zigbee-/270706959545?pt=LH_DefaultDomain_0&hash=item3f076464b9 and use your arduino to program the xbee. http://arduino.cc/en/Main/ArduinoXbeeShield has info on the programming commands, or you can use XCTU - an application that makes the AT commands easy: http://www.digi.com/support/kbase/kbaseresultdetl.jsp?kb=125
|
|
All our SEG stuff runs at 38400 and the 2.5 are a little finicky to work when purchased straight from spark fun. I use digi's xctu to reprogram new units, and an FTDI cable to adjust settings in a terminal window afterwards. The 1mw series 1 work just fine, but they struggle transmitting through a tissue... The 2mw 2.5 Zigbees have a usable range that gets through walls, though they do have their setup issues. Sam.
|
|
|
This guy's this all to much, I'm a little bit electronic savvy soldering it not a problem, Programming is my weak point have no clue at what I'm doing. I email Smart Energy they suggest the following from Sam: https://shop.smartenergygroups.com/store/show/starter_01 For the gateway/SEGbox end
and expansion for the SEGmeter to take Zigbee
But Sam from Smart Energy also mention the Freetronics Eleven very soon to go with this kit from here: http://www.freetronics.com/products/eleven
Do I still need to also purchase the Zigbee node or the Zigbee gateway as he only mention this connection part? What Zigbee do I purchase?
This is all to confusing as to what to do, not explained very well, as I don't want to purchase this and end up, I could purchase sometime from Sparkfun / Freetronics cheap and does more in the future?
What I want too do it monitor my electricity energy and solar together via the Smart Energy web site, and also temperature monitor my solar panels, that it?
All I need is a list at what I need to purchase? As I have 2 inputs to monitor?
our Cart<table class="list" cellspacing="0" border="0" cellpadding="0"> <tbody> <tr> <th> </th> <th class="first">Item</th> <th class="numeric">Price Each</th> <th class="numeric">Quantity</th> <th class="numeric">Total Price</th> </tr> <tr class="odd" id="cart_item_1298596283"> <td>Guy's I appreciate your time in helping me out!!
Cheers Drew
|