Op-amp and UV diode PCB layout issues - Page 1
Forum section: electronics / beginners

author: Bucataru
author_rank: Newbie
timestamp: October 19, 2023, 06:23:25 pm
content: Hi, I'm a long time fan of Dave's videos and first time poster on this forum. I made my first custom gadget for a friend as a baby shower gift but after testing I found everything works great except the UV sensor. It was a last minute addition so I imitated the schematics I found athttps://github.com/adafruit/Adafruit-GUVA-Analog-UV-Sensor-Breakout-PCBand athttps://wiki.seeedstudio.com/Grove-UV_Sensor/.I breadboarded the circuit and it worked very well. My ESP32-S3 dev board read the millivolts on the op-amp output no problem. So I suspect I seriously goofed the PCB layout. I've tried to debug it but no matter what I do my multimeter just reads 2.4 millivolts on the op-amp output leg (when I turn on the 3.3V_Sensors power supply, otherwise it's zero as it should be).I appreciate any help or debugging tips. I still have a week left before the baby is due. Thanks!UPDATE: If future civilizations stumble on this, let it be known I goofed. I was reading the analog signal at an 8-bit resolution instead of 16-bits.

author: Kim Christensen
author_rank: Super Contributor
timestamp: October 19, 2023, 08:19:28 pm
content: Powered on:Assuming code is loaded into the esp32-s3 so that pin 39 is configured as ADC1_CH0, you could use your meter on diode check across D14 to inject a small voltage across it and see if the output of the op-amp responds and/or if the esp32-s3/code sees the ADC voltage.Powered off:Either the UV photodiode is bad or the opamp is. Not really a lot to go wrong there. I'd just ring out the connections with a meter to make sure nothing looks off. (Like pins 1 or 2 of the opamp not being shorted to gnd or vcc, via a bad component or PCB.)EDIT: I can't see the markings on U9. Are you 100% you've got the correct version of it fitted because there are 3 different foot prints:

author: Terry Bites
author_rank: Super Contributor
timestamp: October 21, 2023, 12:09:32 am
content: That's the volts you'd expect to see for a dark Photodiode.Check your diode connections. Have you killed your diode?

author: Benta
author_rank: Super Contributor
timestamp: October 21, 2023, 12:19:36 am
content: Oh, dear!Another so-called " schematic".No, I'm not going to decipher/search for your labels, sorry.

author: temperance
author_rank: Super Contributor
timestamp: October 21, 2023, 01:57:30 am
content: QuoteThat's the block diagram you silly.Jokes aside, because of a general shortage on the global market some people and companies can only supply block diagrams because the CAD ran out of lines.

author: jwet
author_rank: Frequent Contributor
timestamp: October 21, 2023, 06:01:53 pm
content: Under the pad for UV (pin 1 on the op-amp), I see what looks like a via pad? It would seem like this is a short to the ground plane? Obliterate that via connection on the back of the board. (a 1/8 or so drill works)- just relieve the connection to the ground plane.

author: Bucataru
author_rank: Newbie
timestamp: October 22, 2023, 08:03:41 pm
content: Thanks so much! I found my problem. The circuit works but I didn't realise the GUVA, whose circuit I copied, has a different Reverse Voltage(5V) versus the GUVB's Reverse Voltage(3V) which is the diode I'm using.Will that cause me any issues? Is there a way I can modify my op-amp circuit without redesigning the PCB? I have lots of resistor and capacitor values left over from the tapes I ordered to assemble this.GUVA:http://www.geni-uv.com/download/products/GUVA-S12SD.pdfGUVB:http://www.geni-uv.com/download/products/GUVB-S11SD.pdf

author: jwet
author_rank: Frequent Contributor
timestamp: October 22, 2023, 08:35:38 pm
content: Was the via a short too?The way the amp is designed now, the PD will never see more than about Vcc/4 due to the divider R5/R36. You're fine.Thank me with a thanks if you don't mind- one of my motivations.

author: Bucataru
author_rank: Newbie
timestamp: October 22, 2023, 08:52:24 pm
content: Quote from: jwet on October 22, 2023, 08:35:38 pmI'm not sure what you meant the first time. Drilling through any of the vias named GND would have simply disconnected the components from ground. The other vias don't seem shorted under a magnifying glass nor under a continuity test. I don't have any vias under pads. I think that costs extra at JLCPCB.Quote from: jwet on October 22, 2023, 08:35:38 pmThanksI think it maybe is messing with the sensitivity. I have to shine a really bright UV light at it to go from 0 to 1 millivolts.

author: jwet
author_rank: Frequent Contributor
timestamp: October 23, 2023, 12:14:39 pm
content: No really, you have the output shorted to ground at pin 1.You have a transimpedance gain of 4 million with that divider and 1M ohm. You should be getting a volt or more!Look at pin 1 on the op-amp in the layout stuff you posted. This is net UV- the output of your amp. You can just barely see a pad poking out under it. This is shorting the output! Don't drill out the via. Just take a larger drill (1/8" or so) and disconnect that via from ground on the opposite side of the board. Spin it around by hand on the via until its isolated from the ground plane.

author: Bucataru
author_rank: Newbie
timestamp: October 23, 2023, 05:36:54 pm
content: Quote from: jwet on October 23, 2023, 12:14:39 pmOh, you mean that grey circle? That's just an artifact from the PCB software, EASYEDA. It's theDocumentlayer that I forgot to turn off. The circle should be hidden or white when exporting, but oh well. I've tested every single pin, pad and net for shorts and they all check out.

author: jwet
author_rank: Frequent Contributor
timestamp: October 24, 2023, 12:23:07 am
content: I can't imagine why the gain is so low? Carry on and good luck.

author: jwet
author_rank: Frequent Contributor
timestamp: October 24, 2023, 05:23:36 am
content: The way the circuit is implemented, the detector is biased at 0V, changing devices won't matter- its at a virtual ground.