Raspberry Pi Wifi enabled 4-way power box

It is the “W” just getting it for $5 cheaper! WOO HOO!!!

Yeah i dont even use arduino anymore well as of recent just cause of the available options out there, and considering what one typically would use them for.

Sonoff
thc15a
and mosfet cycle timers like the recent one i picked up all fit the bill

5 Likes

:open_mouth: where’s the sale? I want to pick up another.

2 Likes

I don’t know whether I should say… hehehehehehe

Okay, it’s Micro Center. If you buy one, it is $5. if you buy two, they are $15 each. I guess they don’t want everyone buying more than one. You can reserve one online, but you MUST pick it up in store.

3 Likes

FANTASTIC contribution! Thanks for taking the time to share this :thumbsup:

4 Likes

If you look at the bottom left corner of the relay picture, you’ll notice IN1…IN4 - remember which GPIO pins went to which IN1…4 terminals on the relay.

IN1…IN4 then corresponds to K1…K4 on the relay’s power terminals on the right side of the relay counting from top to bottom.

The best way to test is you can use Node Red, and map your GPIO as I displayed to your timer node, and if your power gang box is still open you can actually see LEDs on the relay board light up as you turn them “on” in node red. You could also just hook up a desk lamp to power if the box is closed up and it’ll of course flick on when you activate the node in Node Red.

2 Likes

You can totally use that shield - also pretty sweet but technically limits you to 4-way of course if you ever want to expand.

Ideally, and @lefthandseeds the hardware purist would say this also - you should solder in your header from the bottom of the Pi.

I actually linked “hammer in headers” in the post - you have to buy a plastic jig and that “hammer header” I linked - you put the Pi in the jig, and then lightly tap with a hammer on the top of the jig to push the hammer header into place. It will work without soldering, which is why I thought it might be a better option for the “general crowd” :smiley:

I don’t actually have a soldering station, because I just don’t do enough of it to justify, I make @lefthandseeds god mode soldering skills handle it! :laughing:

2 Likes

Awesome thread! Will be giving this a run soon

1 Like

I was really excited - until I started reading the instructions on how to install Raspbian OS, and nodered. Now my brain is fried and I need a new one…

2 Likes

Thanks for posting. Will enjoy building this some day, as my desire for automation is increasing with each new grow - and I love building stuff like this!

1 Like

It really isn’t that difficult. Helps if you are slightly baked. At least it does for me with Linux. At least you don’t have to “make” anything for these. I always follow the simple rule, which seems to work for me, “It’s easier to Make when you is BAKED!” :laughing:

1 Like

Just FYI, the Pi has 3.3V signal outputs. Don’t get the 5V relays, make sure you order the 3.3v relays.

If you wanted to get really inventive, you could custom write your own code, use an I2C serial bus and control up to 112 slave pi devices, each controlling a dozen relays…

If you did not want any interface you could write a program to operate the relays on a timer in about 10 lines of code.

It’s really simple, get an SD card, flash it in windows with a NOOBS (new out of box software) image, put it in the pi, power it on. If you get a 3B+ they are easier to work on for new users.

I can do it in my sleep these days, drop me a PM and I will walk you through it if you like. It would not be too much bother to install raspbian, install this software, then rip that image and put it in my dropbox for you.

5 Likes

Thanks for the heads up! For $5 I’ll give that a shot. I thought the rasberry was like $30

1 Like

The Pi 3B and 3B+ are $35 to $40. What we are looking at is the Pi Zero (limited, but still good piece of hardware) which runs around $10 to $15 (upward to $30 to $40 if you buy a “kit”).

Remember, make sure it is the Pi Zero W (“W” means WiFi on board).

If you have a Micro Center near by, it is a HELL of a deal. I don’t know whether it is a walk in price or only a reserve online price. The nice thing is, if you have to reserve online, they have it on their “18 Minute” policy, which means it will be available to Pick up in 18 minutes.

Even if you don’t want to use it for this, it is a fun little gadget to mess around with and the fact that it uses an actual OS makes it pretty versatile. There are a bunch of apps out there for it, but I would definitely learn a little Java or Python if you really want to get into it. Hell, an actual computer at the price of an Arduino… WOW!

Have been thinking for a while to pick up a 3B+ to mess around with a HTPC but never seem to get around to it.

4 Likes

I thought they were 5v which would allow you both 3.3v and 5v. Than is good to know. I don’t know why the seller said it would work with the zero. There has got to be a compatible hat out there for this. Any one knows, let us know.

I started doing some research and found that pins 2 and 4 are 5v output. As long as the hat uses these pins as 5v input, they should work.

AFAIK they are a constant 5v output to power something and are not logic outputs. They can be used as reference voltage outputs too.

Note, pins 2 and 4 of the pinout are not the same as the outputs 2 and 4, which are pins 3 and 7 of the pinout. Pin 1 is the 3.3v reference voltage output pin for example.

EDIT : It should not be a problem if the relays you have are for the pi. There are two types, the sort that works with a pi and the sort that don’t. Sounds like you have the right sort :wink:

I posted for the people who are reading the thread and might go on Ebay and get the first relays that look like the ones in the thread. They should make sure they are 3.3V relays or they won’t switch reliably.

The OP links to the 5v relay. Would be good to have a definitive answer on this.

Here is the schematic for the OPs listing (source: http://wiki.sunfounder.cc/index.php?title=4_Channel_5V_Relay_Module):

4_channel_relay_Schematic.pdf (17.1 KB)

Relay datasheet:

Relay_datasheet (1).pdf (91.7 KB)

VCC is the IO voltage level.
JD_VCC is the coil drive voltage

SRD-05VDC-8L-C from their photo indicates that a 5VDC coil is used.

If the PI output is open-drain, then you can utilize 5VDC for both. But, you must be certain that the output is true open drain. Also, the opto-isolators would be a bit pointless in that case. The size of the current limit resistors on input to the isolators is not defined but would assume the current is modest.

Otherwise, VCC is tied to the IO voltage level output from the microcontroller (whatever that is, 3V3 for instance). JD_VCC at the two pin jumper goes to the 5VDC (with the jumper removed).

Here is an example illustration from one of the PI variant that would not be open-drain (it’s push-pull):

Anything greater than rail voltage of 3V3 minus any drop from the diodes (which I don’t know off hand) for the example illustration will essentially short the 5V0 to 3V3 and probably break the PI.
The documentation for your PI variant will tell you if the specific GPIO pin is open-drain or push-pull.

3 Likes

The one that I found was specifically for the Pi and the seller stated that it was compatible with the Zero. Looking at the diagrams, the 3B/3B+ pinouts are the same as the Zero, am I wrong? so it should work for the Zero, if it works for the others.

As for 8K’s hook up, I haven’t analyzed it, just happy it is possible.