Friday, July 1, 2016

Controlling one 110 volts appliance safely with .NET (C#, VB.NET, F# or PowerShell)


Overview

Turning on and off an 110 volts appliance from a computer like a Raspberry PI/Python or a PC with an our device Nusbio.net using any .NET language, is not per say difficult.

You need one GPIO (General Purpose Input/Output) connected to what is called a Relay. A Relay looks like that.
The issue is that you must make the wiring yourself and this can be slightly dangerous. 

Solution

The company Digital-loggers introduced recently the IOTRelay. The IOTRealy takes care of every thing, it is safe, solid, easy to connect to and affordable $20.
  • On the side connect the cable to one of your outlet.
  • On the top you have 4 outlets
    • 2 are labelled normally ON, this is the one you will use to plug into your lamp,
      fan or toaster. Though we have 2 outlets, they are not independent.
    • 2 are labelled normally OFF, and turn the appliances when the IOTRelay is programmed to be off. I am not sure that this will be very useful.

 

Video

 

The wiring is simple:
  • Connect any of the 8 Nusbio's GPIO to the positive of the IOT Relay. 
  • Connect the negative of the IOT Relay to Nusbio's Ground.


Nusbio board + IOTRelay $36


Programming


From a software point of view all you have to do is turn the GPIO on or off to power your appliances.
Nusbio is compatible with C#, VB.NET, F# and PowerShell.

  nusbio[0].High(); // Turn appliance on
  nusbio[0].Low();  // Turn appliance off

1 comment:

  1. very interesting post.this is my first time visit here.i found so mmany interesting stuff in your blog especially its discussion..thanks for the post! FRIGIDAIRE Appliance Repair in Los Angeles

    ReplyDelete