Doorknob touch alarm 28

Posted by Matthew Tue, 25 Apr 2006 10:14:00 GMT

I recently found a doorknob touch alarm schematic while browsing Discover Circuits’ archives. The project was originally intended as a present for my brother’s dorm room, but a bad capacitor and the lack of a proper oscilloscope caused delays. It has not made it off the breadboard, and it probably will not until his next semester. The circuit contains a few basic elements, an flip-flop based oscillator, a set of delays, a flip-flop as a sensor, and the audible alarm.

Close-up

The schematic

Download the schematic

Doorknob touch alarm schematic

The oscillator

The first section of the circuit is an oscillator based on a flip-flop. Clock and D are both grounded while Reset is tied high. Hence, the output Q will only be high if Set (node 6) is high. When the output is low, the transistor Q1* is cutoff. This allows *node 6 to be charged with a delay relating to the system of impedances R1*, *R2, R3*, and *C3. Once the voltage at node 6 triggers Set, the output changes to high and Q1* is opened. *Node 6 then discharges out through the capacitor. Once node 6 is low enough, Set is no longer triggered and the output is automatically reset (because R is tied high) to low and the process is repeated.

The screen capture below shows node 6 charging and discharging as the blue trace. The yellow trace is the output at node 1. You can see that the output turns high when node 6 reaches the switching threshold of the flip-flop (about 1.8 volts). Right afterwards it spikes up due to feedback through C2*, but quickly starts discharging. The oscillator switches off when *node 6 returns below the 1.8volt switching voltage. Feedback through C2* draws *node 6 to ground before the process repeats itself.

Charging and discharging of the oscillator

In order to change the period of oscillation, adjust the value at C3*. If you would like to make the pulses longer, adjust *C2. The circuit works best right where it is at, though.

The delay and ‘sensor’

The output of the oscillator is divided down two paths. The time constants of the two delays are nearly equal and can be adjusted with the sensitivity potentiometer. The path to node 11 is the Clock input of the flip-flop, and the path to node 9 determines if there is an alarm or not.

A perfectly calibrated sensor

In the capture above, node 9 high than the the clock. Hence, the flip-flop stays high when the leading clock edge triggers it to lock. When the doorknob is touched, your body absorbs some of the charge and node 9 charges slower. This can be seen in the capture below. When the clock edge rises, node 9 is not high yet and low value is locked into the flip-flop.

When the doorknob is touched

The alarm

The designer uses an audible buzzer in order to relay the alarm. This is also my intent for the circuit, but I use a LED in my photos because you cannot see sound. They are both attached to the inverting output of the second op-amp (Q-bar) because it is high when the alarm is triggered.

The sensor being tripped

There is an endless number of uses for this circuit, but I will just name a few crazy ideas:

  1. Using the intended buzzer for your hotel or dorm room. (This is a bit more impressive than the old sock trick.)
  2. Connecting the output to a relay that triggers the doorbell for you house. Just make sure to put it in parallel with your standard doorbell switch. That way you can still hear the Fed-Ex man. (This one has a major cool factor when someone opens your door.)
  3. Tying the output into a security or home automation system. You could have the lights turn on as soon as you touch the door handle to scare the dog away from laying on the door.

Photo Gallery

Close-up The Oscillator Oscillator charging Uncalibrated Calibrated Alarm touched Connected to handle Alarm tripped 1 Alarm tripped 2 Alarm tripped 3

A low power, long life LED flashlight circuit 16

Posted by Matthew Fri, 03 Mar 2006 04:17:00 GMT

Scouring the Internet for information on LEDs, I accidentally stumbled upon a PDF detailing a flashlight made from PVC. For the torch, he biases ultra-bright LEDs with ballast resistors as described in my LED lighting guide. This is a simple solution, but a with a slightly more complicated circuit we can extend battery life by over ten times!

Download PDF instructions for the inefficient version

PVC flashlight LEDs

Electrical losses in the flashlight

In this flashlight, each LED/resistor combination consumes 4.5volts at 30mA or about 135mWatts. The ballast resistor alone consumes 1.1volts at 30mA or about 33mWatts. Therefore, 25% of the power being drained from the batteries is lost in the resistor of each LED chain!!

Battery life

The ‘C’ size batteries in the PVC flashlight have a capacity of around 4 500mAh. If you build your flashlight with seven LEDs, there is a constant current drain of 7 * 30mA or 210mA. Dividing this into our battery capacity, it becomes obvious this flashlight will only stay lit for about a day. This is a far cry from the 50-100 hours claimed by commercial flashlights running on smaller ‘AA’ batteries.

Cutting your losses

As mentioned above, the ballast resistors are wasting 25% of our battery power. Electronic Design proposed a simple circuit to resolve this in a recent article. The front end of their circuit draws less than a milliamp of extra current.

