Bulb Burnout Monitor

The 12V light bulbs on the underside of our kitchen cabinets drop (go dark) like a nest of wasps hit with Raid Wasp and Hornet spray – bunches of them drop all at once.

Is it a voltage surge?

Is it because of a mechanical “whack” of a cabinet door?

To find out – and to have some fun with an Arduino board – I’m designing a monitor to try and capture the fatal event.

The board will monitor the 12.6Vac, mechanical vibration and the on/off status of five light bulbs. If “not all” of the bulbs go off at the same time, I should then be able to look at that data and “see” a voltage spike or a mechanical “thump” at about that same time. That’ll tell the tale of what’s killing the bulbs.

The Arduino will be monitoring three things with different requirements.

  1. The 12.6Vac will be monitored by scaling it to a 0.5V P-P waveform, suitably biased (offset +1.6V) for conversion by one of the Arduino’s A/D inputs;
  2. Mechanical vibration will be sensed by a peak-reading microphone clamped to the wooden cabinet and read by another of the Arduino’s A/D inputs; and
  3. The five (5) bulbs will be monitored by five photoresistors, each connected to a series limiting resistor and digital inputs of the same Arduino.

All three will be monitored in a continuous loop and stored in a circular table. When one of the bulbs dies, the sampling will be halted and the circular buffer of data can then be dumped out for analysis.

Level Shifter

The most challenging part of the electronics is #1, the scaling and offset of the 12.6Vac signal for one of the Arduino’s A/D converters. That input, 12.6Vac RMS, is about 36V P-P (peak to peak). Any transients will be in excess of that. So my goal is to scale the expected (normal) waveform to about 0.5V P-P and place that in the middle of a 3V range (centered at 1.6V, to be precise). That’ll let me detect a total excursion of 6X, or about 90V positive or negative spike in the input.

Since it has been a very long time since I’ve done any analog electronics, I’m knee deep in reference books and dozens of trial draft drawings.

Schematic Capture and Simulator

And, along that re-learning path, I came across an interesting simulator for the iPad. It’s called Spicy Schematics (http://www.iSchematics.com) and, for $12.99, I thought I’d give it a try.

First, the program’s user interface is, well, it’s a “young” program.

User interfaces – the clicking and dragging parts of a computer program – are often the single most complex part of a program. They are often ten times bigger, or worse, than any other part. Making a program’s user interface intuitive and natural is extremely difficult. Microsoft took decades to figure things out that the folks at Apple got in only a couple of years – but it still took Apple several years to figure it out after they started with what they saw at Hewlett-Packard.

Spicy will get there.

And while Spicy also sports a web-browser interface (Chrome and Safari only), it’s about the same as far as usability goes. In Chrome, the user interface is different in some ways since you’re using a mouse instead of finger(s), but the same insofar as the occasional awkwardness goes.

Second, the available parts are very limited*. Resistors and capacitors and simple parts are fairly straight-forward but when you get to active components, the selection is sparse. “Close?” (with a question mark) is the best you can hope for when modeling a real-life part.

  • ISchematics support, by private email, sets me straight: “… we have [recently] added controlled sources, and are adding a library of digital parts soon for digital simulation.”

And third, Spicy Schematics is, at least for now, focused on smaller projects. While you can pan the drawing area to add more stuff in any direction, there’s no zoom; there’s no way to get “the big picture”.

Before settling on Spicy for this effort, I did some looking on the web. There are more comprehensive simulators out there but they range in cost from several hundred to several thousand dollars. And while student versions are available for some of those, I’m not a student and becoming one just for the sake of one purchase and one use (so far) was pushing things too far for my conscience. (National Instruments’ Multisim would be at the top of my list.)

So, for the time being and until I get a chance to compare the real circuit to the modeled one, Spicy Schematics is a good start.

In fact, it is a very good start.

It lets me draw, and modify, and re-draw, and re-modify and re-re-draw the schematic. And it’s relatively short list of parts saves me the time it would take to paw through piles and piles of manufacturer’s specifications to pick out a real one.

In the time I’ve saved by using one of the simple parts that are included, I’ve been able to focus on the basics and revise my slowly developing design through a dozen variations in just a few hours.

As a learning instrument, Spicy Schematics is a good fit.

And it does give what appears to be a somewhat credible simulation, albeit with some fudging on the various parts such as for the 1.6V zener in the lower right corner that I paralleled with a constant voltage source, solely for the purpose of the simulation.

And it only* has a rather generic OpAmp, a 741, not the real world LM378N that I’ll be using.

  • ISchematics, again by private email, opens my view to an entirely unexpected set of possibilities: “… you can use any opamp you like by changing the value of the amp to your own model name, and uploading the spice model on the website .. this is a feature no other web/ipad app has …”

(Note to self: Learn Spice, find models, review what’s already on iSchematics web site.)  [So much to learn, so little time.]

Regardless, the resulting signal (in the simulator) looks to be about 0.4V P-P and centered on +1.6Vdc. That should be just about perfect for the Arduino.

Looking Forward

How that maps to reality is to be seen. Breadboarding the circuit and having a look with an oscilloscope will happen over the next couple of weeks.

I’ve read that I should expect to be able to capture between 500-800 samples per second when running “full out”. Hopefully that will be often enough, and the circuitry adequate, to catch any voltage glitches. (The 100pf capacitor on the inverting input leg of the OpAmp may have to go since its purpose is to remove fast transients. Those are, after all, what I’m trying to catch.)

My next and most immediate step is to figure out the transformer. I have some toroids that should work but I need to read up on them and figure out impedances so I don’t fry the input side with too heavy a load, nor burden myself with counting an excessive number of turns on primary or secondary. (I’m only doing a “small signal” job so size and power handling can both be small.)

Once that’s done, I’ll be ready to purchase the remaining small parts and put the breadboard together and do the first “smoke test”.

Stay tuned!


EDSkinner.net began in 2023. Fiction and non-fiction publications are included as well as (blog) posts and supplemental materials from flat5.net (2004-present).

Comments submitted on individual pages are subject to approval. General suggestions may be sent via the Contact page.

© Copyright 2024 by E D Skinner, All rights reserved