Author Topic: Need supercap for memory retention  (Read 1632 times)

0 Members and 1 Guest are viewing this topic.

Offline Bassblaster505Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Need supercap for memory retention
« on: December 14, 2021, 04:34:40 pm »
Been out of the hobby scene for a couple years, so ive forgotten how to do this on my own :P

I Have a portable speaker in the works that runs on 16V, but will lose all DSP memory when power is lost. The amp draws 2.5mA when powered off and will keep memory as long as there is a voltage present, but i only tested that down to 5V.

ALSO, Im would like to put a current limiting resistor in series with said cap so it can slowly recharge when plugged back in and not draw down my 64W power brick

So i need a value for a supercap that will take ideally, as long as possible to drop from 16V-5V with a 2.5mA load, and a resistor to put in series with it to limit how fast it charges
« Last Edit: December 14, 2021, 04:48:22 pm by Bassblaster505 »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8790
  • Country: fi
Re: Need supercap for memory retention
« Reply #1 on: December 14, 2021, 04:52:46 pm »
2.5mA is massive consumption, no battery/capacitor backup non-volatile SRAM ever used that much.

If you can afford going from 6V to 5V (starting from 16V would sound appealing, but supercaps/ultracaps have low voltage ratings, you would need many in series) and want the settings to be stored for a year (365*24*60*60=31536000seconds), the required capacitance is

0.0025A*31536000s/1V = 78840F.

If you used this 13500F ultracap, https://www.digikey.com/en/products/detail/powerresponder/PR13500F08R0-109W245L-T/13880107 ,

you would need 24 pcs (2s12p). Not a truckload of capacitors, but thousands of dollars anyway.


Now luckily you provided enough information about the actual application on your X-Y question, so we can help:

The solution is storing the parameters like they are actually stored in such products. Typical options include:
* EEPROM (sometimes available integrated in MCU; if not, extarnal chip costs <$1)
* FLASH memory of the DSP, emulating EEPROM storage
* Battery- or capacitor backed SRAM, this requires a special non-volatile low-power SRAM chip, or the same functionality integrated on the MCU. This often comes together with RTC. On a microcontroller, this means a separate power pin and consumes microamps, not milliamps.

EEPROM chip is likely the easiest.

If the amount of parameters is very small (few dozen bytes), you can use the DSP's flash and write sequentially without need of thinking about erasing.
« Last Edit: December 14, 2021, 04:55:23 pm by Siwastaja »
 
The following users thanked this post: thm_w, Bassblaster505

Offline TheMG

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ca
Re: Need supercap for memory retention
« Reply #2 on: December 14, 2021, 09:18:29 pm »
You need to specify how long you want the memory retention to be. A few hours? A day? A week? Month?

But more importantly I think this is the wrong solution to the problem. The most practical way to tackle this nowadays would be a small 8-pin serial EEPROM to store the configuration bytes.

Is this an off the shelf product or something you're designing yourself?
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6254
  • Country: es
Re: Need supercap for memory retention
« Reply #3 on: December 15, 2021, 04:42:36 am »
What about modifying it so it cuts the power for everything except the very essential?
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Bassblaster505Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Need supercap for memory retention
« Reply #4 on: December 15, 2021, 08:01:40 am »
2.5mA is massive consumption, no battery/capacitor backup non-volatile SRAM ever used that much.

If you can afford going from 6V to 5V (starting from 16V would sound appealing, but supercaps/ultracaps have low voltage ratings, you would need many in series) and want the settings to be stored for a year (365*24*60*60=31536000seconds), the required capacitance is

0.0025A*31536000s/1V = 78840F.

If you used this 13500F ultracap, https://www.digikey.com/en/products/detail/powerresponder/PR13500F08R0-109W245L-T/13880107 ,

you would need 24 pcs (2s12p). Not a truckload of capacitors, but thousands of dollars anyway.


Now luckily you provided enough information about the actual application on your X-Y question, so we can help:

The solution is storing the parameters like they are actually stored in such products. Typical options include:
* EEPROM (sometimes available integrated in MCU; if not, extarnal chip costs <$1)
* FLASH memory of the DSP, emulating EEPROM storage
* Battery- or capacitor backed SRAM, this requires a special non-volatile low-power SRAM chip, or the same functionality integrated on the MCU. This often comes together with RTC. On a microcontroller, this means a separate power pin and consumes microamps, not milliamps.

EEPROM chip is likely the easiest.

If the amount of parameters is very small (few dozen bytes), you can use the DSP's flash and write sequentially without need of thinking about erasing.

Well i can pass on the truckload of caps as i dont need it to store for an entire year   ;D

You need to specify how long you want the memory retention to be. A few hours? A day? A week? Month?

