Download Power Supply - Fresh Nelly

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Three-phase electric power wikipedia , lookup

Electric power system wikipedia , lookup

Islanding wikipedia , lookup

Audio power wikipedia , lookup

Electric battery wikipedia , lookup

Electrification wikipedia , lookup

Rectifier wikipedia , lookup

History of electric power transmission wikipedia , lookup

Opto-isolator wikipedia , lookup

Power inverter wikipedia , lookup

Uninterruptible power supply wikipedia , lookup

Power engineering wikipedia , lookup

Distribution management system wikipedia , lookup

Power electronics wikipedia , lookup

Alternating current wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Voltage optimisation wikipedia , lookup

Power over Ethernet wikipedia , lookup

Buck converter wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Power supply wikipedia , lookup

Mains electricity wikipedia , lookup

Switched-mode power supply wikipedia , lookup

AC adapter wikipedia , lookup

Transcript
SIAB POWER SUPPLY V.2b
By Sandra Sims
I.
Introduction
pg. 1
II.
Connection Headers
pg. 2
III.
LED Indications And Modes
A)
Charge Modes
1)
Fast Charge
2)
Pulse Charge
3)
Trickle Charge
B)
Battery Usage, Modes
C)
Safety Features
pg. 2
Interface (Single Wire PWM)
A)
Pulse Signal Types to Power Supply
B)
Data Request Response Data
C)
Data Handling by S.I.A.B. Main Controller
D)
Data Timing Charts
pg. 4
V.
AC Power Adapter Requirements
pg. 6
VI.
Adjustments / Theory
pg. 7
VII.
Schematic/Layout Diagram
pg. 8
I.
Introduction
IV.
pg. 3
pg .3
pg. 5
The second try is the charm. It'd better be! This is the Version 2.B. design of the SIAB power supply. The first
was splitting 30VDC into a 2 rail supply, but it acted strangely and was a danger to the multiples of voltage
sensitive circuitry in the SIAB! The next, which is this design/board had a "lesser/older" PIC chip (16C71), which
may have done the job had I not fried it, and discovered it is now obsolete. Thus the new kid is the PIC 16F716.
This, of course, required quite a lot of change to the programming.
This design uses a single, medium voltage supply (19 Volts) to create the voltages required by SIAB: +5VDC,
+8VDC, +12VDC, and an inverter to supply -12VDC, and -3VDC. A second +12VDC powers the microcontroller
switched inverter. There are 2 5VDC regulators to help separate high-draw pulses etc if needed from the quasianalog circuitry (needed by ADC's, low voltage analog) and saving some line noise issues.
The Audio (Industrial) system circuitry is all +/- 12VDC. The draw on the negative side isn't especially high, but
the inverter's power output can be augmented by replacing the last 47uF cap. in the Voltage multiplier with a
470uF cap, or lowering/bypassing the Thermal resistor on the inverter's input. ( 5 to 0 ohm ). In the interest of
saving battery power, the present components are a meager draw.
-1-
II.
Connection Headers
This front board view shows the headers. The label on the regulators can be used as a guide. All 3-point headers
are grounds. The ANGND, or case ground is isolated via inductor. This is the intersection point for all analog Gnds.
To ensure good connection on Gnd side, all 3 pins on any header plug should be soldered together (during final SIAB
project stages).
III.
LED Indications And Modes
The panel LED shows various "states" of the power supply. During each mode the LED can act differently. When
the power switch is turn on/off, there may be a short delay in response from the LED. This is normal.
A) Charge Modes
When AC is first applied (via plugging in) the battery charge mode starts by default.
1) Fast Charge
If the power switch is off, an attempt at a fast charge will be made. Fast charge cycle lasts 23 minutes, but can
be cancelled by any of the following:
-Turning on the power switch
-Battery has reached full charge
-Battery is overheating
-Time-Out: the 30 minute fast charge time has passed
-AC is disconnected
Fast Charge:
When the power switch is turned on, it is assumed the power supply may have difficulty keeping up with the
demand of charging and running the SIAB at the same time. With the present power supply ([email protected]) this
isn't an issue at all, but usually if the power switch is on, the SIAB is going to be used for a while and a fast charge
is unnecessary.
For a certain full charge during limited available time, the fast charge sequence may be re-initiated on LED starts
flashing. Unplug the AC power for a few seconds (LED will flash 8 times) then plug back in.
2) Pulse Charge
Once the fast charge has completed, or the power switch was turned on with AC power, the Power Supply goes
into pulse charge mode. This will usually last an hour or more. Pulse charge checks the battery against adjusted
value (See section VI.) which is slightly above the adjusted value that may have ended the fast charge cycle.
Pulse charge is indicated by the LED flashing every 1.5 seconds or so. If the power switch is on, the LED will
flicker out at this rate. The charge pulse is only 100 mS long.
3) Trickle Charge
After the pulse charge level requirement has been met, a "trickle" charge mode ensues. This is NOT a slow trickle
but rather a sparse pulse of 100mS over 10 minutes or so. This will keep the battery from "falling off" over time,
which is important to keep the voltage level up beyond the rated 14.4V (at >16V)
There is no indication (except the LED is not on at all when switch is off) that this mode is active.
-2-
B) Battery Usage, Modes
The battery will be charged whenever the AC power is connected, while on or off, but battery powered run times
will vary greatly with the charge time.
The fast charge will allow the battery to power at 350mA for about .5 hours right away, but a fast charge
followed by a pulse charge of a few hours can raise the run time to an hour or more. If left plugged in, the Pulse
charge will add enough current to provide extended periods of battery operation. In theory, a 2600mAH battery
should run at [email protected] A for over 7 hours. This will never be the case, but a really long charge period could
offer several hours.
To ensure a decent run time for an AC-less stage performance, 2 or 3 Fast charges should be initiated, followed
by an overnight Pulse/Trickle charge. A fast charge will re-start if the AC is removed for a few seconds, then reapplied. The LED will stop flashing after AC is removed. AT this point a new fast charge can be started.
When running under battery power, once the battery becomes excessively low, the LED will start to blink, slowly
at first, then faster. With a decent charge, the LED blinking can mean only a minute or so remains. If the charge
wasn't so good, then it can mean seconds! This warning is controlled by the PIC chip in the power supply. Once
connected to the SIAB, the ATMEGA will provide a more advanced warning.
If, while not plugged in to AC power, the battery voltage isn't enough (at a preset level of 14V) the power supply
will not start. This seems high, but under load the battery falls considerably, so it's a buffer zone.
C) Safety Features
Besides a charge time-out, the Power Supply has a Thermal sensor on the Battery's negative side. This is where
heat will accumulate first, especially if there is a problem with the battery. This thermal will cause an exit from
the fast charge mode only.
To prevent over-heating of regulators under excessive load, there is a heat sensor on the main heat sink. This will
increase the fan speed to help dissipate the heat. Note: There is no shutdown routine.
The battery charge path is fused across 3.6 ohms so a shorted battery will pop the fuse. The resistors will
continue to carry current, helping with diagnosis.
The Main Input to the board is fused at 2 Amps, even though most switching supplies have auto-shutoff if the
amperage draw is exceeded.
The Main output drive to regulators is switched by a "constant pulse train" (paired with Neg.V.Inv High-side).
This only allows the P-Channel MOSFET to Switch on once a pulse train is established. (1 - 2 mS)
If the PIC micro hangs for any reason, the train will stop and the power will disconnect within 1 mS. For this
reason, all internal routines have been bridged to control this output (and RB,4: Inv.Low-side)
-3-
IV.
Interface (Single Wire PWM)
Internal data/modes/ADC readings can be read by another microcontroller via the 1-Wire Interface. This
interface is quiescent high, and responds to 4 different commands. These commands are issued by varying low level
pulse lengths. Because of this, the 1-Wire bus is always high impedance until in use.
A) Pulse Signal Types to Power Supply
The following commands are determined by the following pulse length "borders":
Command
1-Data Request
2-ATMEGA ShutDown
3-Hold Another 2 seconds
4-Reset Power Supply PIC16F716
________
Pulsewidth
100uS-997uS
1.5mS-5mS
6mS-10mS
20mS+(max 2s)
Description
Returns 7 bytes of ADC/Status Data
Causes a shutdown in 1/4 second, regardless of Switch
If a shutdown in progress, holds+2s. If not, ignored.
Does a reset. In DC, will cause abrupt shut down.
The above table describes the basic function of each command, but not the uses.
Data Request can be used to create a power chart in the SIAB main processor (ATMEGA) thus allowing a
more accurate Battery Left estimate. This can also be used to count on time, and set Time-outs/AutoShutdowns in certain situations. (i.e. if on battery & has been running for 10 minutes with no song play or
adjustments or audio activity, then shut down.)
Data Request can be used to measure ambient (battery thermals) temperature in case some
temperature-sensitive controls need to be aligned (i.e. VCO controls on PT2399's)
ATMEGA Shutdown can be used when a "Standby" Time-out occurs.
Hold can be used to stop any potential shutdowns from occurring during a large Save operation. By
sending a pulse before the operation, waiting regulator discharge time (<1 second) then repeated pulses
every 2 seconds, corrupted writes to SD card and EEPROM's can be avoided.
-
B) Data Request Response Data
The bytes returned after a Data Request is issued are as follows:
Byte0: ADCON Register in PIC. Always 010x xxxx so can be used to verify a good link.
Byte1: ADC_BATT_LEV. This is the raw ADC input from the ((Batt-10.85)/2)*51.2 circuit.
Byte2: ADC_BATT_THERM. This is Battery thermal reading. ADC=Therm.k /(2.2k+Therm.k)*5*51.2. T=10k@20°C
Byte3: ADC_BATT_ADJ. This holds the setting of the Charge Threshold Pot. (usually 3.2-3.3V = 163-169ADC)
Byte4: ADC_THERM_FAN. This is the Thermal level at the heat sink. Same pull-up as Batt.Therm. Fixed fan at 179
Byte5: SSTATUS. This Register contains the P.S. Mode flags. These flags are:
bit 0: Set by pulse from ATMEGA. Always cleared by Data send time so always=0
bit 1: Switch condition. 1=Off, 0=On. Used to "see" change in switch condition.
bit 2: AC power flag. Updated immediately. 1=AC, 0=Battery
bit 3: Fast Charge Flag. This could only be set when power to ATMEGA is off, so for testing only.
bit 4: Neg. Voltage Generator Flag. 1=On, 0=Off. Again, only during testing as comes on with Regs.
bit 5: Indicates Battery Power at Startup. NOT reset by switch to AC power, only by AC startup.
bit 6: ?Pulse/Trickle Flag. 1=In Pulse Charge. 0=In Trickle. Only valid if Bit 2 = 1 (AC power)
bit 7: Set with Battery Warning State. There's only a few seconds left in the battery!
Byte6: SHUTDOWN_CNT. This is the 3 second countdown buffer. If<>0 the a shutdown is in progress.
-4-
C) Data Timing Charts
The following charts are guideline parameters for the SIAB receiver timing. The data burst follows a pulse not
longer than 1mS sent. (10uS-500uS would be fine)
There is a response time delay (analysis chart below) that can vary, but will never be much in excess of 106uS. It
may be as short as 16uS so input needs to be monitored by software for this time duration. The monitoring "taps "
must be at least every 10uS or first bit may be missed entirely.
The first low pulse after the response delay will be the first byte's MSBit 7.
The low pulse is the PWM data pulse. A low pulse with duration around 11.4 uS signifies a binary "0", while a low
pulse of duration 21.9 uS signifies a binary "1". Because of line length inductance/capacitance these may vary by 1
or 2uS. Thus, a border at [(21.9-11.4)/2+11.4 =] 16.65 uS can decide between a 1 or 0.
The impedance of the output port is about 120 ohms, but pull down/up periods are about the same. The high side
of the pulses may vary depending on bit states and position in the byte. These should not be used for any data, but
can be used to verify the end of a byte.
-5-
The high side "between" bytes is always 22 to 23 uS. The longest high (after a zero) otherwise is < 18 uS. This
method is not recommended unless data is very important, in which case a second Data Request could be sent to
verify the first. Data integrity can be tested with the first 3 bits, always "010xxxxx" as this is a pre-amble, which
is read from the current ADC control byte ADCON.
Note: The high pulses between 2 binary 1's can be fairly short. Allow no more than 5 uS in the receiving routine
during bit-banging operations. This equates R/C timing to allow 100 kHz. (half cycle)
The total transmission of 7 bytes will take 1725 uS to complete. If only the first 2 bytes of data are required,
the "read" could terminate there, but normally all data will be read.
This means there will always be 56 high low transitions. Any less and there is an error. The 1-wire interface
returns to input (pulled up by 4.7k resistor) 22 uS after end of 56th low pulse. So the requesting processor
(ATMEGA) should leave this line as an input until it is required, or will need to wait that time period.
Here is a decoding of the data sent. Leading "010" can be seen, followed by unknowns.
Notice that SSTATUS bits 1&3 are set, indicating Switch is off, and fast charge is running.
V.
AC Power Adapter Requirements
The Power supply Voltage has Definite limitations. DO NOT power beyond 25 Volts!
The design power supply is 19.1 Volts @ 4.74 amps. A 1 Amp Power Supply could be used as "Fast Charge" only
happens when the Regulators are powered down (Switch off). If using a 1 Amp supply, 24 Volts would be best.
Note: 24 V@1Amp has not been tested. Proceed with caution.
-6-
VI.
Adjustments
Most of the levels are not adjustable, except in software (program mods) but the Charge level is.
Charge Threshold:
This is the level (minus .1V) at which the Fast Charge will kick out. This may change with aging of batteries.
Adjust charge level to 3.4V appx. This is the small pot at top of board. The voltage can be measured from PIC's pin
#1. This is a very fine adjustment, and if set too high won't allow a trickle charge to begin as Pulse Charge won't
be able to get the voltage up. PulseTrickle can take 2+ hours.
Charge Voltage:
The charge Voltage at 19.1 V is wide open. (about 17V) but if the supply is changed up to 24V, then this may need
adjustment. Check the Battery temperature, and whether the Fast Charge kicked out because of that or other
Time-out. By reading the Thermal, Charged V, and Charge V setting, this can be determined. This must be done
with ATMEGA self powered. (Disconnect atmega's power!)
-3 Volt Adjust:
This is a simple voltage adjustment. The control isn't too sensitive as the range has been preset with a resistor.
-12 Volts: If -12 Volts is over drawn, see below on adjusting for more power.
Theory:
Negative Voltage Generator:
There aren't adjustments here, but if the load gets too high for the current configuration, 3 things can be done
to increase the amount of amperage:
1) Change out the remaining 47uF Cap for a 470uF Cap
2) Lower (or short with 1A fuse) the MOSFET 12V supply. (Located between the MOSFETs)
3) Change out the regulator (7812 on end of board) or augment it's voltage by isolating and using diode(s) on Gnd.
The Negative Voltage Generator controller (PIC pins RB,4, RB,7) sends alternating pulses to High-Side (P-Channel)
and Low-Side (N-Channel) MOSFETs. There is a slight delay (37 to 41uS) between each to prevent collisions and
prompt burn-out. This large delay also prevents lock-up from ever occurring as spikes have dissipated.
The quiescent (before startup, change, or at shutdown) level is always set low on the low-side, as in most cases the
next routine starts in with the high side. The reason is the high-side is also a pulse-to-hold switch for the
regulator's MOSFET. If the PIC 16F716 hangs up (Xtal failure, voltage spike, intense RF), the whole regulator bank
is disconnected.
Notes: _______________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
-7-
VII.
Schematic/Layout Diagram
Note: Board hand-drawn from this… not exact! Q7 LED drive mod not shown.
-8-