Doghouse automation design advice

Hello all,

I'm working on a project to automate my dog's houses and am in the process of drawing up the PCB. I have 10 outputs (via MOSFETs) which will be connected to motors, valves, etc. and some inputs for temperature, light sensing and RF control. I'll use an algorithm to calculate the optimum water intake for the dogs, based on light level and temperature. I'll also be controlling sprinklers and feeders, as well as doggy blinds :slight_smile:

I'll be controlling several motors and valves via MOSFETs directly from the Arduino outputs and would like to hear from the experts, as to whether the protection I've currently incorporated into the project is enough to keep the FETs happy.

I'm attaching a ps(postscript) document containing the schematics. I'd be VERY greatful if someone would take the time to look at it and give his 2 cents :slight_smile:

Thanks in advance,
Lubomir Georgiev

schematics.ps (63.7 KB)

How about PDF, I don't seem to have anything to read PS.


Rob

Sorry about that... It's just that I'm on Linux and the reader that opens PDF also opens PS...

Here it is - I don't know why it seems to cut off the last couple of CM to the right, but it doesn't matter - there's nothing there anyway.

Thanks in advance for your help! :slight_smile:

schem.pdf (17 KB)

I'll use an algorithm to calculate the optimum water intake for the dogs

Is this really necessary (or desirable)? I'd imagine that, unlike with food, dogs will regulate their own water intake. So if there's no danger of them drinking too much, all you need do is ensure that water is always available.

Well, this is mostly for the sake of my water bill... The water will be running (e.g. won't be collecting anywhere, like in a bucket or something), so I'd prefer it was conserved when they're not thirsty.

The idea is that running water attracts their attention and thus encourages them to drink more, which is a good thing since dehydration is a real possibility, when the temperature goes in excess of 35 C. And running water is free of the bacteria and other nasty stuff found in watering cans, etc. where is stays still for hours...

The LDR won't work, it's just connected to VCC with no divider. You could connect it to GND and use the internal pull up resistor (dodgy) or add an external resistor and tap from the centre of the two.


Rob

Yep, good call!

I forgot the 10K to GND...

I'll add it in, according to ( Arduino Playground - PhotoResistor ).

But what I was really wondering about were the MOSFETs and whether I have every angle covered on protection? (e.g. ESD, Rev Voltage Spikes, etc.)?

Thanks again for taking the time to look at the schematics!

Here's a prelim of the PCB...

I managed to cram it all into a Single-Sided version :smiley:

I don't know a huge amount about FETs, they are very prone to being zapped though. Personally I'd be worried about running wires from them all over the place, but I may be being a bit paranoid.

Are they logic-level FETs? They are only getting 5v on the gate.

I'm not sure the diodes do anything, they certainly won't snub any motors/solenoids you drive although they might protect against -Ve spikes.

You could up the gate resistors (R1-21) buy 10x.

On the PCB.

What current are you expecting to drive with the FETs? The traces are pretty small. Especially the GND from all the FETs back to CONN3, that could be carrying the current of 10 motors.


Rob

Hi,

Some of the things you noted are written on the schematic (the .pdf) I posted earlier.

  1. They will be logic-level FETs. If they weren't at 5V they'd probably get hot enough for thermal breakdown(due to them not being fully saturated and the Rds being relatively high).
  2. They diodes, connected in inverse-parallel to the D-S junction are used to clamp the back EMF, generated when the flow of electricity through a motor or solenoid is halted.
  3. "You could up the gate resistors (R1-21) buy 10x." - I'm not sure I understand what you mean, given that resistors R1-R11(100 ohms) are connected between the Arduino output and the FET's Gate terminal, whereas R12 - R21 (10K ohms) are connected between Gate and the common GND to ensure that the Gate doesn't float.
  4. The traces on the PCB should be good up to 17.3 amps (given a 10 C temperature rise of the traces). I haven't done all the calculations yet, but I may decide to make some of the "highway" traces thicker.

Thanks for your input! I'm glad to hear criticism, since I tend to make stupid mistakes, when doing something fairly complex :slight_smile:

If they weren't at 5V they'd probably get hot

Hence my question, I don't see any mention in the PDF though.

"You could up the gate resistors (R1-21) buy 10x."

I reckon the gate resistors could be 1k easily and the pull downs 100k. FETs don't need any current to operate. I assume these won't be switched at a high frequency. However apart from using a little more current I don't think it matters.

Flyback diodes usually go across the coil/motor, cathode to +V and anode to the low side or the FET drain.

I tend to make stupid mistakes

Likewise.


Rob

Well, the bit about the FETs being logic-level is written in the lower-left corner of the document.

The resistor values (both for the Gate resistors and the Gate-Source resistors) were cited in a number of places and I assumed them to be correct...

I put the clamping diodes on the PCB, since the other components (such as valves and motors) will be mounted outside - hence will be subject to rain and/or moisture... I'd prefer to have as few components as possible outside the box :slight_smile: I read that they would still server their purpose even though they're not connected directly across the coil - is that correct?

Thanks for your time!

x2dz:
Well, this is mostly for the sake of my water bill... The water will be running (e.g. won't be collecting anywhere, like in a bucket or something), so I'd prefer it was conserved when they're not thirsty.

The idea is that running water attracts their attention and thus encourages them to drink more, which is a good thing since dehydration is a real possibility, when the temperature goes in excess of 35 C. And running water is free of the bacteria and other nasty stuff found in watering cans, etc. where is stays still for hours...

Don't know much about dogs, do ya?

I've seen my dog take crap, turn around, then eat her own poop - that was years ago, she's still alive.

I've seen her eat chain link fence - yep, still alive.

I've seen the results of her eating a snickers bar - still in the wrapper, before and after - yep, still alive (the snickers was in my wife's purse on the floor).

I've known another dog who'd pee in its own water, then drink it; one time it ate about 10 feet of garden hose, another time a bag of charcoal - as far as I know, that dog is still alive.

My dog drinks from a bowl of water, though other times she'll drink from our nasty algae filled garden fountain; I'm sure if (for some reason) she wasn't afraid of the bathroom, the toilet bowl would be a perfect water solution for her. Then again, we really don't know what happens in the house when we're not here (she's stays indoors when we're gone - otherwise she eats our doors).

Maybe your dog is fussy like that - then again, our dog is mean (sharpei/ridgeback mix - got her from the humane society; she was about to be put down), which is why we got her...

Dogs are not robots, dogs shouldn't be controlled in the way you are suggesting - imagine somebody doing that to you, without understanding why or what. We just keep our dog's bowls filled with food and water, let her have a variety of "human food" snacks (and meat bones, when we have ones large enough that she won't just snap 'em instantly - hard to find when you know your dog can eat chain link) - in short, we let her have as fun a life as a dog who wants to run down the street at any opportunity can have while being technically "imprisoned" in a house and yard. We chase her, she chases us. Sometimes she's bad, but we can't stay mad at her for any length of time.

One day soon she'll be gone, and she won't be able to be replaced, just like a person.

Let your dog live, and damn the water bill (seriously, this is really over money?) - if you want to regulate something, build a robot.

The things you stated in no way prove that you know anything about dogs. Period.

They simply prove that organisms are resilient - be it humans, cats or dogs. It doesn't matter.

The idea is to provide as much water as the dog needs and have it be as free of pollutants as it can be (do you know how much bacteria your "watering bowl" accumulates in just one hour?).

I don't want to regulate the dog's behavior - I want them to be as happy AND as healthy as they can be.

I do think that people should be registered in order to be able to have pets and you're a perfect example - did you know, for example, that dogs should NEVER eat sweets, because of the very real danger of them going blind? I won't go into details as to why, but I'd think you'd be able to figure out for yourself whether or not eating "chain link fence" is safe for your dog... :zipper_mouth_face:

The mention of the water bill was to illustrate that I'd rather conserve water that the dogs 'surely' will not be drinking (e.g. they've had the water running for example 7/15 mins in a quarter hour interval). Nothing more - nothing less. If I weren't able to afford looking after a pet properly, I would never have got him/them in the first place.

