Hello. I'm trying to make a low power board.

Post here first, or if you can't find a relevant section!
STM32ardui
Posts: 142
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: Hello. I'm trying to make a low power board.

Post by STM32ardui »

myksj1105 wrote: Tue May 28, 2024 10:46 pm Q1) Can you recommend a low-power ‘SMPS’?
Q2) Is it possible to make 3.3VDC with low power other than 'SMPS'?
OK, you are talking about a step-down or buck-converter ...
Is it a good idea to use such a part, if you want to read values of an ADC???
From switching there is a noise on power line.

Go to a distributor like Digikey or Mouser and search for parts.
You need one with a low quiescent current (the current a regulator need itself without load). And it should work up to 100% duty cycle.


Of course there are also LDOs with low quiescent current:
  MCP1700 with IQ = 1,6 µA and ILOAD < 250mA.
Another important parameter is dropout voltage. Here it is about 178 mV (typ) for ILOAD = 250 mA. That means: for 3.3V at output you need 3,48 V at input minimum. Of course if µC needs less that 250 mA, dropout voltage is lower.

An LDO may work with lower input voltage and simply reduce output voltage. But you have to try out.

Most of buck converters have higher IQ than LDOs!

-------------------------------------------------
myksj1105 wrote: Tue May 28, 2024 11:47 pm 3) After removing the crystal, DFU USB is not recognized.
Correct, USB normally needs a accurate 48 MHz clock (if I remember right)
But: for what your board needs USB, if it is somewhere outside, where there is no electricity and you are using a battery???
myksj1105 wrote: Tue May 28, 2024 11:47 pm Q1) Do I need to set the internal 'clock'? But I don't know what to do.
Once more: take a look into datasheet.
STM32-chips should start with HSI clock and if you want HSE (with external crystal) you have to activate. But there are other users who will know it better.

And when a µC is using HSI: why oscillator for external crystal should be active?
Do you checked it with oscilloscope, if there is a signal at crystal?
Or do you simply like to remove parts from a board? :lol:


-----------------------------------------------
myksj1105 wrote: Tue May 28, 2024 10:46 pm - 3.6~4.2V, lithium battery, 2000mAh
- I want to use it for 1 year.
One year means 365 * 24 = 8760 hours.
2000 mAh / 8760 = 228 µA overall - active and sleep mode.

If you assume, that µC will need 5 mA during active period (1 min) calculation is:
  5 mA * 1/60 + x mA * 59/60 = 0,228 mA
or
  x = (60 * 0,228 mA - 5 mA) / 59 = 147 µA during sleep.
From this you have to subtract current for LDO or buck converter.

A STM32F103 at 8 MHz and all peripherals disabled still needs 3 mA during sleep.
In run mode it will have 5.5 - 8.6 mA at 8 MHz.

Datasheet of STM32L151 sounds really difficult with different core voltages and ranges.
But I guess with HSI clock you will not go below some mA for sleep mode and you will need MSI and a low clock frequency.


BTW: how you will get out data after a year from pseudoEEPROM?
And is pseudoEEPROM area large enough to store data for a whole year?


One last remark:
You can walk by feet, take a bicycle or a fast Ferrari. If you are on the road in wrong direction, you will never reach your destination!
myksj1105
Posts: 95
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

@STM32ardui
Your angel, your genius. thank you

1. ‘SMPS’ advice: I understand.
2. ‘Battery’ advice: I understand.
3. ‘Crystal related’
1) If there are crystals, the unit price increases.
2) The PCB is exposed to an environment of -20℃, and the 'crystal' may become a problem.
3) So, I would like to know how the chip operates without the crystal.
- It seems to be possible with STM32CubeProgrammer, but can't it be set in 'Arduino IDE'?
- After removing the two ‘crystals’, the firmware ‘bin’ file was entered into ST-LINK.
I inserted the 'bin' file through 'STM32 ST-LINK Utility', but 'STM32F1' does not work.

Code: Select all

#define LED  PC13
void setup() {
  pinMode(LED, OUTPUT); 
}
void loop() {
  digitalWrite(LED, HIGH); 
  delay(1000);
  digitalWrite(LED, LOW); 
  delay(1000);  
}
STM32ardui
Posts: 142
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: Hello. I'm trying to make a low power board.

Post by STM32ardui »

myksj1105 wrote: Wed May 29, 2024 8:43 am 3. ‘Crystal related’
1) If there are crystals, the unit price increases.
Are you planning a production of 1000 boards or more?
Or are you talking about a hobby project = one board?

A genuine crystal with ±5 ppm or ±10 ppm from distributor costs about 0.50 €
A STM32L151 starts at 4.32 €.

Why should a crystal not work at -20 °C?
A lot of them are made for -40°C bis 85°C ... you can search for a temperature range at distributor or have to look inside datasheets.

myksj1105 wrote: Wed May 29, 2024 8:43 am - It seems to be possible with STM32CubeProgrammer, but can't it be set in 'Arduino IDE'?
It depends on where you installed ArduinoIDE.
May be script doesn't recognize path variable on a Windows system. In the end I placed the absolute path for the CLI version into the script and now it works on my computer. Otherwise you can generate a bin file in IDE, then start GUI version of STM32CubeProgrammer and open and upload file manually. As far as I know ST Link Utility it outdated and may not work with modern µC?
myksj1105 wrote: Wed May 29, 2024 8:43 am but 'STM32F1' does not work.
What is the meaning of "does not work"???
That is a too general description.

From STM32F103 datasheet:

Code: Select all

2.3.7 Clocks and startup
System clock selection is performed on startup, but the internal RC 8 MHz oscillator is
selected as the default CPU clock on reset. An external 4-16 MHz clock can be selected, in
which case it is monitored for failure. If failure is detected, the system automatically switches
back to the internal RC oscillator.
Again:
1. I don't know if oscillator for external HSE crystal is working from power up or only if you select HSE as clock source. You should use an oscilloscope and check, if there is a signal at OSC_IN and/or OSC_OUT.
If there is no signal, it is a useless work to remove crystal.

2. For all things, that STM-Core automatically switch on, you should ask our admin. He may knows better. I'm not familiar with the clock tree. I would assume that LED will blink with a wrong period, if clock frequency is set to different value.
Post Reply

Return to “General discussion”