But more importantly I think this is the wrong solution to the problem. The most practical way to tackle this nowadays would be a small 8-pin serial EEPROM to store the configuration bytes.

Is this an off the shelf product or something you're designing yourself?

Memory would really only need to be a few hours, a day would be nice, but as Siwastaja said 2.5mA is higher than most any eproms SRAM or whatever time has used to store things. I Cant really tap into serial lines or just run a new EEPROM as its a fairly off the shelf Bluetooth and 4 channel DSP board. Stupid that it doesnt have anyway to store its own memory after power loss, get what you pay for i guess. That then goes into a Simi custom TDA7850 amplifier that gets ran...quite hard. If math's are correct it will be drawing at peak 12A!  :-DMM

What about modifying it so it cuts the power for everything except the very essential?

Im not sure that would work as it would be unplugged from wall power to be moved around, as portability is a main design goal
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 6651
  • Country: ca
Re: Need supercap for memory retention
« Reply #5 on: December 15, 2021, 08:26:10 am »
add a battery ?? and add a signal diode ??
 

Online wraper

  • Supporter
  • ****
  • Posts: 17610
  • Country: lv
Re: Need supercap for memory retention
« Reply #6 on: December 15, 2021, 08:31:25 am »
As I understand the whole circuit consumes 2.5mA. You need to isolate what's actually need to be powered.
 

Offline Bassblaster505Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Need supercap for memory retention
« Reply #7 on: December 15, 2021, 06:31:56 pm »
As I understand the whole circuit consumes 2.5mA. You need to isolate what's actually need to be powered.
The Bluetooth and DSP are together and is what needs to be powered. the TDA power amp switches to standby and according to the datasheet in standby draws MAX 20uA
add a battery ?? and add a signal diode ??
Never thought of that. I Would have to get some circuit that would switch on when powers off and recharge itself too. Im not much on battery designs :/


But back to the orginal topic, with 2.5mA draw, COULD i use supercaps to store for a few hours/up to a day?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8790
  • Country: fi
Re: Need supercap for memory retention
« Reply #8 on: December 15, 2021, 08:04:53 pm »
I gave the example calculation in my first reply. Redo the calculation for any number of seconds, and any arbitrary voltage drop allowed.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: Need supercap for memory retention
« Reply #9 on: December 15, 2021, 09:50:12 pm »
Yeah. Take for instance an already massive 10F supercap. At 2.5mA, it will lose 900mV per hour.

With that said, you'll have a hard time finding such a supercap with an operating voltage of 16V or over. And if you do, it will be VERY expensive. The less expensive ones will be 5V max or lower.

Let's take a quick look on Mouser. The only cap >= 16V >= 10F that can be found is a "giant" 16V 58F, which is actually an assembly of caps. It's about $150. :-DD
And even so, you'd have a hard time "charging" it properly without an adequate circuit. You can't just put it in parallel with whatever power supply there is. Neither will like it.

So in short... this is overall a bad idea, but I think you already got the point by now.

 

Offline Bassblaster505Topic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Need supercap for memory retention
« Reply #10 on: December 15, 2021, 10:16:20 pm »
I gave the example calculation in my first reply. Redo the calculation for any number of seconds, and any arbitrary voltage drop allowed.
If i done it right somithing around 5F should get me a couple hours, which is good for my plan here
Yeah. Take for instance an already massive 10F supercap. At 2.5mA, it will lose 900mV per hour.

With that said, you'll have a hard time finding such a supercap with an operating voltage of 16V or over. And if you do, it will be VERY expensive. The less expensive ones will be 5V max or lower.

Let's take a quick look on Mouser. The only cap >= 16V >= 10F that can be found is a "giant" 16V 58F, which is actually an assembly of caps. It's about $150. :-DD
And even so, you'd have a hard time "charging" it properly without an adequate circuit. You can't just put it in parallel with whatever power supply there is. Neither will like it.

So in short... this is overall a bad idea, but I think you already got the point by now.


900mV/hr is perfectly fine. board keeps memory down to around 5V. Chucking a few Cornell Dubilier 10F 3V caps in series wouldn't be too expensive. Only $1.98ea from mouser. Im not too sure how exactly this whole thing is a bad idea, just dumbass DSP board has no memory retention for whatever reason. And a series resistor would limit charging rate to not load my power brick. It can take 15 minutes to charge for all it matters. Once its plugged in, it'll stay there untill moved again. I Can always go grab a new MeanWell 12V supply, i just already have a 16V brick so thats what i grabbed. Allows for a tad more power from the amplifier too. I Will double check the standby draw of this setup as the more i look at the board the more im having a hard time seeing WHERE 2.5mA is going.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf