Go Down

Topic: Hayfeeder: use electronic locks on timer (Read 365 times) previous topic - next topic

seabert

Hello,
I'm a newbie here. I've seen some projects with arduino from my kid at school and this got me interested...
I've got a litle project witch is to complicated for him. (but want to do it with him.)

Could anybody give me some tips? (remember the newbie part :-) )

I want to make an automatic hay feeder, 4 compartments that should open on specific times.

1st at 10h
2nd at 13h
3rd at 17h
... etc

basically that's it, if someone likes to help me all the way, ideally what i want:

LCD screen with time, and possibility to use this screen and buttons to set the time and the timer which will activate the relays and so also the locks.   (so that I don't need computer only for the first upload)

I'dd like to use 220V AC current.

Attached all the things I think I need (correct me if I'm wrong)

Arduino ofcourse  (uno ok? ) (1pc)
transfo from 220ac to 12v 8.5A DC  (if I'm not mistaken ok for arduino / locks?)  (2pc one for arduino and one for the 4 locks together? )
relays (4 pc )
ds 3231  (4pc - 1 per relais? )
4 locks
LCD screen  (1pc)


If someone could explain or draw a plan on how to connect

maybe some pointers codewise?  (I'm gooing to have to guide my son (12years))

groundFungus

#1
Feb 07, 2019, 09:50 am Last Edit: Feb 07, 2019, 10:02 am by groundFungus
As described the project doesn't sound very complex.  An Uno would suit fine.  You only need one RTC.  Use logic level MOSFETS to control the locks.  That avoids the mechanical relays that require current to hold closed and are more prone to failure.  Relays need transistor drivers anyway, why add complexity?  The LCD could be a simple 2 line character LCD like a 1602 (2 line 16 characters per line).  Depends on how much data that you want to display.  Those displays can be 4 bit parallel or I2C interface.  I would use the 220ac to 12v 8.5A DC for the lock power supply and a 5V cell phone charger for the Arduino.   Since you are switching inductive loads that isolates the Arduino from the potentially noisy lock supply.

Robin2

Break you learning about the project down into small parts - for example how to control a relay, how to get things to happen at a particular time, how to display "hello world" on the LCD screen etc. When you can do all the parts separately then you can start integrating them into a single project.

Have a look at Planning and Implementing a Program

If you want things to happen in sync with clock time you will probably need a Real Time Clock (RTC) module as an Arduino is not an accurate time keeper over longer periods.

The PIghixx website has lots of diagrams about connecting things to Arduinos

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

seabert

thanks, "the logic level MOSFETS", is a peace of code right? not a component? so I don't need relays... interesting , saves me a lot of wiring :-)
the lcd screen is not the best option?

so arduino to screen
arduino to timer
timer to 4 locks right?

groundFungus

Quote
"the logic level MOSFETS", is a peace of code right? not a component?
No. they are components.  Logic level MOSFETs are switching transistors that can be switched by an Arduino output.  They replace the relays.

Quote
the lcd screen is not the best option?
There are literally dozens of different displays.  The ones that I mentioned are, probably, the simplest to use.  The best display is the one that displays the data in a manner that you want.  Best is up to you.

screen to arduino
timer to arduino
arduino to 4 locks

The Arduino reads the RTC and when it is time (from the RTC data) the Arduino signals the MOSFETs to energize the locks.

seabert

Ok i see, but here i have to work also with resistors? ยต4 mosfet switches? one for each lock ?

I already have a lcd screen from my son (see attachment in first post. )


"the project doesn't sound very complex"   it is to me , and ceeps getting more complex with every answer :-)

Robin2

#6
Feb 07, 2019, 11:16 am Last Edit: Feb 07, 2019, 11:17 am by Robin2
"the project doesn't sound very complex"   it is to me , and ceeps getting more complex with every answer :-)

Reply #2 was intended to be be an antidote :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

seabert

Robin, Antidote isn't helping :-)

just don't have the time to start from scratch :-)  (even though I have to)
I want to support/help my son (and make sure he makes the right decisions... )
It has to be ok the first attempt... 12 year-olds don't have the persistence I'dd like them to have :-)



Robin2

#8
Feb 07, 2019, 02:20 pm Last Edit: Feb 07, 2019, 02:23 pm by Robin2
It has to be ok the first attempt...
I have never been a professional programmer but I have a bit more experience than you. My stuff NEVER works at the first attempt. Maybe at the 20th if I am lucky.

To my mind setting as a target "ok the first attempt" is a signpost to failure. It would be like tackling Mont Blanc for your first experience with climbing.

Experienced programmers develop things in small pieces, testing as they go. The programming style in my Planning and Implementing a Program
is intended to facilitate that.

...R

PS ... be sure to create space for your 12 year old to be better at this than you are
Two or three hours spent thinking and reading documentation solves most programming problems.

dougp

It has to be ok the first attempt... 12 year-olds don't have the persistence I'dd like them to have :-)
In the handful of replies so far you've glimpsed some of the varied bits of knowledge needed and things to be attended to even for simple projects.  Starting from where you are, It has to be ok the first attempt...   is a recipe for frustration.

My two cents - before purchasing any components beyond the Arduino for this project, learn your way around the IDE and the first five sketches in IDE/file/examples/digital.  In fact, using your parts list as a guide you could put together a working sketch using print statements to the serial monitor to simulate your lock outputs.

YMMV
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

seabert

Hello,
I'm back with a question...
I have my arduino, code and everything working, but it seems that my locks are not strong enough to open with the weight of the trapdoor and hay on it... (in video test without hay, that is realy the limit)
(for the test they open all at once, but normaly they will open one at a time on the timer)
Anybody good idea about opening mechanisme?  (min 2kg of force)

- Magnets to hold doors isn't realy an option because of the risk of heat (constant power to hold door shut and so heat -- > not good mix with hay)
- push-pull solenoid didn't find a strong enough...
- ...

Thx for your input

Paul_KD7HB

Robin, Antidote isn't helping :-)

just don't have the time to start from scratch :-)  (even though I have to)
I want to support/help my son (and make sure he makes the right decisions... )
It has to be ok the first attempt... 12 year-olds don't have the persistence I'dd like them to have :-)



In my 35 years of professional computer programming, I had ONE program that worked correctly the first time. And that was just a report printing program. Others have taken up to 18 months to get the bugs out. So don't expect your programs to be any different.

Paul

dougp

Anybody good idea about opening mechanisme?  (min 2kg of force)
Maybe a linear actuator operating through a lever/bell crank?
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

seabert

Maybe a linear actuator operating through a lever/bell crank?
What do you mean with bell crank?

bluejets

#14
Apr 18, 2019, 01:00 am Last Edit: Apr 18, 2019, 01:02 am by bluejets
What do you mean with bell crank?

Do you not have access to Google images..??

Not a good idea at your level of knowledge to be mucking around with mains voltages either.

Go Up