Author Topic: Source Switching Circuit  (Read 1086 times)

0 Members and 1 Guest are viewing this topic.

Offline mtotriTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Source Switching Circuit
« on: April 03, 2019, 03:05:31 am »
So I'm doing a project for a smart grid class where we are designing a circuit where loads can switch between two power sources - specifically a solar panel feeding a 12 volt battery as one source and a constant DC power supply (modeling "the grid") as the other. We want to be able to switch in between the two sources using our microcontroller.

I'm trying to decide what the best hardware switch to use is for our purposes. We're going to have 10 loads in parallel. The load will consist of a high rated power resistor and a high powered LED.

We were planning on using a MOSFET, and deciding whether a PNP or an NPN would be best. Since each leg has one load, and is switching between either sources, we modeled the switches as being on the high side above the load (see attached drawing). As I learn more about MOSFET circuits, the gate voltage needs to be a certain level. The microcontroller we're using (an mbed lpc1768) can only provide 3.3V on the output pins Since the sources are at 12 V, this becomes a problem. For a PNP, it needs a gate to source voltage of somewhere around -2 to -4 volts, meaning (I think) we would need between 8-9 volts on the gate to open the switch. So would it be best to amplify the gate voltage to reach that level? Or just an entirely different switch? or possibly a relay?

I'm hoping someone can see the picture I posted and come up with the most efficient and simplest solution for controllable switching so we can move forward with the project.

Thanks!

(also some of my assumptions or descriptions may not be perfect... feel free to correct/instruct)

- Attachments and other options
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Source Switching Circuit
« Reply #1 on: April 03, 2019, 04:02:52 am »
You might think about using P-channel devices if you want to switch on the high side.  All you have to do is pull the gate down.  Think in terms of using an NPN transistor to pull the gate down.  When the transistor is off, the gate is pulled high through a resistor.  When the transistor is on, the gate is pulled low through the transistor.

You will only need about 1V to turn the transistor on so I would probably add a 330 Ohm resistor between the LPC1768 output and the transistor base.

http://electronics-diy.com/electronic_schematic.php?id=1012
 
The following users thanked this post: mtotri

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7473
  • Country: ca
Re: Source Switching Circuit
« Reply #2 on: April 03, 2019, 04:17:23 am »
A P-ch mosfet high-side switch needs a level-translator transistor, otherwise the gate goes up to 12V which would damage your MCU.
Relays click and can make people understand switching operations better, during a demo when they hear it. It's whatever you prefer.

Why don't you include the (third) grid-tie option whereby the solar source feeds power back into the grid?
 
The following users thanked this post: mtotri

Offline mtotriTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: Source Switching Circuit
« Reply #3 on: April 04, 2019, 01:45:03 am »
Update on our project: one of our group members figured out a solution. We're using a n channel MOSFET on the low side of the load. Now the positive terminals of both sources are on the same node, they both run through the load, then they each have a MOSFET with the source pin (of the MOSFET) connected back to each individual power source's negative terminal. So essentially we have two separate grounds now.

The other problem becomes the microcontroller sending the gate signal having a common ground with the source. I was talking it over with someone today, and I know we need to hook up the grounds together so they share a common reference ground. But I believe we need to put a large resistor between the ground of the microcontroller and the negative terminal of the sources (especially the battery) in case we get any leakage current on the ground node from the negative terminal of the source to the ground of the micro controller. Does this make sense and is it the best approach?

Also, to answer floobydust's question about the grid-tie option, the way we have things planned out right now is 2 of the loads are in the home, and 8 of the loads are in the grid. So our feeding back to the grid option will be switching 1 of the 8 grid loads to the solar source. Because the grid supply is a constant DC power supply, so ya can't really feed the battery to that. Our way of feeding power back to the grid is by powering grid loads. That's why each load has two switches - one for each power source so it can be powered by both.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf