Raspberry coop


That's the same relay board I have been using for the last 3 years in Coop Uno and for 6 months in Coop Deux.

Programming is simpler with a relay. Using a motor shield with a gear motor is a waste of time and effort as there is no need to go slower than 5 RPM.

I would start with the raspberry pi 3b+, relay board, 12vdc power supply, gear motor. Get that running with a manual switch then add the other items. Limit switches just depend on how you plan on mounting them, either one will work. Just keep in your mind that the magnetic switch needs to be fairly close to work and well so does the micro switch.

The Rpi does need a connection to the Internet to get the date and time when booting up if you plan on using the astral library to get sun events for your location.

You need a keyboard, mouse and monitor to setup the Rpi.

Break this down to the simplest thing and start there, adding on as you learn.

Do you have a PC running Linux?

Do you have a LAN?

JT
 
@Mouthpear @jthornton
I only mentioned the automotive relays because that is what I am familiar with...

Yes I got that from the comment. I just really like that Harness. LOL Makes it so much easier if automotive relays are going to be used.

Trying to put together buying list... help with thoughts suggestions please
1) raspberry pi 3B+

I like blueberry or cherry pi better. LOL. I'm barely learning to use Arduino. Never use RPi for anything. I did work with a friend on his and the programing but that's it.

2) DC 12V 5RPM Gear Motor ( Reduction Ratio: 1: 401,Rated Torque: 10Kg.cm, Rated Current: 0.16Amp) (I already bought this)

Good to go.

3) L298N? Relay block/board? Motor shield?
I'm thinking one motor for door,
(possible addons below)
1 motor (cooling fan/mister) temperature activated, 1 servo/water valve, 1 pump?1 motor (fan inside coop) temperature activated
5) LED light for inside coop, turns on at sunset...(light the way for the girls) turns off 30 minutes after door close


Let's DIG IN.
1. I'd say that programing relay boards are a tad bit more work than a motor shield.
2. Wiring is way easier.
3. Mounting, well they go right on the RPi
4. you don't have to program twice. As I showed before you just have to tell the motor to stop and go.

2. Wiring.
I took my secret door project and rewired it just now to show what you will be having to do with a relay board vs a Motor Shield.

Before with all the wiring.
20201014_043902.jpg 20201014_043924_HDR.jpg

After Should have taken at least one of just the motor shield but oh well.
20201014_052122.jpg


Leftovers
20201014_052302.jpg

So much better.

As for that relay board it's OK.

I prefer one of these Three. +1

I like this one due to it having the capability for EACH channel to be hi or low. Most other boards only let you chose hi or low for the entire board. Yellow jumpers
20201014_052645.jpg

I like this one because it has the capability to operate the relays without having to use external buttons for manual override. Drawback is the fact you can't chose hi/low for each channel just hi/low for the board.
20201014_052702.jpg

I wasn't going to show this one because it's for arduino but I'm sure they have them for RPi, It's a relay shield
20201014_052738_HDR.jpg 20201014_052817_HDR.jpg

And of coarse the big bad boy!I love these because they are easy to handle, can handle larger currents, the screw terminals can handle larger wire, the relays are replaceable, they are NPN or PNP(hi or low) and they can be mounted on DIN rail. As Shown.
20201014_053655.jpg 20201014_053700.jpg 20201014_053714.jpg

5) LED lights in coop. With the Motor Shield you can dim the lights over time using the Speed Control. Like in the video I linked to.

4) tank tracks...still shopping
6) good inexpensive USB cameras for run (I'm thinking web cams...wide view) like this example
7) Rpi camera (already have it not the best but might as well use it in coop)
8) small speakers... I'm thinking desktop speakers

All good.

9) limit switches... microswitches OR magnetic switches?

Use micro switches. Reed switches are not my favorite. Burned up a few and they have to be close for the magnet to work. Those are really just used for window/door security. The micro switches have many different arms that have rollers, humps and flats that are long so it makes it easier to position.

I made this setup with an old Ilogic MP3 player case, two switches from a microwave and a scroll saw blade. Makes it easy to mount. Not sure if this could help but thought I'd add it anyway.
20201014_064503.jpg 20201014_064518_HDR.jpg
 

Attachments

  • 20201014_052702.jpg
    20201014_052702.jpg
    290.7 KB · Views: 8
Last edited:
It's nice to have overwhelming choices on how to control the door but you need to get past the biggest hurdle you will face and that's the mechanics of making that door move. After designing automatic assembly equipment and other machines for the last few decades and then having to go out to my machine shop and build what I design I've gotten pretty good at spotting troublesome things.

You have a gear motor on the way, if you have a 9vdc or 12vdc wall wort or a battery and a couple of switches you can work on making the door work while you ponder all the choices you have been given. I would not order anything until you get the mechanics of the door working. If you use a battery please put a small fuse between the + and your switches. Even a 6v battery should work for testing.

Ignore everything but the relays in this schematic and use simple switches from a home store lighting section like this Gardner Bender switch.
coop-door.jpg

JT
 
It's nice to have overwhelming choices on how to control the door but you need to get past the biggest hurdle you will face and that's the mechanics of making that door move. After designing automatic assembly equipment and other machines for the last few decades and then having to go out to my machine shop and build what I design I've gotten pretty good at spotting troublesome things.

