• 1
    Gather and Assemble the Hardware Components

    Before you use this smart outlet, we suggest that you fabricate some sort of housing for the relay and client. You do not want to short out the high current coming from your walls as doing so could easily start a fire. We 3D printed a housing for ours and you can find the .stl file in the file section.

    Gather all parts listed above in the parts list and assemble them according to the following schematic:

    From the Relay, connect the signal pin to GP0, the vcc or + pin to 5V, and the GND or - pin to the GND ports on the builder base.

    To connect the extension cord to the relay, remove the outer sheath to expose the Black, Green, and White wires like so:

    Next, cut the black wire, and strip the two ends. We chose to add terminal ends to the wire to avoid any possible short circuits, and we suggest that you do the same.

    Now, connect the two ends of the black wire to the NO and Common terminals on the relay.

  • 2
    Build the Application

    To build the application you will need to navigate to your application page and select the “+ Create New” button.

    Now, name your application and press the “Create” button. We named ours Outlet.

    You should now be on the app builder canvas. Using the search bar in the upper left hand corner of the canvas, find the Digital Out hardware object and drag it onto the canvas.

    Select the Digital Out object, and navigate over to the properties panel on the right side of the screen. Change the name of the object from “Untitled” to “Outlet”, and then click the “Save Properties” button below.

    Again, using the search bar find the “Switch” interface object and drag it onto the screen.

    Now, select the Switch object, navigate to the properties panel, rename the object to switch, and save the properties.

    Next, connect the State output port from the Switch object to the State input port on the Outlet Object.

    Lastly, save your application!

  • 3
    Build the Firmware

    Navigate to the Firmware Builder and select the “+ Create New” button on the upper left hand side of the screen.

    Name your firmware “Outlet” and hit create.

    Now, select the “+ Add Hardware” button, add a Digital Out device to the firmware. Name the device “Outlet”, and hit the “Add Hardware” button.

    Select the “Outlet” device in your firmware to expand the configuration options.

    For the driver select GPIO and configure it as shown.

    Now, save your firmware file and upload it to your client!

    Be sure to select the client that the relay circuit is attached to!