Appearance and function match the final product, but is made with different manufacturing methods.

Looks like the final product, but is not functional.

Demonstrates the functionality of the final product, but looks different.

A prototype is a preliminary model of something. Projects that offer physical products need to show backers documentation of a working prototype. This gallery features photos, videos, and other visual documentation that will give backers a sense of what’s been accomplished so far and what’s left to do. Though the development process can vary for each project, these are the stages we typically see:

These photos and videos provide a detailed look at this project’s development.

Home Automation 101

This project started with the challenge to integrate as many Home Automation functions as possible into a Raspberry Pi platform. The requirements were rather simple technically, but challenging due to the sheer number of I/O's required:

Eight relays for zone heating.

Eight relays for zone cooling.

Eight relays for irrigation.

Eight analog inputs for measuring zone temperatures

Eight analog inputs for measuring soil humidity

Eight digital inputs for presence detectors

Sixteen digital inputs for security sensors

An off the shelf solution was possible, but required too many components:

Off-the-shelf possible solution

The cost was not the main concern, but the implementation. The first prototype used to develop the software resembled a small jungle.

Raspberry Pi in the lower left corner, two USB IO cards from eBay, two 16 relay boards from eBay also. Needed to add ADC channels, but we ran out of space. So we built the Mega-IO card.

Stack of three Mega-IO cards

The small tower gives all the relays needed, and more than enough analog and digital channels. It also leaves the Raspberry Pi connector available for another card, if we ever need one.

Technically, the Mega-IO card is not a HAT, because it's form factor is too big - it occupies all the real estate on top of the Pi. In all other aspects is HAT-compliant, so we'll call it an X-HAT (eXpanded HAT).

We developed a command line utility which accesses all the IO functions, available for download HERE.

The easiest way to develop browser software for the Mega-IO card is using the Node Red, a drag and drop visual tool which runs on the Raspberry Pi and can be used for wiring the internet of Things. Click HERE to download a Raspbian operating system image which includes Node-Red and the following examples for accessing Mega-IO functions.

(Alternately, you can download and install Node-Red yourself following the instructions at https://nodered.org/docs/hardware/raspberrypi )

1. Setting the D/A output

You'll need an HTML5 capable browser to see this content. Play Replay with sound Play with

sound 00:00 00:00

2. Testing the A/D input

In order to show the Analog to Digital input function, we implemented a heating and cooling thermostat.

Node-red workflow for heating and cooling thermostat

The User Interface consists of a text input for setting the target temperature, an analog gauge for displaying the current temperature, a fan switch and an on off system switch.

Thermostat User Interface

A status box shows if the system is cooling, heating or on standby.

A thermistor connected to an analog input of the Mega-IO card is used to measure the ambient temperature. Relays are activated for controlling the fan and the heating and cooling functions.

Multiple thermostat can be implemented using a single Mega-IO card.

3. Reading optically isolated inputs

The workflow consists of an inject node which sends a periodical signal to a function node which in turn sends a command to the Mega-IO card.

Opto-inputs Workflow

The card response is parsed and displayed by text nodes.

Opto-inputs Dashboard

4. Testing the Relays

The Relay Test workflow consist of Button Nodes for turning on and off a relay, and Numeric Nodes for selecting the card stack and the relay number.

Function Nodes are used for storing variables received from the Numeric Nodes and for passing the command line parameters to the Execution node, which in turn is passing the command line to Raspberry Pi.

A debug node is checking for error messages.

Relay Test Workflow

The User Interface has buttons for turning the relays on and off, and select boxes for the stack and relay number.

Relay Test Dashboard

Source code download

D/A Output; A/D Input; Opto-Isolated Inputs; Relays;

We hope to build a community which develops and shares applications for the Mega I O card. Please join this community by supporting this project and letting your friends know about it.

Mega-IO Website

IO SPECIFICATIONS

MICROCONTROLLER: STM8L151C3T6

SIX GPIO pins :

Operating voltage: 3.3V

CPU frequency: 16 MHz

Touch sensing capability

Max. input voltage on any pin: 4V

Series protection resistor on IO pins: 51 Ohms

Output Low Level Voltage on I/O pins: Max. 0.45V

Output High Level Voltage on I/O pins: Min. 2.6V

FOUR OPEN COLLECTOR OUTPUTS:

Driver: ULN2003F12FN-7

Output Low Voltage: 0.6V

Max Pull Up Voltage: 20V

Max sink per channel: 100mA @ 3.3V Logic Input

140mA @ 5.0V Logic Input

ESD: 4kV HBM, 1kV CDM

EIGHT 12 bit ADC

Sample rate: Up to 1 Msps

Input low pass filter: 0.22µF/51 Ohms

OPTOISOLATORS: TLP293-4

LED current limit resistor: 1 Kohm

Input Forward Current: Typ. 5 mA, Max 50 mA

Input Reverse Voltage: 5V

Input Forward Voltage: 1.25V @ 10 mA

Isolation Resistance: Min 10 exp(12) Ohms

Isolation Voltage: Typ 10,000 V

RELAYS: SRD-05VDC-SL-C