Will This Circuit Work - SOS Flasher?

Discussion in 'Embedded Systems and Microcontrollers' started by JDR04, May 12, 2016.

  1. JDR04

    Thread Starter Active Member

    May 5, 2011
    339
    4
    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
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,798
    1,103
    R2 and R3 need a higher value if you want to keep LED current below 30mA.
    Those FETs would be fine.
     
    JDR04 likes this.
  3. JDR04

    Thread Starter Active Member

    May 5, 2011
    339
    4
    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
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,798
    1,103
    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.
     
    JDR04 likes this.
  5. JDR04

    Thread Starter Active Member

    May 5, 2011
    339
    4
    Thanks again. Appreciate your input and will revert back to the original circuit. Cheers.............
     
  6. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,692
    901
    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: May 13, 2016
    JDR04 likes this.
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    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.
     
    JDR04 likes this.
  8. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    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.
     
    JDR04 likes this.
  9. JDR04

    Thread Starter Active Member

    May 5, 2011
    339
    4
    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
     
  10. JDR04

    Thread Starter Active Member

    May 5, 2011
    339
    4
    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
     
Loading...