Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Power Distribution Circuit

Status
Not open for further replies.

CGlass08

New Member
I have decided to design a new HVAC control system for my house. The main PCB is going to replace the thermostat in the wall in my home. Therefore, I want the 24V coming out of my wall that has been powering my current thermostat to power the new one. I want it to be pretty much plug and play so I have decided to put the relays on the board, much like the guy has done in the following link... MGDEngineering.com - HVACMontior: A stand-alone, web-accessible thermostat.

I have been able to connect the devices together, but am not sure about the design of my PCB as far as power distribution. The first attached image is the components going on my PCB and their corresponding voltages and current draws / other applicable information about the parts I have tentatively selected, and the second image is the circuit I have come up with to provide the correct power to all of these devices.

The output of my board is going to be 24V AC controlled by relays. Much similar to the project done by MGD Engineering shown in the link. There needs to be 10 of these relays for my system, and there is a possibility they will all be turned on at the same time.

On the circuit diagram, the two wires coming out of the wall are on the left. I know they need to be full wave rectified by the four diodes (D1 - D4). I have been told (by an A/C guy that I know) that there is usually 40W on the 24VAC hot coming out of the wall. So going with that I figured that P = V*i so plug in numbers 40 = 24*i and find there is 1.67 Amps on this input. This is where my first uncertainty occurs. I currently have the 24V AC line coming up and out (in parallel) from the input to the contact of the relay. I am not sure if this is correct and also not sure how to calculate how much power these will draw in a state where they are all turned "on". I want to calculate this power to make sure there will be enough power left to run my other PCB components. I am fairly sure 40W is plenty, seeing as most of my devices run in the mW range but I would like to be sure before sending the PCB out for fab. Also, at some point, none of the relays will be turned "on" so I want to make sure the diodes in the bridge can handle the 1.67A.

Next problem is the smoothing capacitor (C1 in the circuit). I have read a lot about AC to DC conversion and understand the point of the smoothing capacitor, but have not been able to find a way to calculate the value that I need for this part.

I think I have found applicable voltage regulators and was able to get values for C2, C3, C4, and C5 from data sheets.

Onto the output. The microcontroller I am using has I/O pins that output 4mA at 3.3V. I have read about this as well and think that using a Darlington array is the way to go. The relays I have found have a coil voltage of 3V, coil current of 73.3 mA, and coil resistance of 40Ω. I have the common of the ULN2803 Darlington array connected to my 3.3V regulator output, but I am thinking I might need at least 1 more of these regulators because they only output 800 mA. I have one side of the coil connected to the corresponding output of the ULN2803 and the other side connected to the 3.3V source (I only drew the connections on a few because I did not want the drawing to get sloppy). I am not sure if these connections are correct.

This is my first attempt at an electronics project and I am enjoying doing it, just a little stumped on this power distribution. I have done serious searching on the internet but and stumped and have turned to this forum as a last resort, as I have read other useful information here. Thank you in advance for any assistance!
 

Attachments

  • 001.jpg
    001.jpg
    334.3 KB · Views: 223
  • 002.jpg
    002.jpg
    500.2 KB · Views: 295
If there are two and only two wires exiting your wall there is a good possibility that the 24 VAC you are reading is not quite 24 VAC as imagined coming directly from a transformer. The old thermostat served as a switch in series with a solenoid or other device at the furnace, the thermostat being part of a series circuit and closing when calling for heat. Systems with Heat / Cool (heating and central air conditioning) typically have 4 wires exiting the wall.

If using a meter to measure across the two wires you read 24 VAC that could be because you are reading through one side of the control transformer and the solenoid coil going to the other side of the control transformer. Take a close look at how the original thermostat was configured.

Ron
 
Sorry for the confusion, I was referring to the 24V Hot and 24V common coming out of the wall. There is also wire for 1st and 2nd stage heat, cooling/compressor, blower/fan and reversing valve all coming from the wall. I was assuming the heat, cool, fan, and reversing valve wires would connect on the contact side of the corresponding control relays. Is this the case?
 
Why a dsPIC when almost any old PIC would work? Where's the temperature sensor? How does the PIC communicate?

PS you need snubbers on the relay contacts. 47ohm & 0.1uF is common.
 
Last edited:
I was able to get the dsPIC for free so that is why I am using it. I only drew my Vcc lines for simplicity on that sketch. On my Eagle schematic I have everything connected as far as communication goes (I2C, SPI, and UART). I am just trying to get the power distribution aspect of the board layout buttoned up right now. Thanks for the responses. I will do a little research on snubbers for the relay contacts, but as of now I do not know what you are referring to.
 