LED Boost Controller

The circuit is best described in two parts: one, the boost circuit function of Q1 and Q2, and two, the control circuit of Q3 and JFET1. Assume Q1 is off. With the battery voltage slightly above Q2’s VVB, a positive Q2 base current [iB = (battery voltage VBE)/RJET1] would flow. Q2 turns on, which switches inductor L1 to ground.

The end result is a 23volt pulse (as shown in Figure 2) across the series of ultra-bright LEDs. At 278kHz, the human eye cannot distinguish the difference between these pulses and a constantly lit LED. This saves even more battery power.

As the battery voltage decreases, the pulses become further apart. The brightness remains indistinguishable until the voltage falls near 2volts. (The circuit does not function well below 2volts) I doubt the PVC flashlight has this efficiency near the end of its life.

The extended battery life

According to Electronic Design, this circuit consumes an current equivalent to about 17mA. Powered by our ‘C’ cell in the PVC, this circuit could run for 265 hours! This is ten times the original PVC design.

Make your own light bulb

Posted by Matthew Thu, 02 Mar 2006 01:57:00 GMT

Theodore Gray, co-founder of Wolfram Research, Inc makers of Mathematica, wrote up an amazing article on making your own light bulb. The project is quick and simple, but a little pricey:

  • Element: Tungsten
  • Time: 30 minutes
  • Cost: Roughly $50

Lightbulb in a testtube

Edison’s first mistake was living before tungsten wire was available. Tungsten is way better than carbon as a filament material, and now you can find it in any metal-supply shop… His second mistake, repeated in classroom physics demonstrations to this day, was using a vacuum to get the air out of the bulb…

RFID-Zapper

Posted by Matthew Fri, 24 Feb 2006 05:19:00 GMT

Afraid the government is trying to track you? Want to disable your old credit cards wireless signal? Need to get that new backpack out of Macy’s without getting caught? You need to disable those RFID tags.

There are several ways to deactivate RFID-Tags. One that might be offered by the industries are RFID-deactivators, which will send the RFID-Tag to sleep. A problem with this method is, that it is not permanent… The RFID-Zapper solves this dilemma… It generates a strong electromagnetic field with a coil, which should be placed as near to the target RFID-Tag as possible. The RFID-Tag then will receive a strong shock of energy comparable with an EMP and some part of it will blow, thus deactivating the chip forever.

The RFID Zapper

If this zapper was bigger, then I could mess up Wal*mart’s inventory for months.

Powering LEDs costs mere pennies 33

Posted by Matthew Tue, 07 Feb 2006 22:07:00 GMT

Lately the hoopla concerning LED lighting has been overwhelming. Everyone claims this costs mere pennies to power. I decided to put a new twist on a classic science experiment to prove that LEDs do cost pennies to power. Literally.

An LED powered by pennies.

Creating a battery from pennies

In order to turn pennies into batteries, another electrode and an electrolyte are needed. In this case, dimes (zinc) are used as the positive electrodes and salt water is used an electrolyte. Copper wire, galvanized nails, and lemon juice are also popular and cheaper solutions. Such a battery produces a differential of about 0.5 volts.

One penny battery in an ice cube try.

Finding ample power for an LED

Unfortunately, this battery is not enough to light an LED. In order to string eight of these cells in series, an ice cube tray is used. Metal paperclips hang the pennies and dimes into the electrolyte banks. Because the paperclips are conductive, the eight cells are automatically connected in series forming a more powerful battery. This provides a differential of about two volts.

As you may notice, 0.5 volts * 8 != 2 volts. Not all of the banks produced a reliable voltage. In fact, one bank seemed to be working against me.

8 battery banks connected in series.

Lighting a LED with pennies

Generally, LEDs require a resistor to prevent excessive current flow from blowing them out. This project does not require a resistor because the battery simply cannot provide that amount of current.

Connecting the short end of the LED to the penny and the long end to the dime lights up the LED! Everything works as planned. The penny batteries provide about 110 micro-amps of current in series. At two volts, this is only about 220 micro-watts of power!

It does in fact ‘cost’ pennies to power an LED.

Project Photo Gallery

Cleaning the pennies before hand. Drying the pennies. One penny battery in an ice cube try. 8 battery banks connected in series. Voltage difference over a single battery bank. Total differential voltage over all 8 penny batteries. The current lighting the LED. The LED powered by the pennies. The LED is fairly bright in the dark. Night vision even though the lights are out.

Sound card based signal generators 4

Posted by Matthew Wed, 25 Jan 2006 05:40:00 GMT

Previously, E-DSP visited the possibility of using your sound card as a signal/function generator. I was curious about the results, but did not have a Windows machine close by to test it. After some searching, I found a Linux alternative and was able to test the limitations of my Sound Blaster Live!

SigGEN: A Linux signal generator

