I just spent the most frustrating couple days troubleshooting what is a really stupidly simple design (just an active optical volume control using phase cancellation). And in the last hour I had two eureka moments where I finally went "Oh you dickhead... OF COURSE that isn't going to work right!". Literally 1 minute with the hot air gun and some part swaps and I'd made the board a winner.
I'm still fairly fresh to electronics, definitely no expert. So I always try to make sure I learn from mistakes, and here's what I think went wrong (and this is a fairly common occurrence with design problems I have)- through the process of going from idea, to PCB design, to working prototype, I lost sight of some of my reasoning behind bits of the design and then totally jacked the circuit by tweaking things without proper care for my original design choices. I'll try to explain with my usual design process.
- I started out with an idea in my head and scribbled it down as a rough collection of black boxes and intended/desired functions.
- I took some basic measurements of parts to see if it was plausible and fine tune part selection (in this project, that was the useful range of a light dependent resistor, and choosing the optimum LED to vary it as well as playing with potentiometer tapers for smooth control).
- I then put down a fairly complete schematic on a whiteboard. Not really worrying about drawing up assumed things like protection diodes and bypass caps and stuff, just the guts of the real circuit.
- Once I've gone through that and it looks right I'll fire up Eagle and draw it in, fine tuning part package selection and playing with values to make the most of bulk ordering parts
- Then I'll etch the board, slap it together and fire it up for a test run.
And that's where things usually go to shit
![Grin ;D](https://www.eevblog.com/forum/Smileys/default/grin.gif)
It'll start with a little thing like not being happy with a pot taper or realising I need a little more filtering somewhere. So I'll tweak something, which might mean a few components need a tweak for the function to be adjusted the way I want it. OK, fair enough. Then I'll realise that suddenly the majority of resistors or caps or something has shifted to a different value, so I'll start thinking "Hmm... well, I guess I could adjust this section over here to make use of component value X rather than Y to simplify the BOM...", and I'll do that. Then I'll find a glitch or think of an enhancement or something and think "That's easy to fix, I'll just swap this jumper for an ___ ohm resistor..." and before you know it, I've just lost 6 hours and my device is way off what I was aiming for!
Tonight I found myself getting to the very end of a lot of chasing my tail before I realised that the best part of 2 days had just been lost to ONE capacitor and TWO resistors needing value changes. That's it. The resistors were a mistake from a false assumption (calculated based on a difference source impedance), and the original capacitor choice had actually been right but I'd second guessed myself when the circuit didn't function right. And I must have pulled the board apart and gone back to the drawing board 10 times trying to make the damn thing work the way I want, I'd already started redesigning from scratch and was about to delete the old board design, it was just out of nowhere that I finally clicked to the issues going on.
Maybe that's just the point of prototyping, maybe I'm just venting, I don't know haha. I just hate wasting time over stupid mistakes I should have caught. I'd rather the thing exploded or didn't work at all than be frustrated by it being JUST out of spec or having a minor bug, but that's what always happens to me. Any tips for how to avoid running around in circles? I'm thinking maybe from now on I might write a rundown on the operating principles of a circuit once I've come up with the schematic, so that if I then want to change something I have a sheet of paper in front of me reminding me why I chose a particular value here or there. I think that way I might avoid changing things for "logical" reasons rather than functional reasons. Thoughts?