Author Topic: N channel MOSFET voltage reading issue (solar charge controller)  (Read 5940 times)

0 Members and 1 Guest are viewing this topic.

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
N channel MOSFET voltage reading issue (solar charge controller)
« on: September 13, 2015, 05:44:25 pm »
Hi all,

Before I begin I am a bit of a newbie in electronics compared to some of you on here so I hope you will be patient with me!

I'm designing my own PWM charge controller using an Arduino (ATmega 328p). My original working design used a P channel MOSFET to switch the solar panel and battery. This was great as it was common negative and that means I can measure the voltage on both the solar panel and battery side with separate voltage dividers no problem.

However its throughput was low (3A max) so to get more I am now going to be using an N channel MOSFET. As a result I have the problem now of having a common positive instead, and that is where my problem lies. I can measure only the one side otherwise I cause a bypass of the MOSFET by tying the negatives together.

I'm wrecking my head trying to think of a way around this and so far I've got myself nowhere. I was hoping someone here has had this issue before and could advise on an approach?

Thanks in advance.

Andy
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 525
  • Country: dk
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #1 on: September 13, 2015, 07:46:53 pm »
Not to blow my own horn, but I was in a similar soup a while ago and this was my question. The thread contains a very nice detailed explanation by lewis,
others too  :)


https://www.eevblog.com/forum/chat/measuring-voltages-without-common-ground/msg189421/#msg189421


I hope this answers your question and help you cross the bridge faster than it took me.
If god made us in his image,
and we are this stupid
then....
 

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #2 on: September 13, 2015, 09:31:16 pm »
It didn't fully answer my question but I think I know where it's going - basically use another reference as a ground for the divider and a bit of math to work out the second voltage from? Or am I getting that totally wrong? (newbie here, sorry!)

Thanks for your reply :)
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 525
  • Country: dk
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #3 on: September 14, 2015, 05:37:14 am »
Not exactly, but something on those terms.
basically, there are two parameters we need to understand - Battery voltage and solar panel voltage.


To quote lewis, (and the picture in the quoted thread)
For a given battery voltage - as the solar panel voltage drops, the A2D converter input voltage increases and vice versa.
To a certain extent. It increases till the diode starts conducting and clips the voltage to the supply voltage of the A2D.


Now the exact voltage increase and the actual voltage is given by the two resistance divider networks. and the voltages of the battery and panel.
Run it through a simulator for a test case to understand it better. Thats what helped me understand.
 :)

If god made us in his image,
and we are this stupid
then....
 

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #4 on: September 14, 2015, 05:23:15 pm »
The solar panel voltage will be about 19-21v open circuit and the battery is a 12v 50Ah SLA.

I understand the base concept now but I'm still unsure where to put the dividers in the circuit as there still has to be some commonality in the grounds? I must still be misunderstanding something.

Why oh why can't there be decent P channel MOSFETS so I didn't have this problem?  ;D

I don't have any simulator software to hand except for something called 'Circuit Wizard' and I'm not sure I'd trust it too much! (if you could recommend a free one that is quick/easy to learn that would be a great help).

Thanks again for the replies.
 

Offline sain

  • Newbie
  • Posts: 3
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #5 on: September 15, 2015, 03:07:56 am »
any reason why you don't use a high side driver chip?  That way you can keep your common ground, and just treat the n-channel mosfet like a p-channel (sort of).

Something like a LM9061 or a MIC5018 might do the job.  I have not actually checked the data sheets to see if either would do the job for your application, but there are plenty of high side mosfet drivers available.  check element14 or digikey.
 

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #6 on: September 15, 2015, 06:00:50 pm »
I'm not that far into electronics yet really which is the reason I hadn't considered it. That and the fact that I want to use as few components as possible (cost and complexity wise) as well as keeping power requirements as small as possible given that this is for a solar powered project (probably not an issue given the two examples you gave which use only uA of current).

My biggest problem is not knowing which components to choose that go well together too - always a tough one, sometimes for the experts too I expect.

The other issue is I want to work with through-hole components only. My prototyping skills don't span as far as surface mount yet, nor do I have any way to simulate or build my projects for them to be done professionally.

I am only a hobbyist at the end of the day, I do this for fun and to build things to suit a certain task for personal use only.

If it helps you to help me, the MOSFET I intend on using is an FQP30N06.

Thanks to all again.
 

Offline jay

  • Regular Contributor
  • *
  • Posts: 62
  • Country: ee
  • Coder
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #7 on: September 16, 2015, 03:28:04 pm »
However its throughput was low (3A max) so to get more I am now going to be using an N channel MOSFET.

I don't think the throughput was limited because you had P-channel MOSFET. A good old IRF4905 has 0.02Ohm resistance when it's on and it's not spectacular in anyway. Sure an N-channel gives you even better, but something else was the limiting factor.

Quote from: andywhy
As a result I have the problem now of having a common positive instead, and that is where my problem lies. I can measure only the one side otherwise I cause a bypass of the MOSFET by tying the negatives together.

I'm not 100% sure I understood your problem right, but see attached picture.. If you're measuring the panel voltage with an ADC it's easiest to do a voltage divider between the common positive and the negative of the solar panel. ADC sees a decreasing voltage when panel voltage increases, but the code to convert it back is just one line.

Quote from: andywhy
I'm wrecking my head trying to think of a way around this and so far I've got myself nowhere. I was hoping someone here has had this issue before and could advise on an approach?

Don't worry.. you'll figure it out. It took me some time |O to get this stuff right. It gets messier when you want to get rid of the blocking diode.

I've made couple of revisions of my own solar charger controller. Learning power electronics things was part of the motivation, but another reason was that the commercial charge controllers have relatively high quiescent current, that became a real issue, because during December there basically is no sunlight at all here and very little in November and January (the installation is located 64 deg North). That combined with the fact that batteries perform poorly in low temperatures I got much better results with my own design, that wastes only 100µA during darkness. The best commercial option I've found for this unusual requirement was around 10mA (factor of 100 difference!). In my application the average load is 1-2mA with 2A peaks when it activates (very rarely). One solution would have been a very big battery but it was physically impossible in my application.

SW engineer trying to design HW because it's more fun.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #8 on: September 16, 2015, 03:52:13 pm »
There is a problem using high side drivers, they have to go to common/ground before the bootstrap can work.  with the FET sitting on battery voltage, that can be difficult at times.  I had a lot free Li batteries and ran my system off bootstrapped batteries.   At arduino PWM speeds a simple opto isolator/resistor high side driver is fast enough.  I run a 36V string (52V power point) and run common electronic 100-240V wall warts to provide power to high side drivers.  A simple and cheap solutions. Dump your 12V array as soon as possible and go to at least a 36V string.
 

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #9 on: September 16, 2015, 04:59:55 pm »
I've made couple of revisions of my own solar charger controller. Learning power electronics things was part of the motivation, but another reason was that the commercial charge controllers have relatively high quiescent current, that became a real issue, because during December there basically is no sunlight at all here and very little in November and January (the installation is located 64 deg North). That combined with the fact that batteries perform poorly in low temperatures I got much better results with my own design, that wastes only 100µA during darkness. The best commercial option I've found for this unusual requirement was around 10mA (factor of 100 difference!). In my application the average load is 1-2mA with 2A peaks when it activates (very rarely). One solution would have been a very big battery but it was physically impossible in my application.

This is exactly one of the reasons I wanted to do it too, except for I also wanted to have a screen with my own layout. It's actually for a portable power box that I use for camping so I need to monitor it whilst we're there too (picture of current design attached). At home its used for low power stuff as well. By no means is it suitable for 230v applications for any length of time as it only has 30w of solar panels attached right now (80w planned though).

It uses about 2mA at night and 6mA during the day. I could reduce this to under 1mA at night by turning the backlight on the screen off, and reduce during the day too as it brightens up for daytime use.

I'll give your idea a try with the ADC over the common positive and solar panel negative and see how that goes. It's easy enough to reverse the order in the Arduino's code I suppose!

Thanks again all, you've been super helpful and I really appreciate it. I may be back for more help soon :)
 

Offline andywhyTopic starter

  • Newbie
  • Posts: 9
  • Country: gb
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #10 on: September 16, 2015, 05:54:15 pm »
Right then, first off apologies for the double posting. Hopefully I've done this circuit right!

You'll have to excuse my crude circuit diagram. It comes straight from the program I use which has basic simulation built into it. I've built the basic circuit with both ADC's and it seems to agree with my expectations.

Would anyone mind having a quick look over it, especially the polarities of my measurements etc as I don't want to find out I'm going to have a negative voltage going to my ADC by accident, and just confirm if it looks good?

(Excuse the crude battery being a capacitor too, I needed something it could simulate charging/discharging!)

Many thanks again to all.

Andy
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1962
  • Country: us
Re: N channel MOSFET voltage reading issue (solar charge controller)
« Reply #11 on: September 16, 2015, 08:04:36 pm »
I'll let someone else comment about your schematic.  Here is a rather poor file photo of a power point converter that is used with a uno.  Just FET, opto isolator, resistor, diode, and transformer used as an inductor.  You can make a nifty power point charge controller just out of one or two of those little 2596 buck converter boards and a uno too.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf