I am trying to make an alarm system (audible and visual) using a siren and 3 strobe lights. I am using 12v battery like the one used in cars. Now I would like to detect when any of the alarms have failed. I think a strobe-light/siren would fail when it is open circuited or short circuited. So what came to my mind is that the current will increase dramatically when the strobe/siren had just failed. I need a comparator circuit (maybe Schmitt trigger? or an op-amp circuitry?) that will detect over-current in those alarms. Once that alarm failure is detected, I would like the user of the alarm system to be alarmed maybe by a piezo or LEDs.
Strobe light failiure detection
currentdetection
Related Solutions
What you are trying to do is a bit more complicated than you seem to realize. For general unknown I/O pins, it looks like you will need two microcontroller pins. One pin will be a output with maybe 5 kΩ in series. The other pin is a input connected directly to the test chip pin. This allows you to drive the pin high and low, and to leave it undriven. But in all cases you can see what the digital level is with the other microcontroller pin. With this setup, you can detect all the possible digital cases of the pin under test driving high, driving low, or high impedance.
If you stipulate that this test setup is only for digital logic chips and only at the same power voltage as the micrcontroller, then there is no need for analog.
Power and ground pins are another matter, however. These pins need to be tied solidly high or low during operation. In the arbitrary case you will need both low and high side switches on every pin since any of them could be power or ground. This gets messy fast.
I don't want to rain on your idea for a personal project, but frankly this strikes me as quite hard to get right and not much use if you do. 74xxx discrete logic is rarely used nowadays, and when I do need to identify chips I don't find reading the number off the chip all that bad.
How about a capacitor meter? Those little suckers aren't labeled anymore.
Passive tags are powered from a antenna in the environment. The tag then puts a varying load on the RF field, which the transmitter detects. This varying load is a digital bit stream with the tag's ID, checksum, and sometimes additional information.
This system inherently works at close distances. To get enough power to a tag for it to run 5 meters away would take a large antenna and lots of power being sent out by the antenna. If your installation can support a coil of wire a few meters in diameter, then maybe the size of the antenna is OK in your case.
However, the amount of power it must dump into the near field will be very large. As distances go further, the volume over which the antenna has to provide enough power to run a tag goes up. In fact, it goes up with the cube of the distance. This in itself isn't a issue since this is near field and the energy returns to the antenna each cycle. The problem is that the amount of power the tag can absorb as a fraction of the total the antenna sends out gets smaller. Put another way, for the same power at the tag, the signal to noise ratio at the receiver goes down rapidly with distance. Eventually it becomes impractical, which I think will be well before 5 meters.
Another problem is the RF noise (from the rest of the world's point of view) a large antenna dumping lots of power will cause. No matter how carefully you try to arrange the antenna and objects in its near field, some of the power will escape the near field and propagate outwards. Not only are there legal limits to what you are allowed to radiate, but it can cause problems with your own equipment. There will also be unknown effects on humans in the field. There is still much study and disagreement about how much RF energy a human can safely absorb at various wavelengths without long term effects.
We may be able to suggest alternatives if you explain what you are really trying to accomplish instead of asking about a supposed solution. There are such things as semi-passive RF tags. They contain a battery, but don't transmit until they see a particular RF signature.
There are also fully active tags that contain a battery and transmit occasionally on their own. These are true propagating RF transmissions, so can be picked up a good distance away. I worked on such a system that used 434 MHz carrier. The tags transmitted every 10 seconds, a single 2032 coin cell would last 1-2 years, and they could be received up to 60 feet away in a open environment.
Best Answer
For the lights I suggest to use synchronous light detection.
Because your system will be exposed to the ambient light, using a simple threshold would not works (or at least not very well).
What I suggest instead is to take a measurement when the flashing light is supposed to be off and another when it is supposed to be on. Then you subtract the two. If the difference is above a defined threshold, the flashing lights are working. If they are not working, the two measurements would be close to each other and the diff would be close to zero.
If you repeat this several you may reject thing such as ambient light switched-on, sun, flicked of the nearby lamp, etc.
You may use whatever light sensitive device as soon as it is never saturated (when exposed to the sun for instance). Otherwise the synchronous detection won't work and will report a broken light when it is working fine.
Other thing such as current measurement are not completely closing the loop. What you care is that light is emitted, not that the electrical behavior of the light is correct. Think about your light covered with paint. This should be detected as a light failure (we are considering an Alarm system here, right?) Light measurement would detect this but electrical one would say that the system is fine.
The same thing apply to the sound. If you measure the sound using a mic and ensure that is it running loud. Then it's fine. This is what matter at the end.