I want to make a power strip that has outlets controlled by relays (some solid state and some mechanical) and I need the relays to be addressed/controlled by the Arduino.
I have seen USB relay boards but they are very expensive.
The Arduino can switch most SSR's directly and can switch a small relay directly or a larger electro-mechanical relay with a small transistor.
How much power are you switching? Panasonic makes some 5V/20mA relays with 125V/10A contacts. These could be driven directly from the Arduino output pins. They are about $10 each.
johnwasser:
The Arduino can switch most SSR's directly and can switch a small relay directly or a larger electro-mechanical relay with a small transistor.
How much power are you switching? Panasonic makes some 5V/20mA relays with 125V/10A contacts. These could be driven directly from the Arduino output pins. They are about $10 each.
I want to switch 120v/2A via the TRIAC SSR's and 120v/8A via the electro-mechanical relays.
The thing is, I would like to be able to add up to ~200 outlets to the system and daisy chain relay boxes. I figured using a USB bus would allow easy addition/subtraction of relay boxes as well as allowing naming/status checking of the relays.
I've never tried to make a USB controller but I have the idea that each hub can only control 8 ports. Does the USB architecture scale up far enough to enable 200 ports to be controlled from a single USB host controller?
PeterH:
I've never tried to make a USB controller but I have the idea that each hub can only control 8 ports. Does the USB architecture scale up far enough to enable 200 ports to be controlled from a single USB host controller?
Up to 127 devices, including USB hubs, can be controlled by a single USB host controller. I don't need 200 AC outlets exactly, that was just a rough number.
At 10 usb ports per hub, and each AC control box having 8 AC power outlets, if each AC control box housed a USB hub and 8 AC outlets as USB devices, that would allow 12 AC control boxes on a single USB host controller which would be plenty.
AC control box = 1 x 10 port usb hub + 8 x usb AC power outlets + 2 downstream USB ports = 10 usb devices
127 usb devices per host controller / 10 usb devices per outlet control box = 12.7 AC control boxes on a single usb controller.
USB can go down to 5 tiers deep so the first AC control box off of the host controller is tier 1 and because each AC control box has 2 downstream usb ports open, they can connect up to 2 more AC control boxes being tier 2 in a daisy chain architecture until the max of 5 tiers is reached.
Each AC control box plugs directly into the building's main so the 10 port USB hubs can be powered USB hubs so the max limitation of unpowered hubs is not a problem.
The theory is great but the question is how do I get the the USB host controller on the Arduino and how do I get the AC relays to behave as USB devices?
The theory is great but the question is how do I get the the USB host controller on the Arduino and how do I get the AC relays to behave as USB devices?
Generally speaking, you probably won't. It sounds like you think you can somehow bit-bang a USB connection for simple on/off control like a parallel port, or you are trying to build something that is way complicated for what you need to do.
zoomkat:
Generally speaking, you probably won't. It sounds like you think you can somehow bit-bang a USB connection for simple on/off control like a parallel port, or you are trying to build something that is way complicated for what you need to do.
While I appreciate your trying to help, I am not overengineering for my purpose unless you know of another way to address over 100 relays on a single bus that is supported by the Arduino boards.
There are lots of USB relay boards that are being controlled by Arduino. Just youtube Arduino USB relays. The problem is that those USB relay boards are too expensive for my purpose.
I am looking for a less expensive way to add USB relays modularly.
There are lots of USB relay boards that are being controlled by Arduino. Just youtube Arduino USB relays.
Well, I put "Arduino USB relays" in the youtube search box and did not find any USB relays being controlled by an arduino. Didn't really expect to find any. :)
my question is, will the arduino UNO be able to drive all 8 channels high at the same time (so total 160ma) just by connecting the digital out pin without additional circuit? assuming my power supply has enough amps of course. is that fine with the atmega328 or is it too much to handle. the atmega328 spec says the digital out can drive 40ma, but I don't know if that means one pin at a time or it can drive all pins at 40ma simultaneously.
or is there a better way to turn on/off 8 outlets. I basically need an 8 outlet timer, that can turn on then off down to 1 second.