Arduino Nano & 3.7V LiPo battery

Hello,

I am working on a small Arduino Nano based project to control some SMD LEDs, nothing special. The Nano I am using is the Keywish BLE-Nano running on 5V (https://de.aliexpress.com/i/33006686263.html with specs available here: https://github.com/keywish/keywish-nano-plus/tree/master/BLE-Nano). The sketch is ready so far and working fine, so I want to switch to a battery powered setup (until now it was connected to my PC via USB). For that I want to use a 3.7V LiPo battery that will be charged with a TP4056 controller.

My problem is to get the Nano being powered correctly with the 3.7V battery. I tried using the 3V3 input, which did work in general but I guess changed the CPU frequency so the program was not running the same speed (as far as I understood it is because the CPU requires 5V to run on 16MHz and I do not provide them).

I can use a step-up converter to bring my 3.7V to 5V for the Arduino Nano but I would like to avoid further boards if possible. At various places I have read that it might be possible to reduce the CPU speed to 8MHz with a prescaler in the setup function or with a custom bootloader, however searching the forums here nor search the web helped me finding an explanation on how this works and what the pros/cons would be.

So, as I am wondering why Arduino + 3.7V LiPo batteries does not seem to be a common use, I was wondering if anybody here can help me to understand if/how I can change the speed to 8MHz and if that would help to get the code in sync without having to use a step-up converter.

Below based on my knowledge of a normal Nano; I could not find a schematic of a ble-nano.

The voltage will not have an effect on the frequency itself; the frequency will not change. The voltage determines the max. frequency that reliably can be used.

3.7V is sufficient to use a 328P at 16MHz, 3.3V is at the edge.

Connecting to the 3.3V pin is not the way to do it; the 3.3V pin not an input. Connect the battery to the 5V pin. In that case I would advise to disconnect the battery before connecting the Nano to a PC; I don't think it will be healthy for the battery to feed it 5V directly from the USB.

Hi sterretje,

Thanks so much for your reply. There is a schematic at https://github.com/keywish/keywish-nano-plus/blob/master/BLE-Nano/BLE-Nano.pdf I think.

I tried to connect to the VIN pin as well and the device turns on, but no SMD LEDs lights are shining and I have no idea why. The BLE connection can be created but nothing else works, even no communication between the Nano and the app connected to it. But even if I default the Nano code to have all LEDs on, they are off in this state.

In case you are wondering, here's a code to change the CPU pre-scaler to 2 (half the crystal speed) and have the Nano run at 8 MHz

	// change system clock pre-scaler to 2, run CPU at 8 MHz
	CLKPR = 1<<CLKPCE;
	CLKPR = 0<<CLKPCE | 0<<CLKPS3 | 0<<CLKPS2 | 0<<CLKPS1 | 1<<CLKPS0;

How do you know it turns on? The requirements for the Vin is 7V minimum. So 3.7V will never work,

Which SMD leds? Those on the board?

That might work if it's close to the spec and a reasonable square wave is generated. But if the oscillator circuit does not work properly (no square wave out) because Vcc is too low, it will not work :smiley:

@hzrnbgy Thanks, that slowes down the running of the code, but sadly does not solve the problem :confused:

@sterretje I know the Nano turns on because it has two LEDs on the board (one for Serial and one for BLE). When powering through VIN, the BLE SMD starts to blink and I can detect and connect via Bluetooth to the Nano. When I try to send messages from the app connected it seems to work as well (the Serial SMD blinks and that's what it does when it sends or receives messages), however the Nano does not send any messages with VIN used and the external SMDs connected to the pins do not light :frowning:

3.7v means that operating range of the battery is something like 3.2-4.2v So get a boost converter

So I really can't get around this without another module?

There is a genuine Arduino Nano 33 BLE, but it is very expensive, and out of stock anyway. I don't know of any clones.

You could use two batteries in series connected to Vin, but then the charging situation would be more complicated.

I think you will find that a boost module is pretty small, and it might even be possible to mount it on top of the charger module, or on top of the Nano. Modules I've used have the MT3608 boost converter chip. Most modules have adjustable output, so they have a multi-turn pot. But you would want one with a fixed 5V output, which should be smaller.

Somewhere I've seen a thread or video on combination modules which have charger plus protection plus boost, but can't remember where. However, if by chance you will be using an 18650 battery, you should look at the "18650 battery shield V3", which has all that circuitry on the back of the battery holder.

Edit: It was a Great Scott video:

https://www.youtube.com/watch?v=aND0j2Y2IkM

And I found this, which doesn't appear to have any protection. You would just use a protected battery.

My answer is probably not the best answer, but this is the way I do it.

  1. I have a 3.7 LiPo connect to a TP4056, the resistor is changed to slow the charging current.
  2. The output is connect to a MT3608 to boost the 3.7V to 5V. There is a little slide switch connected from the TP4056 to MT3608 as a power switch
  3. The 5V and Ground of the MT3608 go to the 5V and Ground of the Arduino

If someone could verify if this is good, that would be great so that I don’t keep giving bad advice to people and myself

I think that's good, genius. And that's the right location for the on/off switch - you can still charge the battery when power to the load is switched off.

But there is also the issue of having a load sharing circuit (aka power path) which lets USB power the regulator directly when it's plugged in. Without that, when the battery is fully charged, the TP4056 shuts down, and the battery has to power the load until it drops to 4.1V and the TP4056 turns on again. A load sharing circuit will prevent that battery cycling. It also permits charging to terminate properly even if load current is high. It requires three extra parts - a P-channel mosfet, a Schottky diode, and a resistor.