Share this project

Done

Share this project

Done
Eight on-board relays, 8 12-bit ADC channels,12-bit DAC output, 8 opto-isolated inputs, 4 open collector outputs, 6 GPIO's, stackable
Eight on-board relays, 8 12-bit ADC channels,12-bit DAC output, 8 opto-isolated inputs, 4 open collector outputs, 6 GPIO's, stackable
401 backers pledged $21,645 to help bring this project to life.
Last updated

About

Raspberry Pi Mega-IO Expansion Card project video thumbnail
Replay with sound
Play with
sound

Raspberry Pi Mega-IO Expansion Card

$21,645

401

What is a prototype?

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:

Proof of Concept

Explorations that test ideas and functionality.

Functional Prototype

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

Appearance Prototype

Looks like the final product, but is not functional.

Design Prototype

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

Production Prototype

Appearance, function, and manufacturing methods match the final product.

Project supporting material callout image

Prototype Gallery

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
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
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

 project video thumbnail
Replay with sound
Play with
sound

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
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
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
Opto-inputs Workflow

The card response is parsed and displayed by text nodes.

Opto-inputs Dashboard
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
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
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
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

  • Relay max current/voltage: 10A/25V  
  • PCB max current/voltage: 2.5A/24V

Risks and challenges

Assuming enough backers are interested, the risk of not completing this project is very limited. All the software is functional, and potential bugs will be easy to deal with. We have under development a boot-loader which will permit updating the firmware either to fix bugs, or to add new features.

We are, of course, counting on China to be able to supply low cost manufacturing. If this trend continues through our promised delivery date, we strongly believe we'll be able to fulfill all orders.

Learn about accountability on Kickstarter
Questions about this project? Check out the FAQ

Funding period

- (30 days)

