Step 6Watt does it all mean?
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 Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|













































