Some suggestion implementing switches [Mosfet drive]

Thread Starter

camp0s

Joined May 1, 2009
6
Hi, I am wondering how can I correctly realize this small demo circuit for school using mosfets in place of switches [1..3].



I came up with this: I would lights some LED using main power and, when main power goes off, the battery should take over and keep lights on. When main power is restored I keep the lights on and I can also charge the battery without extra devices (fixed ON state for sw1, playing with PWM on sw1 and LEDs are PWM-dimmed too by sw3, no resistors for them).

Easy to say, straight to think.. less to realize. I'm focusing at the moment on the switches implementation (assumption: I'm not worried at all by programming the logic inside a PIC, I can read currents flowing along the three wires (uhm, insulated inductive sensor), and I can read voltages at the three main devices, PIC's power and (hypotetical) driver power is assured anyway) :

_ if I would use N-type mosfets, I could use a generic driver, (like ir2101 and similar), then I should generate somewhere 9+10[V] to power the gates to turn them ON/OFF (signals will be PWM like, I want to control CURRENTS, not just opening paths). But I need to generated this kind of voltage.

_ with N-type again, I could move the mosfets putting their source leg to ground, so they would became easyer to drive, but (from my feelings) I don't like cutting ground connection here and there..

Do you have any suggestions? example and direction on how to think about it? I cannot find a lot of explanation on how to dispose and drive mosfets without the look and feel of "black" magic art..

Thanks! ;)

[absurdity]If I would use relays in place of the 3 switches, and directly control them..but they won't keep up with the PWM! :eek:[/absurdity]
 
Last edited:

mik3

Joined Feb 4, 2008
4,843
You can use relays for sw1 and sw2. To PWM the leds use a BJT or a logic level MOSFET but place it between the led string and ground.
 

Thread Starter

camp0s

Joined May 1, 2009
6
Uhm, i cannot use relays in place of sw1/2 because when I want to charge the battery I won't be able to control/limit the flow of the current via PWM control schema. :(
 
Last edited:

Thread Starter

camp0s

Joined May 1, 2009
6
Ok, but at this point we are like the beginning of the thread :) - I've only vague ideas about mosfets, while I tryed something with n-type, I also managed to *pop* some drivers, smoke some other components and see others not switching at all.. :(

And there also exist p-type mosfets, which looks like they might be the ones needed for the job - so, any directions, suggestion, even some references to start (some building blocks)?

Tnx ;)
 

ifixit

Joined Nov 20, 2008
652
The attached circuit needs some refinements, but hopefully you'll get some ideas.

The circuit on the left is alot more than you need, but demos MOSFET as switches. You can challenge your students to come up with a simpler design. Example on the right.

In both cases the battery takes over when the wall power fails.

Good Luck
 

Attachments

Thread Starter

camp0s

Joined May 1, 2009
6
Thanks! that's ok as circuit, but.. I was looking for something more general.

I was trying to build a "general" system, something where two independant power source could cooperate, exchange, load sharing, and cross charge themselfes.

The idea was a wall power source and a battery, where the charging was not only limited by some simple resistor or other some dedicated recharge IC.

I'm trying to come up with a circuit without a dedicated purpose where the behaviour is programmed with my PIC.

I was evaluating about n-mos or p-mos, drive capabilities and advantages/disadvantages and so the overral circuit architecture.
 

MikeML

Joined Oct 2, 2009
5,444
Here is a "simplistic" solution. Make the Wall Wart voltage a bit higher (has to be to charge the 9V battery). Use two diodes to deliver current to the load. Use a charge current limiting resistor between the WallWart and the battery.
 

Attachments

Top