SigGEN for Linux Screenshot

SigGEN is a fairly advanced signal generator designed specifically for Linux. It is able to generate sine, cosine, triangle, sawtooth, square, and pulse waves as well as white noise and frequency sweeps. It also supports separate waves on each stereo channel and setting phase differences between them.

Digital Signal Generator (Windows)

Digital Signal Generator Screenshot

I was also able to find a Windows-based solution more advanced than E-DSP’s. It is able to generate sine, square, and triangle waves as well as chirp signals and noise.

Reproduced wave accuracy

Modern computers have no problem accurately calculating a reproducing small signals. Therefore, any limitations will lie in the sound cards specs. Most modern sound cards have a 16-bit digital to analog converter (DAC), and 24-bit DACs are becoming more popular. Even 16 bits of accuracy is far better than the 10 bits common on most embedded microcontrollers.

The major limiting factor in wave reproduction is the sound cards sampling frequency. It is limited to 48kHz. Hence, any frequencies near or above 24kHz are extremely hard (if not impossible) to reproduce without additional hardware. This limit is rather low and limits the generator usefulness as a high frequency signal generator.

Maximum deliverable voltage

Testing the maximum voltage delivered

I am sure that different sound cards are capable of delivering different voltages. My Sound Blaster Live! card was able to deliver four volts as seen above.

Maximum current and power

A sound card is also limited in the amount of power it can deliver. Once a voltage source reaches its power limit, it begins acting as a constant current source. It simply delivers less voltage to compensate for the limited current.

In order to test the sound card’s limit, a potentiometer is connected between the generated signal and ground. The resistance is then decreased until the current peaks and the voltage starts to decrease.

Finding the maximum power

Once we find the point of maximum power, the potentiometer’s resistance is measured, and Ohm’s Law is used to find the current delivered. In this case, the resistance is 24.8K ohms. V = I*R tells us 0.16mA is being delivered. P = V*I = 0.6mW maximum power.

This is not a lot of current or power. This is why E-DSP reccommends an amplifier.

Project photo gallery

DIY Lie detectors

Posted by Matthew Fri, 20 Jan 2006 14:10:00 GMT

Makezine recently posted a diy lie detector kit that uses your skin resistance (aka sweat) to detect a lie. The kit is well explained and consists of two probes you place on your palm with a red/green led readout.

Multimeter based feedback

This is all well and good, but sometimes a little more feedback is a bit more intuitive. We are trying to learn here.

Some time ago, Jason Bradbury created his own lie detector using only a resistor, a transistor, an led, and a multimeter. The led lights up if you are lying, but the multimeter provides more precise feedback of the skin’s resistance.

If you are really desperate, you can just clip the leads of your multimeter straight to your subjects palm. The ‘scary’ device may cause them to sweat and ruin the experiment, though. Just don’t tell your girlfriend you will shock her if she does not love you.

Finger straps and the LEGO RCX

The galvanic skin response sensor uses a LEGO RCX brick to detect lies and also has numeric feedback. The finger straps are the best part of this project. Your subject will know you mean business when you clip these puppies to your multimeter.

Galvanic skin response finger straps

DIY Hard Drive Clock 2

Posted by Matthew Thu, 19 Jan 2006 04:29:00 GMT

The hard drive clock is quite possibly the best diy electronics paperweight I have come across. Even though it has no particular use, it is uber cool. The clock requires a PIC 16f628 microcontroller, and old hard disk, and some miscellaneous components.

Unfortunately, the design lacks a real time clock. After a few days, you’re going to be late. He also mentions adding a fancier hourly chime. Personally, I think an old school computer beep and some circling LEDs would be perfect.

HDD Clock on HDD Clock off

Hopefully I can find some time to convert my old 800MB drive into a $300 clock. It would be perfect for my office because the bedroom is definitely out of consideration.

DIY FM Radio receiver 1

Posted by Matthew Mon, 16 Jan 2006 13:50:00 GMT

DIYLive.net dug up a simple fm radio. ‘A good starter DIY project for anyone interested in audio.’

AM radio circuits and kits abound. Some work quite well. But, look around and you will find virtually no FM radio kits. Certainly, there are no simple FM radio kits… I have developed this simple radio kit. It is a remarkable circuit. It is sensitive, selective, and has enough audio drive for an earphone.

Simplest DIY motor demo

Posted by Matthew Sun, 15 Jan 2006 23:10:00 GMT

Justin describes how to build a DIY four part motor. It requires a battery, a wire, a screw, and a small disc magnet. The hardest part is getting the screw to hang from the battery.

The way this motor works (as shown below) is by creating a closed circuit, where the current actually flows through the magnet. When this happens, a magnetic force turns the magnet, which spins the screw.

Simple motor in action

He also posted a Google video of the motor in action. This project has always been great for procrastination or entertaining youngsters.