Auricle wrote:I could see from the article you cited that addition of the zener to the flyback cct could improve response time, in the order of 10ms. I couldn't see how this would be significant if the voltage were checked only every 2 seconds. Comments in setup.h say:
- Code: Select all
//vinCheck monitors our 24V supply from a tap off the filament supply.
//We monitor this voltage every two seconds in our void main() and see
//if it has dipped by 2%
From budgisketch.ino, it seems that the voltage is checked a lot more often; line voltage variations are tracked once every 2 sec. Should work well as long as nobody presses a pushbutton during a brownout ;-)
The main loop in setup.h is checking pin BROWNOUT (A6) for a "turn off event" in
microseconds (haven't done a calculation) - it uses the variable monitored24Vsupply. It's comparing that voltage to vinCheck (our reference compare voltage) which does get updated every 2 seconds. Originally I had vinCheck just initialize once at startup, but the load changes on the supply as the filaments warm up, so I switched to checking every 2 seconds. Figured a warmed up supply and varying AC mains might effect it as well, hence the slowly updating vinCheck reference value. Also it looks like I've adjusted the code to look for a 1% difference. I think I was able to get this close once I added the slowly updating vinCheck code, and it gains us shutdown speed.
Interesting note: once you flip off the power switch, we still have many milliseconds of useful processing time. The shutdown circuit gets processed immediately, the micro does nothing (a one second delay prevents a command that could screw up eeprom) and then we wait for the relay to slowly disengage.
Auricle wrote:I never would have anticipated that initial heater current might cause the power supply to current-limit or fold-back. You are very insightful, Shannon, or once or twice bitten ;-)
You say of cycling the 24V in setup.h:
- Code: Select all
//this stutter lets the filaments preheat some before fully engaging 24V
//it is meant as a inrush current technique to prevent PS from foldback
Does this technique rely on some current limiting in the power supply?
Twice bitten! I've seen this on my old 12B4 DIY Budgie linestage and also while prototyping this one. All these switching power supplies have very handy foldback current limiting. So a 1A rated supply will go into foldback if the supply hits >1A - i.e. it will then try every 500ms or some value forever thereafter to see if the overload condition is gone. So without the code a supply may work, or hiccup a couple times, or hiccup indefinitely. I just have the relay hit the filaments with some startup pulses to ease the current load at startup. Alternate methods would be to use a larger rated power supply, but this just wastes money and power. 12B4s filaments are just tough initial loads. On my original DIY Budgie linestage, for instance, I've been having people use CL50s in series with them (R31?).
Auricle wrote:Respectfully - comments in either VolumeUp() or VolumeDown() don't appear to correspond to code. The magic of cut & paste?
Remarks for VolumeDown are correct, but swap the polarity in my VolumeUp remarks (as in code). I call the SN75441ONE "H-bridge". The motor driver IC takes all the complexity out of the code work. You just toggle the polarity of the two inputs and enable as long as you want.
- Code: Select all
void VolumeDown() {
digitalWrite(VOL_1A, LOW); // set leg 1 of the H-bridge low
digitalWrite(VOL_2A, HIGH); // set leg 2 of the H-bridge high
digitalWrite(VOL_EN, HIGH); // turns motor on
volumeMillis = millis();
volumeOn = 1;
} /*VolumeDown*/
Auricle wrote:I may have to buy a PCB from you - the preamp is ever more interesting.
Thanks, Auricle!
Shannon