Regarding the relays, maybe think about SSR (solid state relays). They're a bit more expensive but controllable with logic signals and available up to very high current - beyond 100A at mains voltages.
The AC one also generally offer zero crossing switching i.e. switch at the 0V portion of the AC cycle.
I don't know if you are still awaiting replies to this post from April.
Maybe you've already tried your idea and either melted the relay, or not.
Having just messed up badly with something like this myself, I urge you to be VERY CONSERVATIVE with how much current you switch with an electromagnetic relay.
Also, use an ohmmeter to measure the off-resistance of the heater you wish to switch. I don't know about heater coils, but incandescent bulbs have very low off resistance -- leading to very high turn-on currents -- that need to be taken into account when controlling them with relays.
Another approach is to control a solid state relay (of more than sufficient capacity) with your micro-controlled relay. The downside is you then have to provide the power to that loop. These things are often quite cheap and durable.
Looks good, Thanks for sharing! I tested out your code on one of my original Omega, and was also having issues with running out of space. When I have some time I'll try again with my Omega2+ and add more space with an SD card.
I've been too busy with work to get anywhere with my own project, but am looking for the best way to add server-side functionality to this project. It would be great to be able to change the setpoint, show last off time, and set minimum off time. Any suggestions on the best way to do this? I'm trying to learn more about PHP, and also looking at node.js.
Once I have an Omega controlling my draft cooler, my goal is to replace the arduino controlling my brewery now. Hopefully I will be far enough along with that project to have something worth sharing in a couple more weeks.
if I am on my motorcycle and come home, I want the door to open automatically (if the radius is possible).
I see where you are going with this, a Bat Cave Garage Door. ;-) It certainly is possible. Anything that will try to automatically connect to your main controler via WiFi or blutooth (with proper security signature) will do to alert it.
About the open/close state of the door, maybe your system already has a light that you could use. If not, the simplest and cheapest way is to use a magnet switch (magnet on the door + glass fuse-like switch on the door frame).
I think the problem is that apache is running as nobody and the relay-exp is only accessible from root.
Changing apache to run as root is not possible without rebuild...
... Apache has not been designed to serve pages whil running as root. There are known race conditions that will allow any local user to read any file on the system. If you still desire to serve pages as root then add -DBIG_SECURITY_HOLE to the CFLAGS env variable and then rebuild the server.
The input to the PowerSwitch Tail is an optocoupler, with an input current range of about 3 - 30mA at a forward voltage of about 1.4V in the "ON" state. The modifications I have proposed will allow the Omega (whose I/O circuitry runs off a 2.5V supply) to provide at least 3mA when ON. If a 5V input is used instead of the Omega, the input current (with these modifications) becomes about 15mA, which is still well within the operating range for the PowerSwitch Tail's input current.
This question might be silly but I am sure I'm not the only one who wants to get sure before destroying something :)
I'd like to use the relay expansion to switch on/off a light bulb (for testing purposes). Therefore I would cut the electricity cable of a lamp into two and put the ends in the two sockets of a relay on the expansion.
Is the relay expansion designed to handle this amount of power (230V, 50Hz)? Is there anything I need to know to take care of before I start?
This is a very good question. And the answer is that most relay expansion boards are not designed so that they safely can be connected to the mains voltage without causing a safety hazard that could result in electric shock or a fire.
The reason in most cases is that the circuit board is made with too short distances between low voltage parts and mains voltage traces. To save money, most of the relay boards use relays that were never intended for this type of use. The relay may have been designed to be used where the low voltage circuitry is grounded, so that if a connection between live wiring and the circuitry that controls the coil, the low voltage circuitry would not end up at a hazardous voltage.
But with micro controllers for hobby use it is most of the time so that the circuitry is not connected to ground, and even if it was (through USB cable ground) the ground connection is not strong enough that it will be safe. So the relay boards that are going to be used for controlling mains voltage will look different. there will be large distances between AC power traces and the rest of the circuitry. THe relays will be different and a bit larger, with much longer creepage distances and with coil pins far away from power pins.
Still, most relay board manufacturers list the characteristics of the relay, not understanding that the circit board design must meet electical safety requirments to be safe. They invite users to connect the relay board to the mains voltage but their product is unsafe.
Another thing to remember is that there must be a fuse in series with the load, and the fuse rating must be low enough that if there is an overload the fuse will open before the circuit board traces or the relay contacts are damaged. A relay with 2A contacts, I would use max 1.5A fuse. The mains outlet may have 10A or even higher rating.
Looks like your connection to Community was lost, please wait while we try to reconnect.