Have a nice day!

x2dz:
The things you stated in no way prove that you know anything about dogs. Period.

I know enough to know not to go overboard with one - it's a dog. A dog will live about 15 years, maybe more, maybe less. Treat it well while it lives, but don't coddle it.

x2dz:
They simply prove that organisms are resilient - be it humans, cats or dogs. It doesn't matter.

The idea is to provide as much water as the dog needs and have it be as free of pollutants as it can be (do you know how much bacteria your "watering bowl" accumulates in just one hour?).

I'm sure much less than the dog's own poop...

x2dz:
I don't want to regulate the dog's behavior - I want them to be as happy AND as healthy as they can be.

Maybe you need a camera to monitor its poop intake, too?

x2dz:
I do think that people should be registered in order to be able to have pets and you're a perfect example - did you know, for example, that dogs should NEVER eat sweets, because of the very real danger of them going blind?

We don't feed our dog "sweets" (ok, maybe she gets a bit of non-chocolate cake every once in a while) - and we certainly don't feed her chocolate (outside of that snickers bar - which stayed in the wrapper the entire time). My brother-in-law once had a small dog that loved to eat candy corn - that dog had more candy corn fed to it than any dog I've ever known. It lived to be 22 years old (longest living dog I've ever seen, too). All anecdotal, of course; each dog is different. I don't agree with giving a dog candy of any kind, but other foods, vegetables, and meats? Why not?

By the way - have you ever looked at the ingredients on dog food containers - they don't look much better than what is on human food. Then again, I've been near a local dog food rendering plant - and that ain't pretty, either.

Maybe we should start registering people to have people, as well, huh?

x2dz:
I won't go into details as to why, but I'd think you'd be able to figure out for yourself whether or not eating "chain link fence" is safe for your dog...

