Battery backup for stereo receiver EEPROM

Discussion in 'The Projects Forum' started by mossman, Aug 23, 2013.

  1. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    I am designing a low power battery backup circuit for my stereo receiver since the existing backup circuit is not working properly. The backup circuit only keeps two ICs powered on during a power outage. I am not sure of the power requirement of one IC, but the other is a 24LC256 EEPROM, which has a standby current of only 100 nA. Since this current is so small, I'm not sure what type of component to use to switch between the EEPROM circuit's regular +5.5V signal (supplied by receiver during normal operation) and the battery backup circuit. I've been looking at opto-isolators, but the ones I have seen have minimum output current specs on the order of mA. Is a mechanical relay my only option with such a small current requirement?
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    An EEPROM is a non-volatile device and shouldn't need a battery backup, sounds like you have a different problem.
     
    eric_s88 likes this.
  3. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    You're right, but for some reason the receiver isn't retaining its settings. It is a known/common issue for this receiver and the service manual says to replace a specific capacitor to remedy the problem (C557 in schematic). I replaced the cap and it still does not retain memory. It is only during a power outage that the memory loss occurs. The other IC (left of image) that shares the same Vcc node is a µPD70F3033B RISC microcontroller. Perhaps this IC is not getting backup power and is erasing the EEPROM for some reason? Or maybe the settings aren't even on the EEPROM but on the microcontroller's internal flash memory (256 kB)? I attached a snapshot of the circuit. The EEPROM is IC503 (24LC256) and the capacitor that supposedly provides backup power is C557 (0.047 F). If that 4-pin connector is present (labeled "option") this would be a convenient place to tap into the VDD node with my own battery backup circuit. Notice transistor Q511 is connected to the RESET pin of the microcontroller. Maybe it's C521 that isn't holding charge so that when power is restored to the ST-BY +6V node, the transistor is being turned on momentarily thereby resetting the controller and erasing the flash memory. Just a guess.

    [​IMG]
     
    Last edited: Aug 23, 2013
  4. pwdixon

    Member

    Oct 11, 2012
    488
    56
    It may be that the settings are saved to eeprom when the power is interrupted and the capacitor just gives the processor just enough time to save the data before the supply completely disappears. That would suggest that somewhere else on the schematic there's an input that detects the mains power loss and tells the processor to do the save. Perhaps simply increasing the value of C557 would provide the extra power-up time to enable a successful save to be completed. If this unit did once upon a time keep the config perhaps it just shows that the value of C557 has degraded over time or the overall power requirements have increased due to component aging and hence C557 is insufficient to allow the save to complete.
     
  5. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    The receiver has never retained it's settings, but that doesn't mean C557 still isn't defective. The manufacturer (Harman Kardon) is well aware that it is a problem--it is listed in the service manual as a solution for the memory loss issue. Seems like 0.047 F would be sufficient, but apparently not. Do you think some other component is draining the charge off of C557 before the MCU has a chance to save the settings? I suppose I could install another 0.047F cap in parallel and see if that does the trick.

    Perhaps "AVREF" is the feedback signal that detects when power is lost.

    Out of curiosity, would pulling the RESET pin low erase the flash memory of the MCU?

    What size capacitor would be sufficient to power a 100 pin microcontroller and an EEPROM for a few seconds so the it can store the settings? Would a 0.1F 5.5V cap suffice? This would be about the equivalent of putting two 0.047F caps in parallel but I'd rather install one component.
     
    Last edited: Aug 23, 2013
  6. pwdixon

    Member

    Oct 11, 2012
    488
    56
    It may be a good thing to try doubling the capacitor it might fix the problem. A bit odd that it has never kept it's config. Are you sure you are saving the settings when you adjust them? I must admit I've had car radios that you'd think you had set the station because it played that station only to find that the setting was lost when the radio was turned off. In that case you had to hold the tuning button for a few seconds and the radio went beep to indicate the setting was stored. It would make some sense to save configs while the mains power ws present as it would obviously be much more reliable than hoping the capacitor would last long enough to complete the job.

    Pulling reset low would normally only reset the processor leaving the flash intact. I looked up the chip and it didn't look like it had any flash other than program space which they are pretty unlikely to be using for config settings.
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    pwdixon makes a valid point about holding the button down until you hear it beep.
    Are you sure you are saving the settings correctly?
     
  8. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    Wait a minute, if what you suggested is true (the processor saves off the memory to the EEPROM during a mains outage) then this means that the settings are normally stored in the processor's flash memory. If they were always stored on the EEPROM, they would always be there because the EEPROM would retain them regardless if the chip was powered. That being said, if the processor has sufficient flash memory to store the settings, what is the point of saving them off to external memory during a power outage? Why doesn't it just keep the settings in its internal flash memory?
     
  9. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    You're running around in the dark.

    How do you know the processor has flash memory?
    How do you know IC503 24LC256T is used to store the settings?

    So far all guesses are pure speculation.

    EEPROM does not require battery backup.
     
  10. pwdixon

    Member

    Oct 11, 2012
    488
    56
    No the processor flash eeprom is almost certainly only program space and the external eeprom is probably where the config is held.
     
  11. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,070
    3,840
    Every receiver I have ever owned has lost its settings during a power outage. Even my brand new Samsung TV loses its settings during a power outage. Are you sure it is supposed to store anything? You mentioned above that it has never worked that way. What makes you think it is broken?
     
  12. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    Because Harman Kardon acknowledges that it is a problem with the AVR 435 and AVR 635 receivers (this is a home theater receiver, not a car stereo). I have the service manual and it lists this problem in the manual and says to replace this particular capacitor to fix the problem (I thought I said that).

    If the settings are always being stored on the external EEPROM, then why are they erased after removing and restoring the power (unplugging the unit and plugging it back in)? If they're on the EEPROM to begin with (after I set them) then they should always be there unless something (the processor) is erasing them. Or does the processor read the EEPROM every time I power on the unit, erase the EEPROM, then write to the EEPROM again when the unit is powered off? Bottom line is that when the ST-BY +6V is present, everything is fine, but if it isn't present (power cord is unplugged or power outage) then the settings are erased, and Harman Kardon is saying that this capacitor is the cause. I've talked with other AVR 635 owners and they have indicated that the problem was resolved by replacing this cap, but only with another Harman part--Digikey parts don't work for some reason.

    Does this make sense?:

    Normal operation: When pressing the on button, the receiver's processor reads the contents from the EEPROM and loads it into RAM and the original data remains in the EEPROM. When the off button is pressed, nothing happens and the EEPROM contents are still there available for reading again the next time the unit is powered on.

    Power outage: The processor detects the power outage and attempts to write the settings to the EEPROM (seems like they should already be there though since they shouldn't have been erased to begin with, but...). However, capacitor C557 cannot hold charge for long enough for the save cycle to finish. Therefore, incomplete data is saved and when power is restored, the processor cannot read the (incomplete) data. I should mention that SOME of the settings are retained, but I'm not sure if these settings are stored elsewhere or if this particular EEPROM stores all of the receiver's settings. If it does, then it makes sense that the same settings are consistently retained whereas the other settings are not. For example, the receiver remembers the bass and treble settings, the channel gain levels, and the default volume level, but it does not remember the cross-over frequencies, speaker sizes, or digital inputs assigned to Video 1, DVD, etc. It would make sense that the former settings are written to the EEPROM first (while the cap still has charge) and the other settings are written last, which is why they are never stored (because the cap has lost its charge). For this to make sense, it seems like the EEPROM would have to be erased before each write cycle, otherwise the previous settings would still be there, not the factory defaults. Unless saving partial data somehow confuses the processor during its load cycle and it can't load the remaining settings.
     
    Last edited: Aug 23, 2013
  13. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Sounds like poor firmware design, how often does a user unplug a receiver or lose mains?

    From the looks of it the AVR635 had some software problems, did you install the latest firmware via RS232?
     
    Last edited: Aug 23, 2013
  14. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    I think it is bad firmware design. Why would you erase the EEPROM and then write to it? Or maybe the partial data save is confusing the processor so it just stops reading it and loads the default values for those particular settings. Who knows. I'll put the larger cap in and that should do it.

    I have not installed the latest firmware, but I have read the notes and it doesn't mention anything about this issue.
     
  15. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Updating firmware beats soldering mods.
     
  16. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    I agree, but if it were that simple then I'm assuming the service manual would say to upgrade the firmware--it says to replace the cap.
     
  17. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Maybe the service manual was written before the firmware update became available.
     
  18. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    Perhaps. I just spoke with HK customer service though and they did not mention an upgrade. The manual says the memory should be retained for at least four weeks without power. Why only four weeks, I have no idea. An EEPROM should (ideally) retain it's memory indefinitely.
     
  19. mossman

    Thread Starter Member

    Aug 26, 2010
    131
    3
    UPDATE: I decided to download the firmware upgrade (dated Nov. 2009) and the accompanying documentation states that it fixes the memory problem! What the hell? Why doesn't the representative at HK know this information? He told me to take it to a service center to have the cap replaced! I'm going to upgrade the firmware tonight and hopefully that will fix it. Thanks to those that mentioned the firmware! BTW, that explains what the processor's internal flash memory is for--firmware upgrades (duh to me!!!)
     
    Last edited: Aug 23, 2013
  20. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    Because that would make him the exception rather than the rule. I have a Yamaha receiver updated to a firmware version that the company reps deny even exists. I think it's quite common.
     
Loading...