Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Relay enclosure circuit


  • Please log in to reply
7 replies to this topic

#1 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 04 January 2012 - 10:28 PM

Hi,

I am part way through building my relay enclosure, this contains 6 large 25amp 480vac relays attached in threes to 2 very large aluminium heat sinks. I've never used relays on mains power before but thought I would play it safe and follow the recommendations on the datasheet, although these aren't officially for relays I think they will be more than good enough.

With the enclosure I plan to make a control board, I going to power my netduino with 12v dc and create a spur to power other devices from this, including 12v pc fans which will be in the relay enclosure along with 2 ds17b20 temperature sensors and few other bits.

This may be over kill, especially since aquarium equipment which it is intended for is seldom much more than 3amps. My aim is to take the 6 digital outs from my shift registers, to 6 transistors that will step the current up to 12 volts to switch the relays. The relays them selves are SSR and switch with logic level of the netduino, but I also want to put an led before the tranistor to indcate which relays are on with panel mount leds on the enclosure.

Also from the aquarium board I am nearly done building, I want to take 2 pwm outs from my tlc5940s as per marks example on the forum: here. These will again have a transistor to step them up to the 12 volt to power the fans and an led will again go before the transistor to show the speed of the fans. I was thinking of doing something a little more fancy here if anyone can help, and was thinking of having say 5 leds for each fan and depending on the duty cycle from the pwm more or fewer of the leds would light up like an audio level does as sound level increases or decreases.

Mains power I was thinking having an female IEC for the power cable, a switch, a fuse and a mains power led. This area is also causing a little problem, firstly I'm a little cautious arounds mains power and secondly as I don't know what products or methods would be best to cover for both circuit protection and fire provention. For example should I use any MOVs, TVSS etc, although I did read MOVs are common cause of electrical fires in prolonged over voltage situations. I may be going over the top, but am aiming for something that won't burn my house down and is reliable enough not to stop working and kill my aquariums. Another idea is a plug surge protector as well /instead?

Still on the mains side of things, I was thinking again 6 more female IECs or 6 male IECs coming out of the enclosure as short cables then I attach femail IECs to my devices, the later would be more space saving from my point of view but the female sockets would look better.

Next splitting the main, what is the best way to split the earth and neutral between the 6 power outputs? Will a bit of terminal block like this with cable joining the 6 rows together surfice? Or is there something better (remember space is an issue). Also what single core cable should I be using to connect the various 240 v section?

Finally please you suggest what transistors I will need to take the logic 3.3v and switch the 12v and would I need different ones for the 2 fans that will receive pwm out from the tlc5940s? I want to use some 3mm leds low power before the transistors, would I need resistors greater than or less than what would be needed for the leds on their own, when they are followed by a transistor? The leds I have are real low power with a forward voltage of like 2.5v or something.

So to summarise I need to know:

- what transistors to use and what restisor bare in mind a low power led on the 3.3v side of the transistor.
- how to split mains safely between the 6 mains outputs.
- circuit and surge protection.

Many thanks in advance for any help,

Andy


PS Here are a few images of what I have so far and my kind of rough hand drawn circuit diagram (not so clear and excludes the leds but you get the idea.

Posted Image

Posted Image



Posted Image

Posted Image

Posted Image

Posted Image

Posted Image


Posted Image

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 05 January 2012 - 01:02 PM

Hello Andy, and congrats for the enthusiasm around Netduino and hardware in general. About the transistor, you may use a very common BC337, which is a NPN. However, I'm not sure about the current required by the relays and other loads that should be driven by the transistors. The best thing to do is to read how much current require these loads, then the transistor could be chosen accordingly. About the remaining question, I'm not sure to understand. I mean that you are going to wire the mains-side of the circuit, which has to be pretty safe. From what I know, you should avoid to expose externally any metallic component that is working on the mains. Thus, if you need a switch for the mains, it has to be made of plastic. About the terminal connector, I'd say that the shown price is absolutely over any reasonable limit. However, it's a decent solution for wiring. Honestly I'm not an expert about such a wiring. What else do you need that I may help?
Biggest fault of Netduino? It runs by electricity.

#3 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 05 January 2012 - 10:27 PM

Hi Mario,

This is the rating
SSR 3-32VDC 48-480VAC 25A DC 3-25mA
of the relays: http://cgi.ebay.co.u...em=270876146251

I am planning on using a 12volt power supply 1 Amp.

First question is, is this ok to go in to the netduino? I am going to make a spurto distribute it to the relay and LED unit.

### OFF TOPIC ### Leds... I need some really powerful LEDs for my the aquarium lighting, I want white, red, green and blue.

Ideally It would be equivelent to 2 of the ETT850 and 2 of the ETML850 from here.

Not sure if the 1 amp 12v will manage to supply all that?

Is there any tips on safely using the terminal block for spliting mains voltage?

Is there any suggestions on over voltage and surge protection?

And using the control logic from the shift registers which are powered from the netduinos 3.3v, and some 3mm leds 2.5v forward voltage @ 30ma, to indicate which relay is switched on....

What transistors and relays would you recommend to switch the relays?

Sorry for the huge number of questions, I'm very new to electronics, but very eager to get something working.

Also to step up the PWM out from the TLC5940s to control the pc fans would I need different tranistors to those that will control the relays, to control the fans? and is there any way I can have say 5 leds for the fans to show different levels of fan speed. e.g 0% 25% 50% 75% and 100%? Again what resistors would be required?

Thanks again I really appreciate your help,

Andy


#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 06 January 2012 - 06:31 AM

Hi Mario,

This is the rating
SSR 3-32VDC 48-480VAC 25A DC 3-25mA
of the relays: http://cgi.ebay.co.u...em=270876146251

I am planning on using a 12volt power supply 1 Amp.

First question is, is this ok to go in to the netduino? I am going to make a spurto distribute it to the relay and LED unit.

Each relay needs at most 25mA for the driving led, thus you may use any NPN transistor such as the BC337, BC237, 2N2222, etc.
To limit the relay's led current, you should use a resistor calculated as follows:
RL = (12-2) / 0.025 = 400 Ohms
You may use a standard 390 Ohms, instead.
The "2" being subtracted from the 12V, takes account the voltage drop across the relay's led and the C-E leads of the transistor.
As you may see, it's a rough computation. However, it will work at 100%.

Also, I guess there's no problem to drive all the circuit with just 1A.
However, the very best thing to do is using a bigger supply, then test how much current the whole circuit requires in the worst condition. Afterward you can choose the right supply.

NOTE: you might use a car battery to test the circuit, which is capable of hundreds of Amperes. However, this would a *REALLY BAD* approach, because if you wrongly shorted any wire, the battery could melt it without any effort.
If you can, look for a lab power supply, capable of 2-3A, better with current limitation. If someone could borrow it to you, that's perfect.


### OFF TOPIC ### Leds... I need some really powerful LEDs for my the aquarium lighting, I want white, red, green and blue.

Ideally It would be equivelent to 2 of the ETT850 and 2 of the ETML850 from here.

Not sure if the 1 amp 12v will manage to supply all that?

Not sure to understand.
Are you going to create you own led strip?
The models shown are supplied directly from the mains, and are capable of dimming.
Not sure doing the same by yourself would be worthwhile...well, at least if the price is reasonable.


<br class="Apple-interchange-newline">Is there any tips on safely using the terminal block for spliting mains voltage?

Is there any suggestions on over voltage and surge protection?

About the terminal blocks, you can use them. I'd choose terminals with built-in holes for screws, then fix them to the box.
Since the box is metallic, *ALWAYS PROVIDE A GOOD CONNECTION TO THE EARTH GROUND*. Even in case any mains (hot) wire will detach from the terminal (e.g. for defect, shake, etc), the accidental touch to the box will blown the fuse or opens your safety-switch (I guess you should have).

The earth-ground, and the earth-ground only, should be connected to the ground of the logic circuit (e.g. Netduino).
This offers a better shock-hazard protection when, for instance, you have to plug the Netduino USB to a desktop PC.
However, the GOOD PRACTICE teaches that the very first wire to connect is the common ground.

A fuse is a old, yet good way to protect the mains load from any trouble.
An idea, maybe expensive, yet effective, could be using an UPS. You may find a good one for less than 100Eur: it provides short protection, overvoltage, safety, and much more. Also guarantees some life better to the fishes when you forget to pay the electric bill!
Pooooor fishes!
<br class="Apple-interchange-newline">

<br class="Apple-interchange-newline">And using the control logic from the shift registers which are powered from the netduinos 3.3v, and some 3mm leds 2.5v forward voltage @ 30ma, to indicate which relay is switched on....

What transistors and relays would you recommend to switch the relays?

Oh, I didn't take in account the visible led for the relays. But you may connect any LED in series to the relay's one: 12V are enough to power both, and the current is the same.
You can adjust the RL above, also placed in series, or leave the same value: I guess there's a lot of margin to make the things working fine.

SO:
  • from the logic, there's a resistor going to the transistor base lead: let's call it as RB.
  • I guess you chosen RB=1K, and it's fine. Not critical at all, though.
  • the transistor could be any one-penny NPN, such as BC337, BC237, 2N2222, etc.
  • the emitter lead is tied to the ground.
  • the collector lead goes to the resistor RL.
  • RL goes to the visible LED.
  • the LED goes to the relay's led.
  • the relay's led goes to the +12V.
Of course you may exchange the connection order of the last three wires, since they're in series.

<br class="Apple-interchange-newline">
Sorry for the huge number of questions, I'm very new to electronics, but very eager to get something working.

Also to step up the PWM out from the TLC5940s to control the pc fans would I need different tranistors to those that will control the relays, to control the fans? and is there any way I can have say 5 leds for the fans to show different levels of fan speed. e.g 0% 25% 50% 75% and 100%? Again what resistors would be required?


Thanks again I really appreciate your help,

Andy

Why using a TLC to control the fans? It's just an overkill: let's shoot at the fly using a bazooka!
If you're planning to use a Netduino to control the fans, just use any of its PWM outputs. BTW, if you prefer/want to discretize the speed over S steps (together with leds), the easiest way is using S OutputPorts.
Consider to use each out as a different "percentage": to drive the led is trivial.
Also, you can take advantage of any of the outs because they're actually act as small "power supplies". I mean: when the output is off, the voltage is zero, otherwise you have 3.3V.
Well, without entering in details at the moment, you can create a simple transistor-driver for the fan, which will have speed regulation.
Let me know what exactly are you going to do.

Cheers
Biggest fault of Netduino? It runs by electricity.

#5 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 19 February 2012 - 09:46 PM

Hi,

I have finally had chance to get back round to the relay enclosure, I have now done most of the metal work and have started the mains side wiring, just need to order the components for the control board and the output IEC sockets now, which ties in nicely with my ordering for my LED driver components.

Just to recap, the aim for the enclosure is to control 6 ssr relays, using a 12v 1a supply, 2x 12v 20ma fans and 6x 12v LEDs (they are prewired with resistors and diodes).

I had a thought and wanted to know what your thoughts were...

I thought it might be a good idea to have the option to set the relays to normally open or normally closed using 2 sets of transistors for each relay and then using some jumpers to switch between them.

This is because some of the equipment that is critical to support life in a tank may need a fail safe if the control board fails, or something gets unplugged etc, so as a fail safe these could be set to normally on e.g. pumps and heaters.

Also I wondered if you think I need any more protection, the mains in is a 10amp rated, switched, fused IEC socket. Also each of the output IEC sockets will be 10amp rated and fused.

I am keeping all the mains wiring inbetween the 2 heatsinks and I wll then separate the mains from the low power with some blank pcb. All mains connections will use crimp connectors and have heat shirnk around them.

I am using the wago terminals to safely split the mains between the 6 relays and the earth and neutral between the 6 IECs.

The mains cable is 2.5 guage and I will ground the case.

In terms of cales from the aquarium controller, there will be the 12v power and a ground, 6 logics, a ds18b20 connected to the 1-wire bus and pwm for the 2 fans from 1 of the netduino pwm pins.

So questions....

Is there any additional protection you would recommend? Over voltage, over current, surge, isolation of low and high power, isolation of mains from the enclosure etc?

What would you recommend component wise that I need for the switching the relays with the jumper option for normally open or normally closed and taking in to account the status LEDs that have resistors and diodes already (they are blue 5mm so prob 20ma drop?)

And also components to control the fans (I'm now thinking both from one netduino pwm pin)?

I'm hoping this part of my project should be up and working very soon :) I just have 2 more holes 2 cut for the fans (the case is very tough steel and is hard work) and also I need to drill through the base in to the heatsinks to screw them in to place as well as drill a hole to ground the case.

In terms of transistors will these do the job as I already have these on my shopping list for the LED drivers:

PNP

NPN

Will I need some fets for the fans?

I have these on my shopping list already if you think these will be any good?

First option

Second option

Thanks again for all the help, I could really do with some guidance in terms of resistors as well and any protection that is a good idea for the low power cicuit.

Many thanks,

Andy

#6 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 21 February 2012 - 11:44 PM

Here is another picture, I have wired up most of the mains voltage side, as you can see in the picture the wago terminals split the mains, I am yet to get my fused IEC sockets for my output and I need a crimp set to connect the wires to both the fused, switched IEC in socket and the 6x IEC fused output sockets.

As I said I need to drill a hole for the case ground and the 2 fans, now its on with the control board :D

Posted Image

#7 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 25 March 2012 - 12:28 PM

I've finally ordered what I hope are the last few bits for my relay enclosure (other than some spray paint to sort out that brown/cream paint job). So in the next week I should have my fused IEC sockets for the output from the enclosure and I have also ordered a load of generic PNP and NPN transistors which I hope to use to switch the display LEDs and most importantly, the relays, on and off as well as the fans. What I could really do with a little help on is working out what resistors I will need. So I can see there being 3 seperate combinations of circuit. The first is: 12v supply >> NPN transistor (switched by netduino logic from 74hc595s) >>> Some resistor >>> 12v LED prewired with resistor >>> SSR relay (25ma current drop) The second: 12v supply >> PNP transistor (switched by netduino logic from 74hc595s) >>> Some resistor >>> 12v LED prewired with resistor >>> SSR relay (25ma current drop) Finally the fan: 12v supply >> NPN transistor (switched by netduino logic from 74hc595s) >>> Some resistor >>> 12v PC fan I can't get any spec's for the LEDs however I do have a multimeter if anyone can tell me how I can measure the voltage drop/ current drop? Finally I plan on using a 12v 1a power supply. Hope you can help, Andy

#8 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 21 April 2012 - 02:19 PM

Hi

Just thought I would give a little update on the enclosure...

I have now done all of the mains wiring, all the IEC are connected up and now just need glueing in place. I have used 2.5mm solid core cable for all of the mains and each is terminated at a WAGO block or with a sheilded female spade crimp connector and heat shrink. Each IEC output socket it fused, as is the switched input socket, hopefully this will provide some basic protection. I may also introduce some surge/over voltage protectors for each output or alternatively just the poer input, but this will come later.

It terms of what is left to do, I need clean the case up and respray it obviously, I need to cut 2 holes for the fans and attach fan grills to them with filters behind and attach a case ground. That really rounds of the enclosure itself. The final thing which is one of the most important is the control board which I am just scoping out a circuit for. This will have a temperature probe, and transistor switches for the 6 relays and leds. Also the fans will be controlled from here as well. Control will come from 6 shift registers outs and 2 pwm channel, the temperature probe will supply data back on the 1-wire bus.

Pictures:

Posted Image

Posted Image

Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.