mstone@yawp.com wrote:I spent a couple of hours last week building a 'dead bug' circuit to test a design. Got it all soldered together, plugged it in, and gradually noticed the smell of a chip burning. I'd forgotten that when you flip an IC onto its back, the VCC and GND pins move to different positions.
LOL!
It was very useful to wake up and read this, as I've done the same thing twice now.
I'm still pretty new to the entire electronics and computer programming realm. Hell, I've been in medicine for over 20 years, I still learn something new every day (typically I announce it and point it out to my students).
Back to business (but by all means, share your anecdotes that underline that you're only human. We all need them from time to time).
The logger worked all night (stability hasn't been an issue). It's been reading a fraction of a lux when the lights are out. It's at 16 lux when my computer screens are on. It's around 115 when everything in the office is on. That signal is pretty noisy because it's a noisy environment. Computers are playing, people are moving, etc.
So a couple of things contributed to the bizarre data, both were sloppiness.
The first was that I was sloppy with my "Find/Replace" command. This caused the sensors to work fine in the low to high range, but drop their sensitivity to nothing at a certain "saturation". At this point the transduced signal dropped to zero (almost zero in relation to the thousands it should have been), and stayed there while the light falling on the sensor was high. Then, the sensor's saturation dropped past a certain threshold and the transduced signal went through the roof again (the graph looks like vampire fangs from the lower jaw), but steadily decreased. The minimum transduced signal levels were identical because they were driven to that level by the incorrectly applied formula (my error).
The interesting thing is, I got slightly different data from each sensor. It looked like I was polling two different sensors from the same light condition.
I had incorrectly created the "readLux" part of the library. I hadn't put "self" in the passed variables to the function. The function was calling a default condition I had written into the code, and was only looking to Bus1 for data.
The numbers I was getting out were due to the fact that we're taking samples about half a second apart. We're measuring a changing system. That half a second is enough to get a slightly different reading, which is exactly what was observed.
I've got to bounce in to town and see the family. I'll be back on (late) tonight. I'll post some more details.
I didn't know anyone was reading this, except csalty and scortier.