Wired Living

Saturday, 14 April 2007

USBMicro - XPL Application (Input)

After a visit to the local Electronics store to pick up some bits and pieces (been a very long while since I've touched a soldering iron!) I setup a basic circuit to wire a switch & a PIR (a cheapo eBay purchase too!) to the USBMicro board.


I used XPL VB6 Framework demo app - and mashed it with the demo USBMicro input app - and before I knew it - I had it broadcasting status changes over my network!

The current app works by polling the device every 500ms and if any changes are detected, sends the status for all ports on the device.

Other functions to add:
  • Add code to only send status updates on the changed input - to reduce noise.
  • Stick in some checks (like to make sure the USBMicro device is attached first would be useful! :) - and perhaps re-check periodically
  • Allow the ability to set friendly names of each port in XPLHal (instead of device0>device16).
  • Respond to status requests (so XPLHal can get initial status on startup)

Since this USBMicro also supports reading of 1-wire sensors, I may have a crack at wiring one up to this too - so I don't need to use the temperature sensor kit and obviously build the functionality into the XPL app as well.

May also find some other useful applications for this. I'm open to any suggestions on ways of utilising this device too - so drop me a comment on here if you come up with any.

USBMicro's Capabilities:

  • 16 Digital inputs (ie. this project)
  • 16 Digital Outputs (could use to control relays)
  • Interface to SPI Devices
  • Interface LCD Controllers
  • Stepper Motor Control
  • 1 Wire Sensors (temprature)

Anyway, all I can say is I really enjoyed getting this up and running! Was a good mashup of electronics & coding - which I haven't done either of for quite a while. It has gotten me thinking about other devices I have around that I can integrate into my XPL network. Perhaps something with bluetooth....

Labels: , ,

Tuesday, 10 April 2007

USBMicro - Digital I/O Device - Arrived

Got the USBMicro unit last week - and looks like it will be pretty easy to write up a little xpl app to read the inputs. (Comes with a DLL and loads of sample code).

Have already started working on it - just getting my head around it all as I haven't built any xpl apps before - but do have some VB6 experience (albiet quite a while ago) but have found loads of samples I can use as a base (nice work Ian Lowe) I'll just be building it to support the digital input side of things - as I'm going to use it to read in PIR/switches into XPLHal for my own HA project - but will share the code once I have it working - so that it could be improved upon to control external devices/relays etc.

The device looks damn useful - as it can also be used for 16 digital inputs or outputs, read 1 wire devices / stepper motors / spi / control LCDs / Relays and a bunch of other potentially useful stuff - so definately worth a looking into if you're looking for cheap but powerful way to get something connected.

Was under $50 australian (US$40) including worldwide shipping Got mine from here

Labels: ,

Sunday, 25 March 2007

USBMicro: Cheap I/O Interface


Was after a cheap way of getting some PIR & Door Switches hooked up to my system

Stumbled across one of these USBMicro which looks like a fairly simple & affordable way of getting 16 digital i/o ports connected

I've just ordered one so will have a crack at writing an XPL Application to get it on my XPL network..
Should be a good learning exercise at the very least

Will keep you guys posted.

Labels: ,