Raspberry coop

Pics
I just don't understand how it would know where "zero" or start is...


Forgot to ask/mention why do you want to do it with an encoder? Encoders are usually meant to be used on motors that require positioning. As in CNC machines or factory machinery. So it seems unnecessary. Of courses you might just wanna do it to just do it. I've done thing like that myself. But in order to get a start point you need to have a feedback mechanism like a limit switch or sensor. So if you already have have one, and exact positioning is not an issue, then adding a second switch or sensor is far easier.
 
@Mouthpear, I just want to make a Rpi based automatic sliding door opener, that I can also hook up 1 RPi camera ( I already have it) 2 USB cameras, speakers for music, and maybe a LED light.
I'm not knocking the limit switches.. I was thinking of the encoder route because it would be attached to the motor... (only reason) limit switches are fine for me.
What do you think of the "tank track" wheel idea? Link this one attached to a slow motor OR this one that also comes with motors. I'm sure we could control them via PWM to slow them down.
 
@Mouthpear, I just want to make a Rpi based automatic sliding door opener, that I can also hook up 1 RPi camera ( I already have it) 2 USB cameras, speakers for music, and maybe a LED light.
I'm not knocking the limit switches.. I was thinking of the encoder route because it would be attached to the motor... (only reason) limit switches are fine for me.

Yeah I didn't think you were knocking them.

I in fact, I wanted to add, that I myself wasn't knocking your need/want to make it with encoder. I did mention briefly that I myself sometimes do things with extra "unnecessary" steps or things, just to see if I could do it or just because I WANT to do it or because someone else wanted to know how it could be done.

Like I came up with three simple circuits that return the door up and back down, in case something or someone was in the way. Many people knock it and seem to hate it. I honestly don't really see the need for it when used with a Linear Actuator that goes so slow, but I did it anyway in case there are people who have fast moving doors or if they are just concerned.

What do you think of the "tank track" wheel idea? Link this one attached to a slow motor OR this one that also comes with motors. I'm sure we could control them via PWM to slow them down.

LMAO I LOVE IT! I am interested on how you will adapt it.

As far as PWM. If you have a PO Box, I will send you one of mine. I have a few extra. However I recommend using a Motor Control Module like the ones in this kit. Or better yet a Motor Control Shield for the RPI. I ordered a few Arduino Motor Control Shields that I will be using on my next Chicken coop build. They give you the ability to change direction and speed with less programing and less off board wiring. Plus the Modules and Shields give off less and are more protected from electronic "noise".

I would personally go with the shield.
Just in case I wanted to add a second door (door that lets then out of the run for free ranging)
or
a servo that opens a water valve for cool down mister or drinking water supply (these are solenoids but a servo valve would be better to control flow and volume)
or
a ventilation port with computer fan when the temp/humidity sensor senses the temp/humidity to be too high
or
add a chicken feeder that lets you control how much food is dispensed throughout the day. This helps prevent waste as the birds will eat what they dropped/spilled instead of having an endless supply of fresh feed from an open no control gravity feeder.
Or
You can even have LEDs in the coop that turn on 30 mins before door close/dusk/sunset and dim them over a period of time. Chickens don't have very good eyesight in the dark so the flock to where there is better lighting. Having the light on in the coop helps draw them in. Also good if you want to wake them up early.
OR ......
Just kidding. There are other useful things to use the motor shield for but I can't list them all. LOL
 
@Mouthpear I do believe in KISS, and the limit switches win...below is a quick drawing of tank track idea...the green boxes represent the limit switches (on the inside of door) the single wheel at the top is to keep the door from tilting, solid blue wheel would be drive wheel, orange circles represent "rollers" (help keep contact, and movement fluid)
Door open track.jpg


I have seen the L298N motor drive controllers... I thought the Rpi was capable of PWM already onboard... So, you say motor shield...others say relay board...

Your food feeder/dispenser looks awesome...I would like to know more... I can see fill at one end, dispenses at other, do you have it dropping the feed into a bowl?


The water cooling mister idea also sounds like a COOL idea... as it does get very hot down here. I would like to hear more about it...
 
@jthornton That does make some sense... I guess I'm used to wiring up automotive relays only on the 12V (hot) side to run lights... horns etc...

I stumbled across this different way of controlling the motor & direction...that's why I was asking about breadboards, etc...

