You are on page 1of 20

Circuit design, PCB design and Testing

Mixed signal design Defensive electronics PCBs and Power Testing

Mixed Signal Design

Motors
Big, variable current Varying impedance Inductive
Back EMF Spikes & Transients Dissipation

RF Interference Stall protection Thermal

Logic
Low current (~mA) Extreme supply sensitivity Low drive capability RF Interference
Ground Bounce Fast edges Stray inductance

Static sensitivity Pin density

Analogue
Small signals
A mV

Low power drive capability Supply sensitivity


Dont use a battery as a reference voltage!

Sensitive to interference
Screen / Placement

Split supply (?)

Motors
Motors are nasty:

Defensive Electronics (Motors) (1)


Inductance + Intermittent contact..

If contact breaks Current drops to zero instantly dI = - Voltage is infinite! dt Something will break down (Air) Generates big voltage spikes / RF (Interference) Control voltage , not current Provide "escape route" for spikes Provide local power filtering (to protect driver)

Defensive Electronics (Motors) 2


Do some of these things

Defensive Electronics (Logic) (1)


Design the regulator / supply carefully
Read the data sheet Use recommended values e.g. capacitors Use a decent heatsink

Think about fault conditions / turning On/Off


Short circuit to ground Short circuit to battery supply Reverse power connection (Murphy!)...

Think about "Airbags"


Fuse? Crowbar? Undervolt alarm?

Over voltage Crowbar?


Crowbar (thick steel bar) - put across the circuit i.e. short circuit (can be used to blow a fuse -but protect the rest of the circuit Usually with SRC (silicon controlled rectifier) once switched on requires only small current to stay on Effectively have to switch the whole thing off to reset. Or can buy modular over voltage crowbars with different current and voltage ranges

Defensive Electronics (Logic) (1a)


Basic circuit...

More protection (Why not?)

Defensive Electronics (Logic) (2)


Design for test
Incorporate connectors for test / injection of test signals R-C decoupling, not just C: can spot PSU nightmares:

R damps inductance in the power supply resonating with the decoupling capacitor (Small) DC voltage across R Measures supply current

Resistor further isolates Components: Catastrophic multiple failure less likely

Defensive Electronics (Logic) (3)


More design for test
Put in pegs to clamp a scope probe to (avoids shorting pins together)

Design for reliability


Use mass termination Use sockets for ICs (not for discretes) Surround microcontroller with buffers
Kind load to the microcontroller Buffers die first in an accident

Optoisolators? Use different connectors for all connections

Defensive Electronics (Analogue) (1)


Do the resistor in the power supply thing Death to trimmer resistors! (do the sums) Minimise "functions per component"
Compare with beta software:
Non-optimised code: Easy to understand Lots of test vectors: Easy to test

Use monolithic solutions where possible Defend against reversed / absent power supplies (diodes) Use M.O.R. components if OK

PCBs and Power


Don't forget mechanical design
Solder isn't structural! Don't forget bolt holes Make sure you can disassemble the machine (bolts not epoxy!)

Make power tracks nice and fat, use fuses Put sensitive components on other side to power / noisy components Leave space around stuff that gets hot Use insulating sheet under / between PCBs Use a groundplane

Testing
(See handout on construction and test) Check power supplies are all OK
Right voltages On right pins Not oscillating No spikes
As motor runs / stops As logic switches As line is detected

Now CHECK IT AGAIN!


Components usually killed by power supply faults

Testing -using a scope


If measuring voltages make sure the knob is in the CAL position and x 10 is taken into account If measuring frequency make sure the knob is in the CAL position and x 10 or expand is taken into account Always best to check using the built in test signal -usually 1 V ,1 kHz square wave

Testing -using a scope (2)


Although relatively high impedance 1 M ohm 20 pF, cable capacitance can add another 80 pF Also this capacitance can make some circuits go into oscillation So use x 10 probes so circuit sees larger input impedance of 10 M ohms in parallel with a 5 pF capacitance This also means you have to multiply the voltage seen on the scope by 10

Testing (2)
Check subsystems in isolation first
Use an oscillator to test motor drive Use test fixture to test logic Test analogue system working away from sensor

Check subsystems can be connected without explosions with expensive components removed first Don't put the board down on bits of wire Check for overheating all the time Document all tests and their result

"The person who never made a mistake never made anything"

You might also like