Have you ever just wanted to rip your hair out?!  - Page 1
Forum section: electronics / general

author: MarkS
author_rank: Unknown
timestamp: April 24, 2023, 01:33:02 am
content: I'm trying to prototype a simple flash tester/programmer using a Tiny/ProS3 and two MCP23017 expanders. I have a simple level shifter made out of BS170 MOSFETs. I can verify the shifters are working properly and can read the device IDs from the two expanders, so I know the I2c bus is working.For the life of me, I could not get a consistent read or write on the two pins I arbitrarily chose as an input and output. I'm using adafruit's MCP23017 library and the way this library works is by reading the two port internally and allowing access to the individual port pins as a single array of 16 bits, accessed through a "get_pin" function. Port A consists of bits 0 to 7 and B is 8 to 15.Anyway, I set pin 14 as an input and 15 (GPIO port B pins 6 and 7) as an output. I've been struggling for DAYS trying to figure out why I couldn't read from the input pin and why my voltmeter was showing less than a volt on the output.I've been connecting externally to GPIO port A pins 6 and 7.DAYS!

author: Mr.B
author_rank: Unknown
timestamp: April 24, 2023, 01:42:46 am
content: Been there... Extremely frustrating.

author: basinstreetdesign
author_rank: Frequent Contributor
timestamp: April 24, 2023, 05:17:47 am
content: Many do to one degree or another, as I do. It's called Trichotillomania.

author: David Aurora
author_rank: Frequent Contributor
timestamp: April 24, 2023, 05:43:02 am
content: I had one of these situations last week. One of the power supplies for a recording studios vintage mixing console had gone south, and when it arrived I could see it had been butchered by a notorious local tech already.It was a +/- 24V supply that runs the relays and lamps. At some point it seems the -24 rail has failed, old mate has had a crack at sorting it out but failed, then he's decided to just bolt a Meanwell module onto the lid, bent the chassis to poke the mains and 24V wiring through and call it a day.So I got rid of the hacked on SMPS module, replaced all the missing bits and pieces on the regulator card, removed all his jumper wires that were disabling overcurrent/voltage protection, reconnected the traces he had cut, fixed the many other faults like bad caps etc. Checked voltage, spot on. Turned on the load, supply shuts down. Double checked everything, can't see a fault. Drop the loads down to a really small current, retest, supply drops again.I spent literally an entire day checking and re-checking components, going over and over the schematic (which was similar but not exactly the same as the unit, making things trickier), double checking connections, just completely losing my mind over it. Parts came out for out of circuit tests, went back in, alternatives were tried if there was any doubt... EVERYTHING checked out.Turns out this numb nuts had for some reason re-wired the TO-3 pass transistor socket. It was so obvious later when I looked at the circuit behaviour with this in mind, but it just wasn't even on my radar. The wires ran from the regulator card edge connector socket to a terminal block. The wires on the other side of the terminal block matched the colour coding, and all of it matched the schematic. Those wires disappeared into a heatsink block that was riveted shut and mounted against a grill in the case. You couldjustget an iron inside if you disconnected everything from the terminal block, removed the fan, pulled the heatsink out of the enclosure and flew blind once it was in there as you couldn't see the socket pins once the iron was in there. Apparently that's exactly what he did for some reasonA full day to find, 5 minutes to fix. Unbelievable.