I am powering the project with a 10000mah 3.7v lithium battery
I'd like some help with the transistor needed to be able to switch the booster on and off so that it is only running when I need to take a sample. I should only need power for about 1 second. (As well as any advice if this is an okay way to do this??)
UPDATE: I tried this with my sensor - the 2700ohm worked for an LED, but it's not enough to get the sensor to power up.
Also might be useful: when I have the sensor powered directly by the power supply @3.3v I can see that it draws 0.02A (this is power supply > boost converter > sensor)
Is it a 5 volt or 3.3 volt pro Mini ?
I'd probably use a P Channel logic level mosfet to switch the boost converter on/off on the high side.
I'd use an NPN transistor to drive the mosfet.
If you work with SMD components then the Si2333DDS P Channel mosfet would be a possibility.
Thanks for the replies!
Also I noticed my little schematic wasn't uploaded in the first pic. Not sure it's useful now though
UPDATE: I tried this with my sensor - the 2700ohm worked for an LED (obviously without the boost converter), but it's not right to get the sensor to power up.
Also might be useful: when I have the sensor powered directly by the power supply @3.3v I can see that it draws 0.02A (this is power supply > boost converter > sensor)
6v6gt:
Is it a 5 volt or 3.3 volt pro Mini ?
I'd probably use a P Channel logic level mosfet to switch the boost converter on/off on the high side.
I'd use an NPN transistor to drive the mosfet.
If you work with SMD components then the Si2333DDS P Channel mosfet would be a possibility.
3.3v sorry I didn't know there were two flavors.
I could be fine with SMD and this approach, but I'm trying to get this first version out for testing really soon, so it would be great if I could use what I had. I have googled and found that a mosfet benefit is:
Since the MOSFET is a voltage-controlled device, it requires almost no current to keep it turned on. So, a GPIO from a microcontroller can drive a MOSFET that can then control very large currents.
5 minute post limit blocked me from attaching. trying again... nm can't upload, sorry here it is instead.
( I had made the note about the 3.3v on this, which probably would have been helpful)
The disadvantage of switching a module on the low side is that it could find another path to ground causing leakage. In your case, if the sensor ground is also switched to battery ground via the same NPN transistor that switches the module, that is not a risk.
The emitter of the the transistor should go to the battery ground. The collector should go to the common ground of the sensor and the boost converter.
The base resistor should be as low as you can make it without damaging the arduino pin. Say 220 Ohms. That may work, depending on the start up behaviour of the boost converter.
6v6gt:
The disadvantage of switching a module on the low side is that it could find another path to ground causing leakage. In your case, if the sensor ground is also switched to battery ground via the same NPN transistor that switches the module, that is not a risk.
The emitter of the the transistor should go to the battery ground. The collector should go to the common ground of the sensor and the boost converter.
The base resistor should be as low as you can make it without damaging the arduino pin. Say 220 Ohms. That may work, depending on the start up behaviour of the boost converter.
Awesome, thanks - I didn't have the sensor ground on the collector side, just the boost VIN-
I did that and swapped the resistor to 220, then 180 but still no dice, what is a safe lower limit?
Also - should I include any of the pull up resistors that you have in my final if I'm doing the NPN version?
(I read up on the benefits of mosfet high side and see it's quite useful in many situations)
Maybe start by showing a corrected diagram so it is clear that you've understood the comments.
Also showing which Arduino pins you are using using to power it.
You can force the boost converter on just by connecting the transistor base resistor to HIGH instead of an Arduino pin. I wouldn't experiment yet with lower value base resistors
Ah, not 18650 size then. There are a number of brands of 18650 li-ion batteries on eBay, Ali Express etc with claimed capacities of 10,000mA or near that. They are terrible quality and you will be lucky if their actual capacity is more than about 15% of what they claim. I don't know about the brand you mentioned, but for 18650, it's best to stick to well known brands like LG, Panasonic, Sony etc.
6v6gt:
Maybe start by showing a corrected diagram so it is clear that you've understood the comments.
Also showing which Arduino pins you are using using to power it.
You can force the boost converter on just by connecting the transistor base resistor to HIGH instead of an Arduino pin. I wouldn't experiment yet with lower value base resistors
Okay thanks I believe I have done what you asked:
With this I have two problems:
When I put my scope in on the VOUT of the booster, it constantly produces 3.7v (you can see in my screenshot)
When I don't have the sensor plugged in I get a clean 18v that toggles along with my D2 output perfectly. As soon as I plug the sensor into the VOUT of the booster the voltage drops down to ~5v and fluctuates like crazy. If I skip the transistor and just go straight out of my power supply I do not have this problem.
Booster Vout- should not be connected to the common ground. It is anyway almost certainly internally connected to Vin- but you should check this. Just omit it or explicitly connect it to Vin-.
You’ve added a couple more connections to the sensor since your original diagram. This introduces the risk, inherent in low side switching of modules as already mentioned, that another path to ground will be found. Where are these connections going ? Maybe also post a link to the sensor device.
Booster Vout- should not be connected to the common ground. It is anyway almost certainly internally connected to Vin- but you should check this. Just omit it or explicitly connect it to Vin-.
You’ve added a couple more connections to the sensor since your original diagram. This introduces the risk, inherent in low side switching of modules as already mentioned, that another path to ground will be found. Where are these connections going ? Maybe also post a link to the sensor device.
I've updated the schematic. I didn't know ground could be so sneaky SCM TTL to RS-485 Interface Module - ProtoSupplies is the Modbus to TTL module.
I've left the 3rd connection floating right now and it seems to work perfectly without it when I'm testing without the transistor setup, but I read through the docs and I don't see what it's for
One other note, I'm testing with the nano since I have quite a few of them as spares, in "production" I'm using a Particle.io evaluation board that has built in li-po charge handling. If that bears more elaboration I'm happy to.
Don't use pins 0 & 1 on the Nano, they are used for code upload and serial monitor. Use two other pins and the serial software library.
Also, the Nano outputs 5V and your rs485 adaptor is running at 3.3V, so check if it is 5V tolerant, and if not, use a voltage divider (eg. 10K & 22K) to reduce the signal from the Nano TX pin down to 3.3V. The TX signal from the adaptor should be ok to connect to the Nano.
PaulRB:
Don't use pins 0 & 1 on the Nano, they are used for code upload and serial monitor. Use two other pins and the serial software library.
Thanks PaulRB, I'm just using the nano to test this power problem since I'm scared of frying my much more expensive particle board, I have already tested reading the modbus data on the particle and am happy with that.
It may well work like that. You have to measure the current into the boost converter when the transistor is "OFF" to see if there is any leakage. Since the sensor looks like an expensive device I'd recommend spending a few extra cents and go for the high side switching solution. Further, your battery symbol is inverted.
Incidentally, I published a project about a year ago which is similar in that it is a low power ATmega328p battery application which goes through a cycle of sleeping, waking, switching on a boost converter, operating a sensor, transmitting data and back to sleeping. It actually detects if there is anything in my mail box. It is published here and maybe you find something you can use: Arduino NRF24L01 Mailbox Monitor/Notifier - Exhibition / Gallery - Arduino Forum
That's sweet about the mail checker haha, I've always dreamed of doing that, and you are right it is similar to my project sleep, sense, store, sleep a lot more , notify. I'll check it out - v curious about your sensor (probably just ultrasonic?) and how your mailperson reacts to the device in the box
Thanks, you are right - they are a bit expensive to replace.
How would you feel about Amazon.com
on the high side?
I've swapped over to that for my system and it's working now. If you happen to have recommendations to make this safer I would also appreciate that very much.
It is simply a mat with an infrared sensor matrix. It is practically invisible from the front side because the control box is mounted on the back.
A relay module is yet another solution. That should work but has a relatively high power consumption when it it operates. Yet another solution is to use a boost converter which breaks out an enable/shutdown pin. The one in that mailbox notifier project is such a boost converter.