You have a gear motor on the way, if you have a 9vdc or 12vdc wall wort or a battery and a couple of switches you can work on making the door work while you ponder all the choices you have been given. I would not order anything until you get the mechanics of the door working. If you use a battery please put a small fuse between the + and your switches. Even a 6v battery should work for testing.

Ignore everything but the relays in this schematic and use simple switches from a home store lighting section like this Gardner Bender switch.
View attachment 2372751

JT

I like to use these windows switches. It is nice since they are so simple to wire. Almost like a double pole double throw rocker switch but you only need one jumper. Setting up relays can be done later like you said.
Window Switch w Limit Switches.png
 
Use micro switches. Reed switches are not my favorite. Burned up a few and they have to be close for the magnet to work. Those are really just used for window/door security. The micro switches have many different arms that have rollers, humps and flats that are long so it makes it easier to position.

I made this setup with an old Ilogic MP3 player case, two switches from a microwave and a scroll saw blade. Makes it easy to mount. Not sure if this could help but thought I'd add it anyway.
View attachment 2372734 View attachment 2372735

A giant paddle switch from two micro switches, that's using your head for more than a hat rack. Quite a clever thing.

JT
 
A giant paddle switch from two micro switches, that's using your head for more than a hat rack. Quite a clever thing.

JT

Yeah you don't need the enclosure but a person on another forum was adamant about the using reed switches, claiming that they would get dirty in the coop. Which I replied just cover them up and added, they can be located together for easier mounting and better operation. So I took a quick look around and saw this case that I had kept FOREVER knowing that someday I will use it for SOMETHING. I'm sure you probably have a few things that are so cool looking, to you, that you keep in case you wanna make something. Well the time had come. It was perfect. The lid slides on and off but is snug. The openings are great and seem to be meant for it. One side has a small hole for the wires and on the arm side it has an elongated hole that allows for the arm to travel up and down. When I get my 3D printer I will make a few of these that the switches just snap in place. Smaller enclosure of course.
20201014_064503.jpg
20201014_064518_HDR.jpg


I just made this one to show you don't need the enclosure. Make the arm to the length you require so that distance is not so much an issue. A small plastic cover plate may be needed to keep the lever/arm from popping out.
20201014_194612.jpg
 
Last edited:
@Mouthpear @jthornton
I only mentioned the automotive relays because that is what I am familiar with...

Trying to put together buying list... help with thoughts suggestions please
1) raspberry pi 3B+
2) DC 12V 5RPM Gear Motor ( Reduction Ratio: 1: 401,Rated Torque: 10Kg.cm, Rated Current: 0.16Amp) (I already bought this)

3) L298N? Relay block/board? Motor shield?
I'm thinking one motor for door,
(possible addons below)
1 motor (cooling fan/mister) temperature activated, 1 servo/water valve, 1 pump?1 motor (fan inside coop) temperature activated
4) tank tracks...still shopping
5) LED light for inside coop, turns on at sunset...(light the way for the girls) turns off 30 minutes after door close
6) good inexpensive USB cameras for run (I'm thinking web cams...wide view) like this example
7) Rpi camera (already have it not the best but might as well use it in coop)
8) small speakers... I'm thinking desktop speakers
9) limit switches... microswitches OR magnetic switches?

I am just jumping into this thread to mention a few things.

If power is a concern the Raspberry Pi is going to be a pretty bad choice for usage with solar panels and batteries. I would use an ESP8266 or ESP32 for the automation side of things. The Raspberry Pi is overpowered, adds complexity and potentially decreases reliability.

A Wyze Camera is cheap at $30 and offers night vision - perhaps you could use this over the Raspberry Pi Camera?

Lastly, if you're using an actuator, just use relays.
 
I am just jumping into this thread to mention a few things.

If power is a concern the Raspberry Pi is going to be a pretty bad choice for usage with solar panels and batteries. I would use an ESP8266 or ESP32 for the automation side of things. The Raspberry Pi is overpowered, adds complexity and potentially decreases reliability.

I will give advice when people ask for it but try to keep to what they are asking at the same time. I this case the use of RPi is just their preference due to its capabilities. The ESP8266 Doesn't even come close to having the same. One main thing is you can't get any feedback. As for automation it lack there too. All you can do is basically open and close. Or just trigger things. With the RPi you can get feedback from temp/humidity sensors, rain sensors, Photocell, proximity sensors and the list goes on. In order for the ESP8266 to do that you will need an Arduino/RPi (you need the to program the ESP8266 anyway) to do that. And of course the apps are very limited. From a PC you will need to learn hex code/commands to make it all work.

20201015_011800.jpg


The OP is not going to use Solar Panels and Battery Packs (I do recommend it tho), they will be going with POE.

Lastly, if you're using an actuator, just use relays.

The OP is not using an actuator. Even if they were, the use of relays is no more needed than a motor controller. I have made several comments on that issue. Plus the OP plans on adding features. At least 3. That's 6 relays. However you configure it. Takes up room and adds lot's more wiring. Just look at the pix I posted. Post #62
 

New posts New threads Active threads

Back
Top Bottom