2
\$\begingroup\$

enter image description hereThis is my first REAL project and i need some help.

I'm working on a project where I am trying to design a PCB for controlling the environment inside an enclosed cabinet to grow a tomato plant using hydroponics (cannot use the arduino dev board). I plan to use the atmega2561 as the MCU, with multiple sensors to read information, and relays to trigger on fans and lights. Here is where I run into problems, I need 12volts, 5volts and 3.3 volts coming from the same board to power these components. I will be using an AC-DC converter to provide 12volts to the board, but how do I distribute these required voltages to the other components?? here is a list of what i plan to use

  • 12Volts : 3 peristaltic pumps and 3 relays(will be using ULN2803 to connect these relays to the MCU.
  • 5Volts : MCU, EC sensor, water level sensor, pH sensor
  • 3.3 volts : temperature sensor, xbee module

I used TIwebench and exported the designs into eagle but still confused on how to implement them to my design.

Thank you!

\$\endgroup\$
  • 2
    \$\begingroup\$ Estimate the power you need for each rail, do some heat and efficiency requirement estimates and, depending on that you make a choice for linear downregulation or some smps \$\endgroup\$ – PlasmaHH May 22 '15 at 13:15
  • 4
    \$\begingroup\$ You might want to consider making two or three 5V supplies- one for the MCU, one for the relays and maybe one for the sensors (especially if the 5V runs off-board somewhere). You really don't want the MCU running off the same supply as relays if you can avoid it, particularly power relays. \$\endgroup\$ – Spehro Pefhany May 22 '15 at 13:27
1
\$\begingroup\$

First I'd move as much of the 5 V stuff to 3.3 V as possible. That is easy for the microcontroller and relays. Even if you still run the water level and pH sensors from 5 V, the current draw will be small.

Given the above, the 12 V you receive gets used directly for the pumps. Just a 7805 can make 5 V from that. Since the current draw from the 5 V supply will be low, no heatsink should be required. Use a off the shelf buck switcher chip to make 3.3 V from the incoming 12 V. There are many to choose from in this voltage range and current. For low voltages like this, I'd probably start at Microchip, then ST, then TI, although chances are good Microchip has something suitable.

Added

Above I was trying to minimize the current requirement for the 5 V supply so that a simple linear regulator was used. My thought process was to therefore move as much as possible from 5 V to 3.3 V. However, a better answer is to move the relays from 5 V directly to the 12 V input power. 12 V is a very common relay voltage. Most likely, whatever 5 V relays you are using come in 12 V versions too, in the same package and with the same switch contacts. These can be easily driven from 3.3 V logic outputs using a resistor, low side NPN switch, and kickback catch diode per relay.

This means you probably only need a few 100 mA at 3.3 V, which gives you many options for buck regulators with integrated switches.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Would I be able to connect all the loads to the same output of the regulator? for example, would i be able to connect all the 5V sensors to the same 5v output??? \$\endgroup\$ – Eric V May 22 '15 at 13:35
  • \$\begingroup\$ @Eric: Yes. - - - \$\endgroup\$ – Olin Lathrop May 22 '15 at 13:59
  • \$\begingroup\$ Would i still need the NPN switch and kickback diode(i read one called flyback) if i use the ULN2803?? I will post my schem in the first post \$\endgroup\$ – Eric V May 22 '15 at 14:25
  • \$\begingroup\$ @Eric: Those ULN drivers are darlington if I remember right, so they drop a lot of voltage. That should be OK for 12 V relays, but you may run into problems if you use lower voltage relays. A diode is still needed somewhere. Some chips have integrated diodes, which requires them to have a connection to the power supply that the top of the relay coil is connected to. Read the datasheet. \$\endgroup\$ – Olin Lathrop May 22 '15 at 14:33
  • \$\begingroup\$ The chip you posted is basically the circuit that Olin recommended inside a single package. Would be perfect for the 12V relay option but the datasheet says that 12V is the minimum coil supply. You should try to find some application notes for the IC of your choice, if possible. \$\endgroup\$ – scld May 22 '15 at 14:33
0
\$\begingroup\$

If you don't care about price, which should be case for your first board, don't design dc/dc by yourself, take modules.

If you really want to design them, instead asking here, read datasheets. All of them, of all components, including resistors. It will take a week, but it's worth it, it's for the rest of your career.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Im using Tiwebench to design the DC/DC \$\endgroup\$ – Eric V May 22 '15 at 14:21
  • \$\begingroup\$ If you're already spinning your own board, adding some simple DC/DC converters is not a huge pain. Many DC/DC converters, especially TI ones, come with good application notes. You can also download the gerber files of the demonstration boards to get a good idea of proper layout from the vendor themselves, as a starting point. \$\endgroup\$ – scld May 22 '15 at 14:26
  • \$\begingroup\$ @scld- yea I was taking a look at those as well, was just confused if i was able to connect all my 5v loads(sensors and MCU) to the same output of the regulator, i guess thats why they specify currents. \$\endgroup\$ – Eric V May 22 '15 at 14:32
  • \$\begingroup\$ Yes, don't forget capacitors near your loads. \$\endgroup\$ – Gregory Kornblum May 22 '15 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.