Line icon alert icon Artboard Copy 8 arrow-down icon arrow-down arrow-left icon arrow-left arrow-point-left icon Fill 1 Copy 5 arrow-point-right icon Fill 1 arrow-right icon arrow-right arrow-up-right icon icon--arrow-up-right copy bar-chart icon Artboard Copy 6 bell icon Combined Shape Copy 5 book icon Artboard Copy 3 bookmark icon Fill 1 brand-assets icon Artboard Copy 13 cart icon Artboard Copy 4 chat icon chat check icon Fill 1 Copy 6 circle-back icon Fill 1 Copy 13 circle-forward icon Fill 1 Copy 16 circle-k icon circle-k circle-left icon circle-left circle-right icon circle-right clipboard icon Artboard Copy 12 clock icon Combined Shape close icon close closed-caption icon Fill 1 compass icon Combined Shape Copy 2 conversion icon conversion delta-down icon Fill 1 delta-left icon delta-right icon Fill 1 delta-up icon Fill 1 duplicate icon duplicate embed icon Combined Shape Copy 6 eye icon Combined Shape Copy 12 facebook-contained icon Facebook Contained facebook icon Facebook logo flag icon Fill 1 Copy 3 gear icon Fill 1 Copy 14 global-africa icon Fill 1 Copy 9 global-america icon Fill 1 Copy 10 global-asia icon Fill 1 Copy 17 graph-bar icon Combined Shape Copy 9 graph-line icon Combined Shape Copy 16 heart icon Fill 1 Copy 8 help icon human icon icon--human icon--activity-feed.kds icon icon--add-heading.kds icon icon--advanced-analytics.kds icon icon--alarm icon icon--alarm icon--alert icon icon--alert icon--alt-text.kds icon icon--arrow-down.kds icon icon--arrow-down icon icon--arrow-down icon--arrow-left-2 icon icon--arrow-left.kds icon icon--arrow-left icon icon--arrow-left icon--arrow-right.kds icon icon--arrow-right icon icon--arrow-right icon--arrow-up-right icon icon--arrow-up-right icon--arrow-up.kds icon icon--arrow-up icon icon--arrow-up icon--backer-badge icon icon--backer-badge icon--bar-graph.kds icon icon--bell.kds icon icon--bell icon icon--bell icon--bold.kds icon icon--bolt.kds icon icon--bolt icon icon--bolt icon--bookmark-filled.kds icon icon--bookmark-outline icon icon--bookmark-outline icon--bookmark.kds icon icon--bookmark icon icon--bookmark icon--bulleted-list.kds icon icon--calculator icon icon--calculator icon--calendar-check icon icon--calendar-check icon--calendar.kds icon icon--calendar.sm.kds icon icon--calendar icon icon--calendar icon--campaign-outline icon icon--campaign-outline icon--caption.kds icon icon--captions.kds icon icon--cart.kds icon icon--category.kds icon icon--category.sm.kds icon icon--chat.kds icon icon--check.kds icon icon--check.sm.kds icon icon--check icon icon--check icon--chevron-down.kds icon icon--chevron-down.sm.kds icon icon--chevron-down icon icon--chevron-down icon--chevron-left.kds icon icon--chevron-left.sm.kds icon icon--chevron-left icon icon--chevron-left icon--chevron-right.kds icon icon--chevron-right.sm.kds icon icon--chevron-right icon icon--chevron-right icon--chevron-up.kds icon icon--chevron-up.sm.kds icon icon--chevron-up icon icon--chevron-up icon--circle-around.kds icon icon--circle-around icon icon--circle-around icon--circle-back icon icon--circle-back icon--circle-backward.kds icon icon--circle-check icon icon--circle-empty icon icon--circle-forward.kds icon icon--circle-forward icon icon--circle-forward icon--circle-loader icon Page 1 icon--circle.kds icon icon--circle icon icon--clipboard icon icon--clipboard icon--clock.kds icon icon--clock.sm.kds icon icon--clock icon icon--clock icon--close.kds icon icon--close.sm.kds icon icon--closed-caption icon icon--closed-caption icon--code icon icon--code icon--collapse.kds icon icon--collapse icon icon--collapse icon--commissions icon icon--commissions icon--compass icon icon--compass icon--confirmation icon icon--confirmation icon--conversion.kds icon icon--conversion icon icon-conversion icon--copy.kds icon icon--cpu icon icon--credit-card.kds icon icon--credit-card icon icon--cross icon icon--cross icon--curve-right icon icon--curve-right icon--date-and-time.kds icon icon--date-and-time.sm.kds icon icon--delta-down icon icon--delta-down icon--delta-left icon icon--delta-left icon--delta-right icon icon--delta-right icon--delta-up icon icon--delta-up icon--download.kds icon icon--download icon icon--download icon--drag.kds icon icon--edit.kds icon icon--ellipsis.kds icon icon--ellipsis icon icon--error.kds icon icon--error.sm.kds icon icon--expand.kds icon icon--expand icon icon--expand icon--external.kds icon icon--external.sm.kds icon icon--external icon icon--external icon--eye icon icon--eye icon--facebook icon icon--facebook icon--filter icon icon--filter icon--filters.kds icon icon--flag-outline icon icon--flag.kds icon icon--flag.sm.kds icon icon--flag icon icon--flag icon--forward-fund icon icon--frown-filled icon icon--frown icon icon--fulfillment.kds icon icon--gear icon icon--gear icon--globe-africa icon icon--globe-africa icon--globe-america icon icon--globe-america icon--globe-asia icon icon--globe-asia icon--globe.kds icon icon--graph-bar icon icon--graph-bar icon--graph-line icon icon--graph-line icon--hamburger.kds icon icon--hamburger icon icon--happy-filled icon icon--happy icon icon--header-anchor icon icon--heading.kds icon icon--heading icon icon--heart-filled.kds icon icon--heart-filled.sm.kds icon icon--heart-outline icon icon--heart outline icon--heart-thin-outline icon Fill 1 icon--heart.kds icon icon--heart.sm.kds icon icon--heart icon icon--heart icon--heartstrings-and-hardbacks icon icon--hide.kds icon icon--home-with-door icon icon--home.kds icon icon--home icon icon--home icon--human.kds icon icon--human.sm.kds icon icon--human icon icon--human icon--humans.kds icon icon--humans icon icon--humans icon--image.kds icon icon--image icon icon--image icon--inbox.kds icon icon--inbox icon icon--inbox icon--indeterminate icon icon--info.kds icon icon--info.sm.kds icon icon--info icon icon--info icon--instagram icon icon/instagram icon--intermediate.kds icon icon--intermediate.sm.kds icon icon--italic.kds icon icon--late-pledges.kds icon icon--late-pledges.sm.kds icon icon--lightbulb.kds icon icon--lightbulb icon icon--lightbulb icon--line-graph.kds icon icon--link.kds icon icon--link icon icon--link icon--location.kds icon icon--location.sm.kds icon icon--lock-black-bg icon lock-icon icon--lock icon icon--lock icon--locked.kds icon icon--locked.sm.kds icon icon--log-out.kds icon icon--long-story-short icon icon--mail icon icon--mail icon--make-100 icon icon--media-embed.kds icon icon--meh-filled icon icon--meh icon icon--menu icon icon--menu icon--message.kds icon icon--message icon icon--message icon--milestone-dfm icon icon--milestone-idea icon icon--milestone-preprod icon icon--milestone-prod icon icon--milestone-proof-of-concept icon icon--milestone-working-prototype icon icon--minus.kds icon icon--mobile.kds icon icon--mobile icon icon--mobile icon--mute.kds icon icon--numbered-list.kds icon icon--order-management.kds icon icon--overflow icon icon--overflow icon--pause.kds icon icon--pause icon icon--pause icon--pencil icon icon--pencil icon--pie-chart icon icon--pin.kds icon icon--pin icon icon--pin icon--pinterest icon icon--pinterest icon--play-filled.kds icon icon--play.kds icon icon--play icon icon--play icon--pledges.kds icon icon--plus-human.kds icon icon--plus-human icon icon--plus-human icon--plus.kds icon icon--plus icon icon--plus icon--prohibit icon icon--prohibit icon--prohibited.kds icon icon--project-budget icon icon--project-we-love icon icon--pull-quote icon icon--pull-quote icon--pullquote.kds icon icon--question-filled icon icon--question-filled icon--question.kds icon icon--question icon icon--question icon--reorder icon icon-reorder icon--reply.kds icon icon--reply icon icon--reply icon--reward.kds icon icon--reward.sm.kds icon icon--reward icon icon--save icon icon--save icon--saved icon icon--saved icon--search.kds icon icon--search icon icon--search icon--section-break icon icon--section-break icon--sentiment-neutral-filled.kds icon icon--sentiment-neutral.kds icon icon--sentiment-satisfied-filled.kds icon icon--sentiment-satisfied.kds icon icon--sentiment-unsatisfied-filled.kds icon icon--sentiment-unsatisfied.kds icon icon--settings.kds icon icon--shipping.kds icon icon--show.kds icon icon--small-k icon icon--sound-hi icon icon--sound-hi icon--sound-lo icon icon--sound-lo icon--sound-mute icon icon--sound-mute icon--spinner.kds icon icon--star-outline icon Star Outline icon--star.kds icon icon--star.sm.kds icon icon--star icon icon--star icon--stopwatch.kds icon icon--subtitles-captions icon icon--subtitles-captions icon--success.kds icon icon--success.sm.kds icon icon--survey-multiple-choice.kds icon icon--survey-open-text.kds icon icon--survey-single-choice.kds icon icon--survey.kds icon icon--tax-documents.kds icon icon--text-bold icon icon--text-bold icon--text-bullet icon icon--text-bullet icon--text-italic icon icon--text-italic icon--textalign-centered icon icon--textalign-centered icon--textalign-right icon icon--textalign-right icon--thumbs-down icon icon--thumbs-down icon--thumbs-up icon icon--thumbs-up icon--thumbsdown-outline icon icon--thumbsdown-outline icon--thumbsup-outline icon icon--thumbsup-outline icon--timeline-to-do.kds icon icon--trash.kds icon icon--trash icon icon--trash icon--tumblr icon icon--tumblr icon--twitter icon icon--twitter icon--unlink.kds icon icon--unlink icon Artboard icon--unlock icon icon--unlock icon--unlocked.kds icon icon--unlocked.sm.kds icon icon--update-freeform-round icon icon--update-freeform-round icon--update-freeform icon icon--update-freeform icon--update-pinned icon Artboard icon--update-qa-round icon icon--update-qa-round icon--update-qa icon icon--update-qa icon--upload.kds icon icon--upload icon icon--upload icon--video.kds icon icon--video icon icon--video icon--volume-down.kds icon icon--volume-up.kds icon icon--warning.kds icon icon--warning.sm.kds icon icon--warning icon icon--witchstarter icon icon--youtube icon icon--youtube icon--zine-quest icon icon-imagealign-center icon icon-imagealign-center icon-imagealign-left icon icon-imagealign-left icon-imagealign-right icon icon-imagealign-right info icon Combined Shape Copy instagram icon instagram copy kickstarter icon Artboard Copy 5 leaf icon leaf lightbulb icon icon--lightbulb link icon Combined Shape Copy 8 loading-spin icon lock icon Combined Shape Copy 4 mail icon Combined Shape map-pin icon Fill 1 menu icon Group message icon Fill 1 Copy 12 mobile icon Page 1 Copy 2 pause icon pause copy pencil icon Combined Shape Copy 3 pin icon Combined Shape Copy 11 pinterest icon pinterest play icon play copy plus-human icon icon--plus-human plus icon Fill 1 Copy 7 question icon Combined Shape Copy 14 search icon Fill 1 Copy 11 shapeshift icon share icon Fill 1 Copy slash icon solid-arrow icon solid-arrow sound-hi icon Combined Shape sound-lo icon Combined Shape sound-mute icon Combined Shape star icon Fill 1 Copy 2 stopwatch icon Group 2 thumbs-up icon Shape tools icon Shape trash icon Combined Shape tumblr icon tumblr copy twitter icon twitter copy user icon Artboard Copy 10 volume-up icon Artboard Copy 9 warning icon Combined Shape Copy 10 write icon Artboard Copy 11 x icon Fill 1 Copy 4 youtube icon Combined Shape