Power Down Memory Save
MGVdec2000
Posts: 5
in Propeller 1
I'm designing a very simple motor control panel using a rotary encoder connected to a Prop1. The user selects the desired RPM via the encoder. The Prop1 then outputs to a DAC to generate a 4-20mA control signal to a COTS motor driver.
On powering down, I would like the Propeller to write the current RPM set point to non-volatile memory. That way, the user doesn't have to re-dial the RPM setting from 0 each "day". I'm concerned about writing to the EEPROM too frequently, as I know these are life limited. I thought it might be best to monitor the input voltage and when it drops below a certain value, write to the EEPROM. Of course I would have to have some "hold-up" capacitance and monitor the voltage up stream of that. I'm just having a little trouble picturing it all. Wondering if anyone has gone down this path before and would be willing to share.
Thanks in advance!
On powering down, I would like the Propeller to write the current RPM set point to non-volatile memory. That way, the user doesn't have to re-dial the RPM setting from 0 each "day". I'm concerned about writing to the EEPROM too frequently, as I know these are life limited. I thought it might be best to monitor the input voltage and when it drops below a certain value, write to the EEPROM. Of course I would have to have some "hold-up" capacitance and monitor the voltage up stream of that. I'm just having a little trouble picturing it all. Wondering if anyone has gone down this path before and would be willing to share.
Thanks in advance!
Comments
Just use an RC DAC plus an opamp to generate 4-20ma.
Could you elaborate on the "RC DAC"?
Thanks!
Each cog has two counters that can be used in a variety of modes and duty cycle mode (not quite PWM) is suitable for connecting to an RC network to filter the duty cycle pulses from 0...100% duty to a voltage of 0 to 3.3V. You can use this voltage to control a simple current generator circuit using a transistor or opamp. We can generate audio waveforms with this or simply a set-point voltage.
That's a good suggestion as well. I had considered a current date/time display, but didn't know where to start. I'm using a 4x20 LCD dot matrix screen (New Haven NHD-0420DZ-NSW-BBW) to provide some feedback to the user. Maybe I can add this feature at some point.