Articles Hierarchy

Articles Home » Arduino Projects » ARDUINO PROJECT: WIFLY for EMON


instead of using the WIFI arduino ( WiFi DiamondBack 1.0 -- Asynclab BlackWidow! )
what is not supported any more, we want test a ( also already old ) WIFI shield from SEEED

First test with the lib and after info from forum where stopped.

But with more libraries and examples how to write to a webpage ( to store a record to a server )
looked promising, so we start again.
the library was WiFlyserial Copyright GPL 2.1 Tom Waldock 2011, 2012
#include WiFlySerial.h
what was only running under Arduino 1.0.0 and used add.
#include Time.h
#include Streaming.h
#include PString.h

but we got the GET example running ( to store some string to a webserver )
( and tested it with a record every 5 sec. to a mySQL database )
and then changed the code of the example and the library until it runs under Arduino 1.0.3 also and not use any external lib. anymore.

parallel to this coding we build up a new website, because we want our own system
for EMON, storing measurement data from several projects,
with measuring up to 5 AC lines with our own EMON shield.
( Line, Watt, VA, Volt, Amp, Powerfactor, Hz, kWh )
( check project POWER METER TOOLBOX )
also pls check PHP-Fusion CMS, my Table_tool,
plus a modification for user management, so each user can only see his own project - data,
will be available in the next release of that tool.

now we are ready to combine the modified WIFLY _GET_ example with the
POWER METER TOOLBOX, but only small hope we can do it in a UNO.
i could upload one emon line after disable all tools,
but got a continuous auto reboot.
the wifly internal memorycheck says 25byte free,
but i not trust because get same info on arduino MEGA.

so how to do it on arduino MEGA?
there the software serial need to use for RX D10. the jumper field from SEEED use only 0 ..7
try this
( i did this already when i used the GPRS modem ( also from SEEED )
on the MAX 32 board )

the communication with the wifly modem worked on first try,
the POWER METER TOOLBOX code got some more compiler switches
and some more WIFLYxxxxxx tabs ( files )
and prints:
- a dummy record to web database at boot ( states line 0 )
- on timer ( 6h ) all enabled (1 .. 5 ) lines
- on alarm ( tunable high and low settings for volt and current for each line )
( there is no optional msg possible, like i could do with the SMS -alarm- -data- -boot- )

a menu entry allows to ( temporary until next boot ) make the timing faster for test,
by a multiplicator 1 .. 30000, related to the millis divider for an hour of 3600000.
so instead of 6h records get 1.5 minutes records

In this version i not use eeprom setup because last project showed its 5 time the work and
at the end you anyhow are required to code the same values ( on 3 places of the code ),
just for worst case if you need to exchange the cpu and loose eeprom settings.

But as we are forced to use MEGA for this we try to make the best out of it.
Now the Line / chart tool is enabled and its nice to have a mini osci online, just by type [L]

here no EMON shield attached, see just floating Ains.
the menu and data output to terminal is only for diagnosis / installation,
by saving the measurements/log to a .CSV ascii file it can be used further in a spreadsheet.

As the WIFLY shield works
i also run now the WIFI Arduino as client ( to store records to web DB )
and we test the arduino ethernet shield, but unitl now we not get it running,
the arduino ethernet lib. seems to handle the GET_ differently.