element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs RaspiSwitch (8-channel IP Switch with integrated NAS)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 25 Jan 2014 1:57 AM Date Created
  • Views 283 views
  • Likes 0 likes
  • Comments 0 comments
  • rpibeginner
Related
Recommended

RaspiSwitch (8-channel IP Switch with integrated NAS)

Former Member
Former Member
25 Jan 2014

So it was delievered, my first Raspberry Pi, and I thought about what to do with it.

 

I've got a MediaCenter already, installing the xbmc distribution on the SD Card seems just too easy.

 

Then I saw my 20 year old "PowerManager" under my screen. It's a slim metal chassis with with a couple of AC outlets in the back and a couple of switches in the front to control them.

 

Looks like this

powermanager_1.jpg

 

And I thought I should bring this (or the adaption of the idea) into 2k14.

 

The idea of an 8-channel IP Switch was born.

 

After doing some research what the GPIO's are able to, I decided to design a driver-board to switch some 5V relays, so I wouldn't need another power supply.

 

It's a prototype, so I used breadboards, everything could be on a single board sized 160x100mm if designed properly, but I like the special charm of the breadboards, and everybody should be able to copy it.

 

So I got following components

 

  1. 230Vac primary/5V secondary power supply, able to provide 6.000mA of current (not needed in this case, a normal 1.500mA to 2.000mA should do the job)
  2. the Raspberry Pi in a case, with connected USB Flash drive for providing the NAS functionality
  3. the driver board based on a ULN2803A darlington array with 5V Supply and 2 Connectors for the shutdown/restart switch under the ribbon cable
  4. the relay board
  5. a LED interface board with resistors and connectors for the status indicator LEDs in the Front Panel.

 

image

 

after the hardware worked fine, I've built it into a 19" 3HE Case.

 

The AC supply cable, a RJ45 feedthrough connector for the network and the 8 switched AC outlets in the back.

 

image

 

8 Status indicator LEDs, an USB feedthrough connector and the shutdown/restart switch in the front

 

image

 

And all the electronics on the inside.

image

 

It became quite full inside.

 

A wiring diagram is attached, if somebody wants to build it.

 

The relay contacts can also be used as potentialfree contacts to switch other things like garage door openers or electrical roller shutters, or, or, or... image

 

I installed Apache2, PHP5, MySQL ans WiringPi on the box.

 

I coded a database based login system with different user levels (SuperUsers and NormalUsers)

 

SuperUsers are able to acces the Admin Control Panel to set/change the switching permissions and passwords for NormalUsers, and are able to add new users.

 

image

After logging in with the right credentials, a NormalUser is able to switch the permitted outputs.

 

The user shown below is for instance is only allowed to switch output 1

image

 

A logged in SuperUser gains access to the AdminCP (link on the right top)

 

image

 

the AdminCP displays all the users from the database with their permissions and SuperUser Bits, and provides administration links for changing the permissions and password or delete the user.

image

 

This is how it looks when a SuperUser changes the permissions of a user.

image

 

This is, how it looks, when a user is added

image

 

This is how it looks when a user gets deleted.

image

 

The AdminCP allows to change switching permissions and password changes for all users, except the user named "SuperUser" to prevent locking himself out of the AdminCP.

 

The switching commands are done with php shell exec of the "gpio write" command from WiringPi.

 

Clicking on the green icon will set it red and switch the output.

 

 

I'm planning a user-interface for cronjobs, so the box can be used as timer clock.

 

But enough tinkering for some time... image

Attachments:
imageEPLAN_RasPiSwitch.pdf
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube