I am designing a board for audio line-level (preamp) equipment that is intended to prevent large startup and shutdown pulses from reaching the power amp, and I’m trying to make it fairly universal by compensating for power supply voltages of 10~30 volts and permitting user selected startup delays of zero to 60 seconds (in evenly split wiper travel ranges of 0~10 and 10~60 seconds) and adjustable instantaneous shutdown when power supply level drops to a chosen point in the range of 50% to 100% of nominal.
I’ve got the dual-range startup delay done, it was pretty simple.
For me, the shutdown when power voltage drops to a certain percentage of normal is another matter. From looking at it, the range of values I have to deal with – small to large -- seem to prevent me from using my normal brute-force Picaxe math without sacrificing accuracy at the lower values. Any help or suggestions greatly appreciated! (schematic attached).
For this task, I have two inputs:
A: A 10K linear potentiometer across the Picaxe 5V supply which is used to select the cutoff value (a percentage of nominal supply) in the range of 50~100% of normal input voltage by using readADC10 to find the percentage of the 5V supply as selected by the potentiometer (0~1023 = 50%~100%).
B: The 10~30V supply goes through a voltage divider of 10K and 2K resistors so that the readADC10 voltage at the Picaxe chip will be 5V at 30V supply and about 1.66V at 10V supply. This reading has two functions:
1) at startup, to determine nominal power supply voltage, the voltage is read several times over a few seconds, and
2) to continuously check the voltage in a tight loop during operation to immediately disconnect the audio output relay (5V latching) whenever the power supply voltage drops below the threshold which was previously determined per the (A) potentiometer either due to power disconnection or as selected by a manual “mute” switch which is also connected to the junction of the two resistors.
How can I do the needed calculations with precision to accurately cover the entire range of possibilities and wind up with a count that I can compare to the instantaneous readADC10 reading per (B) Is there a clean way to deal with these fractions?
I’ve got the dual-range startup delay done, it was pretty simple.
For me, the shutdown when power voltage drops to a certain percentage of normal is another matter. From looking at it, the range of values I have to deal with – small to large -- seem to prevent me from using my normal brute-force Picaxe math without sacrificing accuracy at the lower values. Any help or suggestions greatly appreciated! (schematic attached).
For this task, I have two inputs:
A: A 10K linear potentiometer across the Picaxe 5V supply which is used to select the cutoff value (a percentage of nominal supply) in the range of 50~100% of normal input voltage by using readADC10 to find the percentage of the 5V supply as selected by the potentiometer (0~1023 = 50%~100%).
B: The 10~30V supply goes through a voltage divider of 10K and 2K resistors so that the readADC10 voltage at the Picaxe chip will be 5V at 30V supply and about 1.66V at 10V supply. This reading has two functions:
1) at startup, to determine nominal power supply voltage, the voltage is read several times over a few seconds, and
2) to continuously check the voltage in a tight loop during operation to immediately disconnect the audio output relay (5V latching) whenever the power supply voltage drops below the threshold which was previously determined per the (A) potentiometer either due to power disconnection or as selected by a manual “mute” switch which is also connected to the junction of the two resistors.
How can I do the needed calculations with precision to accurately cover the entire range of possibilities and wind up with a count that I can compare to the instantaneous readADC10 reading per (B) Is there a clean way to deal with these fractions?
Attachments
-
30.7 KB Views: 15