Will This Circuit Work - SOS Flasher?

Thread Starter

JDR04

Joined May 5, 2011
367
My intention is to have a small circuit board that can either be used as a torch or through a program in the PIC will flash the SOS code.

The programming side is no problem. I've got that almost done.

The area I need advice on is how to power the 10mm LEDs. They require 30mA each and have a forward voltage of 3.3V. I would like to power the circuit off a 9V battery. Is the use of the positive logic mosfet suitable?

My intention is that 9V is used to power the LEDs but 5V powers the microcontroller.

I have attached my proposed circuit diagram and would appreciate advice on how to do this.

Thanks a lot folks...................JDR04
 

Attachments

Thread Starter

JDR04

Joined May 5, 2011
367
R2 and R3 need a higher value if you want to keep LED current below 30mA.
Those FETs would be fine.
Thanks very much for that. I've altered the resistor arrangement and corrected the resistor values. Thanks for pointing that out. For the leds, I am wondering if this can be done at all.(One resistor taken out)

I have attached the new schematic and once again appreciate your time......Thanks a lot........JDR04
 

Attachments

Alec_t

Joined Sep 17, 2013
14,280
False economy unless the LEDs in one string are never on at the same time as the others. Assuming you want both strings of LEDs to light at the same time that won't work well unless the total Vf of the two LEDs is identical (unlikely) for both strings. If they're mismatched, one string will hog more of the current than the other. Each string should have its own resistor.
 

Thread Starter

JDR04

Joined May 5, 2011
367
False economy unless the LEDs in one string are never on at the same time as the others. Assuming you want both strings of LEDs to light at the same time that won't work well unless the total Vf of the two LEDs is identical (unlikely) for both strings. If they're mismatched, one string will hog more of the current than the other. Each string should have its own resistor.
Thanks again. Appreciate your input and will revert back to the original circuit. Cheers.............
 

jpanhalt

Joined Jan 18, 2008
11,087
Do you intend to alternate the strings? Why?

If not, that FET is rated at 1.67A, and just one should be able to handle the current from all four LED's. That would only use one pin from your 12F683.

Pins 6 and 7 are used for ICSP. Of course, that doesn't mean they can't be used for other purposes, but in your circuit, not using them would make it simpler. You will also need a pull-up resistor on MCLR (pin 4) assuming you plan to use ICSP.

John
 
Last edited:

ScottWang

Joined Aug 23, 2012
7,397
In your first circuit on #1, the I_led = (9V-3.3V-3.3V)/56 Ω= 42.9 mA
Assuming that the duty cycle is 50% then the average current will be I_avg = 42.9 mA/2 = 21.45mA, that is below the 30 mA, so it is ok,

If the duty cycle more less then the average current will be more less.
 

dannyf

Joined Sep 13, 2015
2,197
You have a linear circuit powered by a 9v battery. not very good combination if you want it to last long.

An alternative is to reconfigure the pic as a boost regulator, powered by a 3v/3.7v source. Or a buck converter powered by a 4.5v/5v source.
 

Thread Starter

JDR04

Joined May 5, 2011
367
Do you intend to alternate the strings? Why?

If not, that FET is rated at 1.67A, and just one should be able to handle the current from all four LED's. That would only use one pin from your 12F683.

Pins 6 and 7 are used for ICSP. Of course, that doesn't mean they can't be used for other purposes, but in your circuit, not using them would make it simpler. You will also need a pull-up resistor on MCLR (pin 4) assuming you plan to use ICSP.

John
Hi, when the power switch is on, the circuit will work like a torch. If the second switch is pressed, the leds will flash in a SOS pattern.

Thanks for the suggestions, I will look into them........JDR04
 

Thread Starter

JDR04

Joined May 5, 2011
367
You have a linear circuit powered by a 9v battery. not very good combination if you want it to last long.

An alternative is to reconfigure the pic as a boost regulator, powered by a 3v/3.7v source. Or a buck converter powered by a 4.5v/5v source.
Hi dannyf, thanks for your input. Could you explain to me please how I use the pic as a boost regulator. Thanks for your time.....JDR04
 
Top