You'll need a programmer for your dsPIC, plus PICs are cheap I'd recommend a simpler to use 18F series (the 18F4620 is overkill) as PICs are cheap. Unless you're really handy with C I'd probably aim for BASIC (again the 18F have a wonderful BASIC called Swordfish)

Another problem might be your ULN2803 has a 1.4V drop across the darlington collectors. Your relays will only see 1.9V that may not be enough to energize them. Use 12V relays instead.

Plus the 7805 will not like the 33VDC you're supplying it with. It'll run hot as anything even with a teeny tiny load. Same for the 3.3V (use the 5V output for that regulator)

Keep the temperature sensor off the PCB as the surrounding circuitry will affect it.

Here's a typical snubber.
10.3.1 Pinouts
 
Last edited:
I was also given the microchip development board along with compiler/debugger so I am set on that (I am confident in my C).

How are you finding the 1.4V drop across the darlington collectors?


I thought I was supplying both regulators with 12VDC since it's half of the original 24VAC sine wave?

Thanks for the tip about the sensor.
 
24VAC through a full bridge will multiply the voltage by 1.414

Darlington pairs generally have a drop of 0.7V x 2 (two transistors each with a 0.7V drop worst case)

You should check the 2803 datasheet. 1.1 - 1.3V is a usual Vcesat value for darlington transistors. For low voltage drop, use MOSFET.
 
Last edited:
Ok, I see now that there is a Vce of 1.3V max. Since my coil resistance is 40 Ohms and the coil current is 73.3 mA this won't work since 1.9 / 40 = 47.5 mA.

Since I don't want to supply the 5V or 3.3V regulators with 33VDC, but I need these low voltages to power my components, what secondary step do I need to take between the 33VDC level and the low voltage level? Some sort of middle voltage regulator? Or is there something I am missing?
 
Yes, it is a school project, and we have ordered most of our parts and the dsPIC, the 802.11b, and the 802.15 components we ordered all have Vcc = 3.3V.
 
It looks like your schematic and current chart are in conflict. From the picture from MGD they use 5 volt relays. If that's the case you are okay with the darlington as the relays are speced to pull in at 3.75 and the darlington drops 1.1 volts at 100ma. If you in fact have 3 volt SLA relays you could power them off of the 5 volts and add a 15 ohm resistor in series with each relay.
I can see why you want to power the whole thing off the 24 volts so what you are going to need is a small switch mode regulator to develop the +5 volts. Then you can use an LDO to get the 3.3 volts. I would take BRE's advice on the snubbers across the relay contacts - nothing worse than noise and micros.
 
Thanks for the responses and for bearing with my inexperience.

RonV, what do you see that is conflicting in between my schematic and chart?

I am locked into using relays that have a 3V coil voltage and 73.3mA coil current. I have been looking at how I need to deliver this to the coil. My output when the uC I/O pin goes high is 4mA at 3.3V.

I think I can use a P2N2222 transistor. I am going to say B = 25 to keep it on the small side to be safe. I know I need my Ic to be 73.3mA so I'm going to call it 100mA again to not do the bare minimum. Since Ic = B * Ib, I get Ib = 4mA which is what my high output is for the I/O pin. The attached .bmp is what I think the connections should be if this train of thought is correct. I am not sure if the top of the schematic should be connected to 3.3V or 5V? Thanks again for the assistance.
 

Attachments

  • relaydrivingcircuit.JPG
    relaydrivingcircuit.JPG
    19.8 KB · Views: 145
I was just making sure about the relay voltage. They were in the 5 volt column on your chart for current and the MGD picture shows 5 volt relays so Just making it sure. I think I would stick with the darlington chip but run the relays from 5 volts and add a 15 ohm resistor to each relay to drop the extra voltage when running off of +5. The darlington is small, cheap, and has the diodes and resitors built in. If the parts bin were empty (which it isn't) I would use the 5 volt relays.

What have you decided on the voltage regulators?
 
This is what I have come up with for the output of the PIC to the relay coil. I am thinking, (3.3 -Vbe) / 4mA = Rbase. With Vbe = 0.7, I get that I need an Rbase = 650Ω.

For the transistor, should I use individual transistors, or go with an array?
 

Attachments

  • relaydrivingcircuit2.JPG
    relaydrivingcircuit2.JPG
    20.6 KB · Views: 157
Maybe I am lost but why is he using the ULN2803 AND PNP transistors. Could he not just use the ULN2803 w/o the extra transistors. I would forget the relays and go with MOSFETs
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top