3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Watts-your-consumption? - Wireless Power Meter

Step 6Watt does it all mean?

Watt does it all mean?
Having created a device that wirelessly broadcasts data from the meter, its necessary to read the data and provide a means of logging and visualizing the results. For this I decided to write a logging application.

As I wanted to get this instructable in to be considered for the Epilog challenge I kept the computer end of the device as simple as possible, I plugged an XBee into the XBee USB explorer and simply read the results via the serial connection.

Note: in the future I plan to use a second microcontroller and serve up the results via ethernet. Therefore providing a means to have the data logged and making it available on a network, without having to have the computer turned on all the time. Then a device (such as an iPhone) could query my power meter device and visualise results as they are recieved.

There are a multitude of ways in which the computer logging application could be implemented, as logging simply requires access to and reading from the virtual serial port created by the FTDI device drivers.

I feel comfortable coding in Java, Python and to a certain extent Processing, but seeing as I am trying to reacquaint my brain with its 10 year old knowledge of Objective-C, I decided to implement the logger as a Mac OS X native cocoa application. After some hunting around I came across the AMSerialPort code from harmless.de. This code provides a native means of connecting to the serial ports and the bundled example application helps get things up and running very quickly.

Note: there aren't too many examples of direct interfacing of Mac OS X and serial devices and therefore this instructable may be of use to people who want to become more familiar with how to do it.

As can be seen from the screenshots, the PowerMon application provides a simple means of connecting to the (obscurely) named FTDI serial port (trust me, when you have two or three FTDI devices connected things get very confusing) and logging the results of the power meter data in a text view. Behind the scenes the application is also writing the contents of the logged data into a CSV (comma separated variable) file.

Again for the sake of expediency, I decided that I would use the CSV data logging approach as a quick way of being able to import data into tools like Numbers and Excel.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
1
Author:mcloke74
A frustrated geek who has a day job that doesn't allow for a great deal of tinkering