NOT Baking Eggs. (Incubator design-PWM question)

The magic smoke.

Moderators: phlip, Moderators General, Prelates

NOT Baking Eggs. (Incubator design-PWM question)

Postby Velifer » Wed Jan 26, 2011 6:29 pm UTC

It's soon to be spring, and that's egg-hatching time.

I have a homemade 'bator, an old upright freezer that's been set up with egg turners, baffles for ventilation, internal circulation, humidification, and heat, almost all built out of found or hacked together materials. Unfortunately, the thermostat I have (ZooMed Reptitemp 500R) allows for too much variability in the temperature, and this has been bad for the hatch. The lamps cycle on and can bring the temps too high before the thermostat cuts out. I want to shift to a variable thermostat setup to drive the heat lamps.

STAND BACK! I HAVE AN ARDUINO!

So I'm thinking about an SSRs to do PWM for two 250W (110V) heat lamps. (Only one lamp is needed, but two lamps are important for redundancy.) Is this a good solution, or will I bake the SSR flipping it on and off so much? I'm new to microcontrollers--still pretty impressed that I can make an LED go blinky, so go easy on me.
Time flies like an arrow, fruit flies have nothing to lose but their chains -Marx
User avatar
Velifer
 
Posts: 1133
Joined: Wed Dec 26, 2007 4:05 pm UTC
Location: 40ºN, 83ºW

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby hintss » Thu Jan 27, 2011 2:26 am UTC

well, IIRC, a SSR is basically an optoisolator that handles more current. can you break LEDs or photoresistors by switching them too often? I have no idea.

anyway, I think a triac may be a better option.

and you can make an LED go blinky with a 555 :P
"s/god/flying spaghetti monster/"
User avatar
hintss
 
Posts: 1294
Joined: Wed Nov 25, 2009 7:19 am UTC

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Seraph » Thu Jan 27, 2011 2:38 am UTC

First question:
How often is "too much". I have water heaters with SSRs in them that flip a few times a second.

Second:
You might want to consider a triac.
If you don't know what one is there is a nice description at
http://knol.google.com/k/max-iskram/ele ... 9zgq0e/26#

