Micro Framework and Netduino Project Ideas

by Stephen Harrison 30. October 2010 07:50

I'd been intending to write this post for ages, then one night I got asked the question on Twitter concerning what I was planning to do with my Netduino and, well, it took quite a few 140 character replies to say the basics. 

So, here for your amusement is my list of idea's for Netduino based products. I'll add to this list and  tweak the ideas as time goes on and as I get other ideas. I've set up an IImplement.Net lab (well it's wiki) so that I can flesh out the idea's further and start putting designs together and include links to my source code on Github when I write some.

Please steal as many of these projects as you want as I really don't have time to do many of these and I'd much rather buy a shield than design one and have a one off made costing a heap of money, and if you do steal one of my ideas and take the product to market, remember I'm available for consultancy work :-D

In the interest of keeping this post short (the original version was 7 pages), all the project are just a summary, more details can be found in the lab pages linked to from each project.  Some of the ideas here are a follow on from my I have a dream post over on my other blog.

Home Automation:

LED Lighting:

A replacement for the Kitchen or Ceiling halogen lamp set-up, controlled via the network, powered by POE over the network cable or an external power supply for higher power lamps.

Lab: http://lab.iimplement.net/Power-LED.ashx

Light Switch:

The traditional light switch works well but it's functionality is seriously limited and with increased usage of different lamps and more lighting places in room as well as home automation it's days are numbered for anything other than the basics.

Another issue affecting the traditional light switch is it's connection to the mains supply and the ability of the home owner to legally work on mains equipment to be able to change the light switch, or add additional light switches for other lighting. 

Typically most switches have a live and return wire, this is usable to get power where a normal lamp is installed for intelligent switches such as the currently available home automation light switches, but now that we are all changing to low power lamps the existing range of home automation light switches will struggle to be powered and switch the load correctly, and may try to dim lamps that it shouldn't.

Swap the mains switch cable for a cat5 cable and you've got a versatile switch, one that the home owner can easily swap out by unplugging the RJ45 connector and plugging it into the new switch.

The other issue with the existing light switch is that it doesn't do much. On and Off, that's it. You can get dimmers but they won't work with the new lights and if you need to control more than one light, the switches multiply as does the wiring, making it ugly.

So here's the idea. A light switch replacement, powered by POE over a cat 5 network cable that naturally also provides all the networking connectivity.  Lights are controlled using the previous high power LED lighting project (or a version of for simple switching), or other already available home automation devices.

The light switches should be able to work standalone but also communicate with a central server for more advanced functionality (i.e. controlling lights in other rooms, pre-defined lighting plans, etc.)

The switch has at it's centre a touch screen LCD screen.  This provides one touch on/off control of the light to replicate the simplicity of the existing light switch so that my nan can still work it, but  with the correct “key” combination can bring up more screens to allow for better control of lighting, or other home automation control.

Being powered by POE which provides a simple and central place for backup power supplies the light switch could also provide basic low level lighting to the room in the event of a power failure.

Lab: http://lab.iimplement.net/Light-Switch.ashx

Home Easy RF Interface:


The home easy range of products is really nice, but sadly lacking a PC based interface and macros.

Hook up a 433.92MHz receiver and transmitter, either USB or Ethernet connected (again, awesome to have it POE) and give it some macro's to execute when certain situations happen, as well as being able to control it from the PC.

Lab: http://lab.iimplement.net/Home-Easy-RF-Interface.ashx

Power Minder:

The original idea of for this is a small device sitting inside the home owners firewall / ADSL/ Cable router that provided a basic web page and service to the internet and with appropriate instructions sent a Wake-On-Lan signal to computers and also provided a way to communicate through installed software on the PC to start a shutdown/hibernate sequence at the appropriate time.

A use case for this would be if you were out of town and wanted to get access to your computer through something like GoToMyPC but your computer was powered down because you didn't want to leave it running eating electricity just in case you might need it.  A quick click on a button on the power minder devices web interface and that instructs the PC to switch on.

Lab: http://lab.iimplement.net/Power-Minder.ashx

General:

Food Buddy:

4th Screen style implementation for the kitchen to help with managing grocery shopping, meal planning and food wastage, hooked up to the owners ThreeTomatoes account.

Lab: http://lab.iimplement.net/Food-Buddy.ashx

PC Fan controller:

Basic design to monitor system temperatures in the computer and provide better fan control as well as feedback to the desktop of heat and fan status'

Lab: http://lab.iimplement.net/PC-Fan-Controller.ashx

AirTunes (AirPlay) clone:

I'd been thinking about getting a Arduino hooked up to the hifi and in the kitchen so that I could stream music across the network to various audio devices.  It turns out Apple had the same idea some time ago and have the AirTunes/AirPlay package, sadly limited to being through iTunes which I really don't like, but most of my thoughts of how it should work have been implemented. 

However for fun, it still might be good to get something going, maybe even cheaper than the Apple hardware, hooked up to some cat5 cable and again getting power from the POE switch as well.

Lab: http://lab.iimplement.net/AirTunes-clone.ashx

See also: AirFoil

Growl indicator:

Drive the outputs from Growl, such as the snowman build indicator

Lab: http://lab.iimplement.net/Growl-indicator.ashx

Science Instruments:

My background is in chemistry and I've always loved instrumentation, I have a masters degree in Instrumental Analytical Chemistry, so I've got a few ideas that I'd like to see the Netduino put to good use for.  These might even make great school projects...

Temperature Logger:

A simple project.  Measure temperate, connected to a network connection, using POE to power the netduino, send the data back to the cloud.

Lab: http://lab.iimplement.net/Temperature-Logger.ashx

pH Meter:

Use the Netdunino to measure pH.

Lab: http://lab.iimplement.net/pH-Meter.ashx

Power Over Ethernet (POE).


You've probably noticed many of my ideas are intending to take advantage of POE, sadly the Netdunio and Netduino plus aren't going to support that at the first release (fingers crossed for an Netduino++). 

Lab: http://lab.iimplement.net/POE-Notes.ashx

Required Flashing LED project – PowerLED Project Introduction.

by Stephen Harrison 7. October 2010 03:37

When your starting off with a new embedded system, particularly the Arduino and Netduino the usual thing to do is make the LED flash, when you see the light you know you've gone from source code on the PC to a running micro controller.

Naturally I did exactly that, but I wanted to take it a little further, so the PowerLED project was born.

The idea of the PowerLED project is a home automation unit, controlled over a wired ethernet connection, hopefully drawing power from a POE switch via the same ethernet cable and powering a number (3+) of high power (1+ Watt) LEDs.

Hardware:

So, a simple start, get an LED to light up.  Then extend that to power a serious LED.

I tried two variations for driving the LED.  The initial design was to use a power MOSFET switched from an IO line.  This didn't go as simply as I had hoped.  My choice of FET was dictated by what I had to hand and that was dictated by what Maplin had in stock many months ago when I thought of the project.

The FET I used was a IRF540A, that beast can switch something in the region of 28 Amps, whilst that would be useful for halogen lamp switching, it wasn't exactly what I needed for a LED drawing about 300mA.  The big problem with the device was that the 3v3 voltage drive from the micro controller was not enough to get the FET fully conducting, so I needed to drive a simple NPN transistor from the micro which then connected the gate of the FET to ground (it was held high with a 10k resistor).


After getting the FET solution working I decided to try another way, a ULN2803A octal driver, this is a chip that will switch up to 500mA per channel (and you can parallel up the channels), it was very simple to use, connect the ground pin to ground, the common pin to the drive voltage for the LED (not really needed but should the LED be replaced with a relay then this will prevent any reverse EMF from destroying the chip), then connect the input to one of the micro GPIO pins and the output to the ground of the LED.  Nice and simple.

For good measure I also paralleled up a low power LED on the gate output so I didn't have to use the high power LED.


I also wanted a way to measure the light levels in the room so the lights didn't need to be switched on if the room was already bright enough.  Fortunately I had to hand a TEMT6000 breakout board from Sparkfun to hand.  This gives out a voltage based on the light level.  To make this work that voltage just needs to be fed into one of the Analog In connections.


One Gotcha worth noting here is that on the Netduino the Analog Reference isn't connected, so you need to supply a reference voltage, otherwise all your analog reads will be 1023 (Analog max for a 10bit ADC). In this case the Aref pin is connected to the 3v3 connector, and the TEMT6000 is also powered from the 3v3.

So here are our first important lessons.

  • Use prototype block board for initial prototyping, not an expensive (£5-10) prototype shield that doesn't take well to having lots of change happing on it.
  • The Arm processor at the heart of the Micro Framework uses 3v3, not 5v like the Arduino. Now the chip is 5v tolerant, so you can stuff 5v down the GPIO line without killing it, however not all hardware works with 3v3 logic, in this case a simple FET, so that needs to be taken care of.
  • To use the Analog ports a Aref needs to be supplied.

Software:

This project is going to be more than just a simple LED driver so I wanted to make a good start to the code.  A critical part of this project is going to be the ethernet connection and the Netduino doesn't currently support that (the Netduino Plus should do and that's in Beta) I wanted to use my Meridian/P board, however that doesn't have an analog input for the light sensor, so I also want to use the Netduino and in the future move the project to the Netduino Plus.

The project references both the Netduino and Meridian/P SDK's and I have introduced hardware provider and controller base classes that are subclassed for the specific board implementation.  At startup some logic is used to tell which board the code is running on and select the appropriate controller.  This controller is then used to control the hardware, by using Liskov substitution principle and only calling the methods and properties on the abstract base controller we can switch the hardware without having to change any code or recompile.

I've set up a public repository on GitHub where the code will live.  Don't worry if you don't do git you should be able to use GitHub to download a zip of the latest code from the website.

Github Repository:

http://github.com/BookSwapSteve/PowerLED


git://github.com/BookSwapSteve/PowerLED.git – Readonly access

The software is over complicated for a simple flashing LED example, but it's a good start for encapsulating away various aspects of the hardware.

The controller class defined some outputs which LEDs will be connected to, some inputs for a switch and the light sensor and some code to handle configuration so the light levels for dark and light can be defined.

The main program defines a timer which on each tick reads the current light level and if it's too dard switches on the LED.  Fairly simple at this stage.

If your are use to app development one thing to watch out for is to not allow the Main() method to exit.  If it does thats it, program finished.  So here the Thread.Sleep(Timeout.Infinite) is used to keep the app running whilst events are used from the controller and timer to fire off some work.

Here's a couple of video's showing the unit working.  I set the timer to a fast interval, then by pointing the light at the sensor it toggles the LED on each tick of the timer.  This demonstrates one of the great advantages of the LED light, it can be switched really quickly (actually you can switch LEDs at MHz but I'll save why that's interesting for another blog post, but not the type of light used here as it has a constant current driver built in and that doesn't handle the switching all that well). 

I wouldn't dare to try and switch a halogen lamp as quickly as I was doing with the LED, and had I use a relay for switching it would have been making a terrible noise.

This first video shows the LED being switched on as I block the light to the sensor and then switching off again as the light level is restored:

The second video shows the rapid switching of the LED as the light is reflected off my hand onto the sensor switching off the LED:

Tags: , , ,

Meridian/P | Micro Framework | Netduino | PowerLED

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen