# Will this work with N Channal MOSFET ?

Discussion in 'General Electronics Chat' started by San fr, Jun 6, 2016.

1. ### San fr Thread Starter New Member

Jan 20, 2016
4
0
Respected members and forum moderators,

My question might be a silly one as I am a total beginner in electronics and started learning from internet and by building little circuits so please bear with me.

I am trying to charge a 6v 4.5Ah sealed lead acid battery with 12v DC, 2 Amps power supply (I will reduce the voltage upto 7-8v later on)& a 100ohms 2watts resistor connected to positive terminal of the battery.

A Microcontroller will control the charging of the battery there by switching the current source to it On/Off at predefined voltages.

As N channel MOSFETs are generally interfaced like the image below...

Could we take the LED out from the circuit and directly connect the positive and negative terminals of the battery at that place? I know I can use a relay but what if we do this way?
Like the image below...

Kindly guide me,
Regards

2. ### ericgibbs AAC Fanatic!

Jan 29, 2010
2,599
394
hi San,
The N MOSFET will be either On or Off, as you have a 6V SLA battery across a 12V supply is a bad idea.

E

3. ### AlbertHall Well-Known Member

Jun 4, 2014
2,278
450
Your hand drawn circuit will work. The charging current will be limited by the 100 ohm resistor:
Charging current = (PSU voltage - Battery voltage) / Resistor value
= (12-6) / 100
= 60mA
Power dissipated in the resistor = (PSU voltage - Battery voltage) ^ 2 / Resistor value
= (12 - 6) ^ 2 / 100
= 0.36W

 Your first diagram shows an LED in series with where the battery would connect. This is a bad idea - most LED's would be damaged by 60mA.

San fr likes this.
4. ### crutschow Expert

Mar 14, 2008
13,508
3,384
What type of switch will be controlled by the μC?

5. ### BobTPH Active Member

Jun 5, 2013
807
121
Presumably the MOSFET switch.

Bob

6. ### crutschow Expert

Mar 14, 2008
13,508
3,384
Thanks for tying to answer my question for the OP with an obvious answer but that was not my question.

He has a switch shown in his diagram that he says will be controlled by the μC and I wanted to know what that switch represented.

7. ### San fr Thread Starter New Member

Jan 20, 2016
4
0
Thanks a lot AlbertHall and other members who made an effort to solve my question.

AlbertHall's reply gave me a positive energy to work in the direction that I assumed to be correct, Hence I tested the circuit and it indeed works correctly as far as the charging of battery is concerned.

But there's a problem microcontroller is unable to read the voltage of battery as negative terminal of the battery is not directly connected to the same Ground that connects the microcontroller.

So to solve this I think instead of a N channel MOSFET I need a P channel MOSFET.
Now the diagram looks like this...

I apologize for my bad drawing, I replaced switch in this diagram as it created some misunderstandings to a few members & I am extremely sorry for that.
Now there is a jumper wire "A" (in place of switch) that connects to an I/O pin of the microcontroller.
Jumper wire "B" connects to ADC pin of the microcontroller for voltage reading purpose.

I haven't yet tested the circuit as I am waiting for the P channel MOSFET to come. I hope this works...

8. ### BobTPH Active Member

Jun 5, 2013
807
121
Your first circuit was correct. The second one will not work. With the P channel MOSFET, the gate is referenced to +12V. If you micro is putting out 0V for off and 5V for on, that will be -12V or -7V to the gate, each of which will turn the MOSFET on.

Bob

9. ### AlbertHall Well-Known Member

Jun 4, 2014
2,278
450
Agree the micro cannot control the p channel MOSFET directly. But you could do it with an NPN transistor - emitter to 0V. base to micro via a resistor (10k?), collector to the MOSFET gate and the 1k resistor to +12V. You were talking about reducing the 12V later but that will be difficult/impossible using the p channel MOSFET as you will not get sufficient drive to the gate.

Your first circuit could still work. You connect both the battery positive and negative terminals (via potential dividers as the micro cannot cope with 6V or 12V!) to two ADC channels and read both voltages and take the difference. Of course you need a spare ADC channel for this.

Ya pays yer money and ya takes yer choice.

10. ### San fr Thread Starter New Member

Jan 20, 2016
4
0
Thanks both of you for correcting and giving suggestions.

11. ### San fr Thread Starter New Member

Jan 20, 2016
4
0
I did exactly u suggested but unfortunately it didn't work.
But anyways I am working on different ways to solve the problem.

With deep feeling of respect and gratitude I am once again thankful to all the member who contributed in this thread.

Regards
San