Saturday 29 September 2018

Ring ring

I've been called many names like perfectionist, difficult and obsessive. I think it takes obsession, takes searching for the details for any artist to be good.
Barbra Streisand

We're not sure how good Barbra Streisand is at electronics, but details certainly caused a half-day delay recently when we first encountered the phenomenon of wire "ringing". The project seemed quite simple - make an attiny13a output to a common anode 7-segment display.

It started badly when two of the displays died in early experiments due to a lack of a current limiting resistor. Finally after a bit of fiddling about, the code was working well outputting the required hexadecimal numbers from an Arduino Nano test-bed. But every time we shifted (pun intended) to the attiny13a, weird extra signals led to faulty inconsistent errors in the display.

The lack of reproducibility was excruciating - and even weirder that an attiny85 behaved perfectly in the same circuit! Was it the individual chips? The circuit? The gods of electronics and their capricious cosmic interference?

Spot the smoothing resistors and capacitors (plus short traces!)
Nope - it was wire ringing in the circuit. As the display was on one breadboard and the chip on the other, a combination of 10 cm connecting wires (too long!), no resistors in line with the 74HC595 shift register (47Ω), no decoupling capacitors (47μF and 0.1μF) to filter the signal and just enough differences between the specs of the attiny85 and the attiny13a to be crucial.

So the final product worked, and it was so satisfying and frustrating at the same time that it has been set up on the breadboard ever since. It is fired up from time to time amidst much sighing, shaking of heads and clucking noises. Or, as Kym would say, "That's very nice, dear."







No comments:

Post a Comment