Well, it ain't like we're feeding it to increase its iron intake. Actually, what had happened is that we were trying to calm the dog when we were away (at least, initially after we got the dog) by "crating" it (this was after she started eating our doors). We started with a sized-for-the-dog metal cage/crate - it ate thru that. We then tried building a slightly larger crate using chain link. It ate thru that. After that, we just started trying to leaving her inside. Amazingly, she didn't run amok and eat things inside while we were gone. We think she likely had some form of separation anxiety.

I'll tell you this - you don't mess with a dog that can eat chain link.

x2dz:
The mention of the water bill was to illustrate that I'd rather conserve water that the dogs 'surely' will not be drinking (e.g. they've had the water running for example 7/15 mins in a quarter hour interval). Nothing more - nothing less. If I weren't able to afford looking after a pet properly, I would never have got him/them in the first place.

It sounds like your more worried about a "bacteria content" that the dog surely doesn't care about. It probably licks it butt then goes and drinks some water. I mean, seriously, its a dog!

If you owned a cow or a pig, would you care so much about the bacteria content of its watering trough? What about chickens or rabbits? Ducks? Sheep? Would you be out there checking the bacteria content of all of that? What about if you were raising them for slaughter (ie, for human consumption)?

I've known pig farmers, cattlemen, etc - they would all laugh at the suggestion of testing the trough for bacteria content (knowing their animals wallow in their own dung). That's doesn't mean they abuse their animals - they do get vet testing and such to make sure their healthy (same as our dog - if our dog looks and acts sick, we'll take her to the vet; if the vet recommends a put-down, and we feel it is best, to sleep she'll go), but they know they are animals, all the same.

The idea is to provide as much water as the dog needs and have it be as free of pollutants as it can be (do you know how much bacteria your "watering bowl" accumulates in just one hour?).

I'm sure much less than the dog's own poop...

I (partially) agree with @x2dz based on a recent experience. We were taking our dog to a trainer. The place had several filled water bowls scattered about the place. The bowls were filled each day with fresh tap water. As expected, our dog got thirsty from the activity and drank some of the water. The net result was a near death experience and a $500 vet bill. Even the freshest water put into a dirty bowl can KILL A DOG.

For an outside dog, water should ALWAYS be available from a CLEAN BOWL.

One thing I would seriously keep in mind is that you're giving Arduino quite an important task, it will more or less be playing God for the dogs.

Searching for a PH-meter-design I stumbled on a thread in an aquarium-forum of a guy wanting to automate his. The thread/project was looking nice until he came home one day while his controller kept looping in the feeder-routine, the fish had gotten food for a month in one day. Since the heat was turned on by the thermostat-function, which wasn't called for any more, the aquarium more or less turned into fish-soup.

It sure is fun to automate a doghouse, but trusting it to work perfectly could be far less fun...

That sounds more like an incident of one dog drinking after another dog without being in close contact with each other; cross-contamination, so to speak. I'm not saying dogs or any other animal should drink from a dirty bowl (even when my parents kept chicken, we would clean out the old sink we used for watering them every once in a while). Should you be overly concerned about the bacteria content over the course of a day or two, though, if its just your dog(s) at your own house (no other stranger dogs, or other houses)? Probably not. Our dog has never had a problem drinking out of our fountain in the 10+ years we've had her, and I don't recall my parents being anywhere near as concerned about the same for any of the dogs we owned either (outside or inside). None of them ever died prematurely from water intake.

All of this is really off-topic, though - so I'm not going to comment more on it; do with your dogs as you wish, I guess...

:slight_smile:

I read that they would still server their purpose even though they're not connected directly across the coil - is that correct?

It may be, but I've never seen it done like that. I can't see how that will clamp a positive spike.


Rob

Simpson_Jr:
One thing I would seriously keep in mind is that you're giving Arduino quite an important task, it will more or less be playing God for the dogs.

Searching for a PH-meter-design I stumbled on a thread in an aquarium-forum of a guy wanting to automate his. The thread/project was looking nice until he came home one day while his controller kept looping in the feeder-routine, the fish had gotten food for a month in one day. Since the heat was turned on by the thermostat-function, which wasn't called for any more, the aquarium more or less turned into fish-soup.

It sure is fun to automate a doghouse, but trusting it to work perfectly could be far less fun...

This sure got offtopic quick! :smiley: I'll say this - I've looked after dogs for most of my life and I would NEVER dream of leaving them unattended in the "Arduino hand of God" :smiley: for more than a couple of hours. This automation will be done solely for the fact that it would be more comfortable and healthy for everyone involved :wink:

@cr0sh - I do believe that people should be registered to have people, too - why do you think there are so many twisted people out there and the jails seem to always be overcrowded? I think that in order for you to look after any living thing you should have the living standard (i.e. funds) AND the necessary psychological mindset. If something happened to an animal I was looking after, God forbid, my conscience would be clear - because I would have done everything the way it should be done. If you were in that situation - would you be able to say the same? I know dog-owners like you and I'll tell you what I tell them - you're on a slippery slope. Be careful because the simplest lazyness or ignorance on your part could spell life or death for your pet. Enough said.

Does anyone have any comments on the actual design? Any criticisms or ideas?