pic mcu as switch on dc-dc step up? - Page 1
Forum section: electronics / projects

author: gatoulisss
author_rank: Contributor
timestamp: January 19, 2021, 11:56:16 pm
content: hello everyone,i need your help.. i have a battery project witch is using an alarm siren to make loud sound when is needed, im using pic16f628a, a 3.7v cr123a battery to power it up and an sx1308 dc-dc step up converter for the siren. my problem is the consumption of these project, a) if i use pic pin output as step up input then the syren doesnt ring,b) if i use the battery positive pole as Vin and enable pin on the step up converter then the current draw is massive but it works as i would like it to, and finally c) if i use the enable pin of the step up converter and the battery as Vin then it works but not as good as using positive pole and again the current draw is bigwithout the step up in sleep mode my project draws 0,04mA and with step up using enable pin at sleep mode current draw is 0,4mA is big deference.so i was wondering is there any way that i can use a pic pin as a switch to completely shut down the step up converter till the time i will need to use it?thank you very much!

author: mariush
author_rank: Super Contributor
timestamp: January 20, 2021, 01:01:17 am
content: What voltage do you need for the alarm?There are lots of step-up converters with EN pins ... you either put some voltage or sink to ground that pin to enable the regulator.The PIC pins have limited current output, something like 15-25mA per pin, up to 150mA+ through all pins ... when the step up regulator turns on, it pulls a lot of current, it's quite possible the pic just can't provide the current to get the regulator working. Ideally you always have the regulator connected to battery input and use the EN pin, or you use a mosfet between battery and voltage regulator.The regulator seems to have enable pin :https://www.sunrom.com/get/3646104 ENRegulator On/Off Control Input. A high input at EN turns on the converter, and a low input turns it off. When not used, connect EN to the input supply for automatic startup.

author: EEauroro
author_rank: Contributor
timestamp: January 20, 2021, 01:36:00 am
content: 1) without the step up in sleep mode my project draws 0,04mA and with step up using enable pin at sleep mode current draw is 0,4mA is big deference.Are you referring to solution B here ? I would expect so because EN is always high. Note that SX1308 has a shutdown current of 1uA in sleep mode. With EN off, you should expect 1uA from SX1308 not 0.4mA2) Solution C is the most appropriate as you can disable the step up converter with the PIC on the EN pin. What do you mean when solution C does not work as well as solution B ? Not loud enough?3) You might want to insert some flyback/freewheeling diodes on the coil.4) add some caps on the step-up output if you do not have any5) Make sure that the transformer core is not does not hit it's saturation current at your operating frequency (I believe you are pulsing BC547). If your operating frequency is too low, the core will hit saturation and your current consumption will be very high.

author: gatoulisss
author_rank: Contributor
timestamp: January 20, 2021, 01:37:04 pm
content: using c solution when i put my system on sleep the current consumption is 0,4mA if i disconnect the positive pole from the Vin pin of the step up then my consumpion goes to 0,04mA (the step up is already build i can connect only vin,en, and gnd is this one :https://www.amazon.com/SX1308-Converter-Step-UP-Adjustable-Booster/dp/B01N79UG29)in b solution the sound output is 110db with Vout of step up at 22v in c solution with the same output voltage my sound output is 95db this is what i mean is not as goodi need a way to power off completely the step up and power it up only when its necessary so i will have consumption of 0.04mA or something close to it

author: mariush
author_rank: Super Contributor
timestamp: January 20, 2021, 05:09:19 pm
content: You could just desolder the corner pin (enable pin, by the C1 text), lift it slightly up and then solder a small wire to it ... send 5v from your micro to the regulator.The datasheet is here, you can see the two pins soldered together are vin and enable :https://www.matts-electronics.com/wp-content/uploads/2018/06/SX1308.pdf

author: gatoulisss
author_rank: Contributor
timestamp: January 20, 2021, 06:21:04 pm
content: this is how i use the enable pin, i did this but again my current draw is 0,4mA insteed of 0,04mA that it used to be before i connect the step up modulemaybe using s mosfet drived from a pic pin as a switch will do the work?

author: EEauroro
author_rank: Contributor
timestamp: January 21, 2021, 03:16:23 am
content: Yes, use a pmos switch in series to Vin of the DCDC step up. This will work.Use a PMOS whose turn on voltage is ~ < 3 V as your battery voltage is 3.7V only when fully chargedTake a look at the leakage current of the PMOS in the off-state. Lower value is better for power savings

author: gatoulisss
author_rank: Contributor
timestamp: January 21, 2021, 06:49:36 pm
content: so i will connect it like on schematic of the picture?and this could do the work :https://www.acdcshop.gr/content/irlml6244pbf.pdf??

author: EEauroro
author_rank: Contributor
timestamp: January 27, 2021, 04:24:23 am
content: something like this:

author: MIS42N
author_rank: Frequent Contributor
timestamp: January 27, 2021, 09:44:50 am
content: Here's a possible solution. Have a nmos FET as the path to ground of the whole dc-dc and buzzer. The PIC has to turn on the FET sufficient to kick the dc-dc into operation, as soon as it ramps up it provides enough voltage to turn the FET on fully. No voltage wasted in a transistor. To turn it off, have to turn on the transistor to short the gate to ground. Some care needed how the PIC pins are used, perhaps a resistor in series with the diode to limit current if the ON pin is high when the OFF pin is low. If the full voltage of the step up is too high for the gate, a 12V zener from gate to ground limits the maximum gate voltage.