Since you mentioned automotive relays, I love this harness for wiring up forward/reverse up/down. It is meant for vehicle power windows and locks. Comes with pre jumpered hot wires that are 22in long. Nice! I am posting just one possible wiring diagram but the rest can be found here. And a not so good quality video I did here.

Two SPST Timers Two SPDT Relays Bosch LA s.png
20201011_174656.jpg


Also since @jthornton Mentioned using a simple SPDT switch I thought I would add this.

Power Windows Double SPDT Relays.png
 
@Mouthpear I do believe in KISS, and the limit switches win...below is a quick drawing of tank track idea...the green boxes represent the limit switches (on the inside of door) the single wheel at the top is to keep the door from tilting, solid blue wheel would be drive wheel, orange circles represent "rollers" (help keep contact, and movement fluid) View attachment 2369839

I like that. Looks to be a good plan. Again I love the tank track idea.

I have seen the L298N motor drive controllers... I thought the Rpi was capable of PWM already onboard... So, you say motor shield...others say relay board...

Yes, just like the Arduino, the RPi can be set up to run a motor and maybe two, but it is not recommended. Plus there will be a bunch of wiring needed and figured out, plus that wire will be needed adaptation from tiny pin header jumper wires to larger gauge motor wires.. With a shield only wires need to be run are the separate power source (POE) once and from there two wires to each motor.

Motor Shield vs Relay Board.

Both have their pros and cons. I will only talk about three 1 handling of different current types (AC vs DC) and Voltage. Which is really the thing of most concern. 2 And another tiny point. 3 Programing

Relay can handle and used to control the many combinations of situations. Like using a 12VDC relay to operate an AC desk lamp. Some motor controller can do that too but in your case you really don't need that since your application will not require a large motor.

The tiny thing is actually a big deal. With a relay or even a relay board you will have to power up each relay and wire it up. Then you have to wire motor power and motor on the NO, NC and COM of the relay. For each relay. A Motor Controller or shield is power in (two wire) and motor connection (two wire). No need to wire up 4 different motors to their own set of relays. 1 Pos 1 Neg in and 4 motors out. The modules I have can do 4 dc motors and two servos at the same time.

PROGRAMMING geez LOL.
make sure both relays are off
turn one on make sure the other one is off (no speed control)
turn that one off make sure they are both off
turn the other on on ..................
You get the point

turn motor on forward (with Speed Control)
motor stop
turn motor on reverse (with Speed Control)
motor stop
It's almost that easy.


Your food feeder/dispenser looks awesome...I would like to know more... I can see fill at one end, dispenses at other, do you have it dropping the feed into a bowl?


The water cooling mister idea also sounds like a COOL idea... as it does get very hot down here. I would like to hear more about it...

Thank you. Yes the drop end will be a short PVC pipe that becomes a troth. The troth will sit on a hinged platform. There will be a weight scale that will take measurements before the feeder turns on. This is to regulate the time the motor is on and dispensing food. I want it near empty so that the birds will eat what they spill first. I also don't want rats to come at night and take advantage, so there a cover that shuts also. I will post pix on google drive so if you want to see the progress, that's where it will be.

The misting system is very basic. You can buy a deck or patio mist system and use a servo valve to open and regulate how much mist to put out. Use your RPi to get temp and humidity. If you don't want to spend the money on a Servo Valve the just get a cheaper Solenoid Valve and set the flow with a regular ball valve. But the commercial mist systems come with small values for that too. So a Solenoid Valve should do fine.
 
To run a gear motor a relay is the simple way, it's already slow so no need to add the complication of speed control. Turn on an output till the limit switch is made then turn it off.

JT

The thing missing, with what you said, is that you have to have a gearbox with the right gear ratio to get the right RPM. While Yes controlling the polarity with a relay(s) is the simplest option. You may not have or want to send time and money trying to find a motor that has the right RPM, cost, availability, and can be mounted accordingly. So adding speed control helps greatly to make the RPM/speed issue an almost non issue.

Plus I would actually see the speed control as an added benefit. Especially if he is already going to use RPi. Again not a big deal for most people, but being able to have the door open at full speed, when the chickens are all trying to get out, all at one time, the door is opened fully with haste. Now at night you can slow the door down, giving stragglers more time to get in or not get caught in the door. Of course the door should close after sunset or dusk.
 
@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?
 

New posts New threads Active threads

Back
Top Bottom