If you combine this with some sort of optocoupler triac driver w/ built in zero cross detection (Off the top of my head I'd use something like a MOC3020) you should have a simple enough setup.

Edit: Well, I guess I'm not the only one with the triac idea.

Edit 2: Also, if you wanted to make your own zero-crossing detector you could use your triac as a dimmer. This falls into the 'kinda tricky' category, but I would think somewhere online you could find a suitable circuit, the tricky part would be the code. I'm not sure how easy the arduino makes timers and interupts.
Last edited by Seraph on Thu Jan 27, 2011 2:51 am UTC, edited 1 time in total.
Seraph
 
Posts: 325
Joined: Mon Jul 16, 2007 4:51 pm UTC

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Solt » Thu Jan 27, 2011 2:47 am UTC

I would suggest getting your own temperature sensors. They are tiny, dirt cheap, and you can play around with the mounting configurations. I would mount at least one on the surface of an egg (using thermally conductive adhesive...doesn't have to be a live one), and mount a couple as isolated from physical contact with anything but air as possible, including minimizing the size of the power/data wires. This, combined with your own logic in the arduino, will allow you to build a pretty good system using either on/off control or PWM/Dimmer (PWM is probably overkill... you can easily build a system that will react much faster than the temperature sensors and as a result you could drive it unstable).
"Welding was faster, cheaper and, in theory,
produced a more reliable product. But sailors do
not float on theory, and the welded tankers had a
most annoying habit of splitting in two."
-J.W. Morris
User avatar
Solt
 
Posts: 1912
Joined: Tue Mar 27, 2007 5:08 am UTC
Location: California

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Pinky's Brain » Thu Jan 27, 2011 2:03 pm UTC

You will still need to take into account lag time or you will still not get a stable temperature.

http://en.wikipedia.org/wiki/PID_controller

Also since you're using AC you will want to use a triac rather than PWM.
Pinky's Brain
 
Posts: 177
Joined: Mon Apr 28, 2008 11:46 pm UTC

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Velifer » Fri Jan 28, 2011 2:44 pm UTC

I didn't know a triac existed. Reading the knol link, it seems that it is an entirely AC part, and supplying DC to the gate just turns it on forever. That's not good.

So I'd use the optoisolator (the MOC3020M does its own zero detection?) switch it with the arduino (timer and interrupts are trivial) and then run into a triac, and use that to make a dimmer? I've got some reading to do.


(I do know that Arduino is an amateur-hour development environment. That's where I am right now. Once the incubator is up and running for a season, I do want to just use the atmega chip bare, and I recognize that even that is likely overkill. It's $3, and still makes for an under-$60 'bator with a 200 egg capacity, and a fun build.)
Time flies like an arrow, fruit flies have nothing to lose but their chains -Marx
User avatar
Velifer
 
Posts: 1133
Joined: Wed Dec 26, 2007 4:05 pm UTC
Location: 40ºN, 83ºW

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby stephentyrone » Sat Jan 29, 2011 3:39 pm UTC

I find my chickens make pretty good incubators. =)
GENERATION -16 + 31i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.
stephentyrone
 
Posts: 779
Joined: Mon Aug 11, 2008 10:58 pm UTC
Location: Palo Alto, CA

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Velifer » Sat Jan 29, 2011 7:41 pm UTC

stephentyrone wrote:I find my chickens make pretty good incubators. =)

Sometimes. But I've had a few that were not so good at it. And there's the timing issue. The 'bator goes broody when I tell it to. Hens just don't listen. That, and even 50 eggs takes four or five hens out of production for 40 days or more.
Time flies like an arrow, fruit flies have nothing to lose but their chains -Marx
User avatar
Velifer
 
Posts: 1133
Joined: Wed Dec 26, 2007 4:05 pm UTC
Location: 40ºN, 83ºW

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby nickwest » Mon Jan 16, 2012 6:06 am UTC

The Arduino isn't "amateur hour." The barrier to entry is low, which means that non-technical people can get started more easily than under most other microcontroller platforms... but an Arduino project can become just as complex as any PIC (for example) project. And because the entire Arduino toolchain is open-source, the user can go and create their own libraries, or edit them to perform better in a given situation. For example, if the analogRead is too slow for my application, I could change it to only read at 8bit resolution. What I'm trying to say is that Arduino is not a dead-end, it's very hard to outgrow the platform. Also when you get hadcore you can always write your code in raw assembler and just use the Arduino board as a handy prototyping board.

Back on-topic, I'd recommend the Dallas/Maxim DS18b20 temperature sensor, as it's dead easy to interface with, reasonably accurate, and doesn't need calibration. I've only ever used 12v DC for the heating element, for example in my quick and dirty home brew heater i used a 20w resistive element (literally made from a whole bunch of resistors!) and a BUZ71 mosfet to switch it. I used a Picaxe microcontroller which switched at about 1hz. The slow switching combined with the high thermal mass of the 20 litres of brew meant that I didn't have to write a PID controller, just a very simpe if...then loop.

I did a write-up on instructables but the forum won't let me post a link. fair enough, it helps keep the trolls out! If anyone's interested just post a reply or send me a PM and I can give you info.
nickwest
 
Posts: 1
Joined: Mon Jan 16, 2012 5:10 am UTC

Re: NOT Baking Eggs. (Incubator design-PWM question)

Postby Minerva » Fri Feb 17, 2012 3:52 pm UTC

You can't do PWM with an AC mains signal and expect it to work well.

The way that this sort of thing is normally done, say with line-powered AC motor controllers or light dimmers, is to detect the AC zero-crossing point, wait for a carefully controlled time, and delay the firing of the triac until after a certain number of degrees (a certain phase angle) into the AC sine wave cycle, then repeat.

By the way, an AC solid-state relay is a triac (plus a little other stuff to drive the triac, namely an optically-coupled driver triac).

I've actually had an idea for a while that this would be a good kit to design - a safe, working mains triac phase-angle controller which can be safely plugged into an Arduino and used by hobbyists, with an optically-coupled zero-crossing output and an optically-coupled phase-firing input.

Personally, I think you should use your Arduino to implement a simple "bang-bang" thermostat controller which just drives the solid-state relay on and off in response to a temperature measurement, don't try and PWM it because this will just cause you grief.
...suffer from the computer disease that anybody who works with computers now knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is you play with them. They are so wonderful. - Richard Feynman
User avatar
Minerva
 
Posts: 896
Joined: Sat Nov 11, 2006 2:58 pm UTC
Location: Australia


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest