Introduction: Pulsing Hubby Detector

Picture of Pulsing Hubby Detector
This project uses an RF receiver module to trigger a pulsing LED Heart when the transmitter comes within range. I made this for my fiance for Valentine's Day this year.

I have yet to fully test the range, as I haven't actually taken the transmitter out of our apartment building since I just finished it today. The transmitter/receiver pair that I used is hypothetically capable of up to 500 feet, though that is the open space line of sight range. I haven't yet added antennas to either the receiver or transmitter box, but that should hypothetically improve the current range.

Step 1: Tools and Supplies

Picture of Tools and Supplies

Tools Needed:

Soldering Iron
Drill (or fairly large drill bit for the Dremel)

2 LEDs (1 red for the heart, another any color for a power light for the transmitter)
Printed Circuit Board (I used 276-159 from RadioShack)
2 5v Voltage Regulators (7805 or similar)
2 9v batteries
2 9v battery clips
2 project boxes (I used 270-1803 for the receiver, and a small 3x2x1 or so box for the transmitter)
2 SPST switches (I used 275-645)
2 8 pin DIP sockets (I used 276-1995)
2 PIC 12f683 (you can get a few of these as a free sample from Microchip)
2 Resistors (value depends on the LEDs you use, somewhere around 100ohms for typical LEDs from the 5v regulated voltage)
A small piece of plastic (preferably cloudy, or translucent)
and last but most importantly
RF transmitter and receiver (I used RF-KLP-434 from Sparkfun, which was 11.95 for the pair)

Step 2: Breadboard Testing

Picture of Breadboard Testing

I set this up as a simple circuit on two breadboards (some people on the Sparkfun forums reported having problems getting the receiver/transmitter to work if they were only a few inches apart.)

The RF modules work fairly simply. You just provide them voltage (around 5v for the receiver, and up to 12v for the transmitter) and the signal on the transmitter's data pin is replicated on the receiver.

In my circuit the data pin on the transmitter is being driven by an output on the PIC. I intend to work more on the PIC program to provide an actual data protocol, but in order to actually get this done this weekend, the transmitter PIC currently just sends a high signal for 500ms, then goes low for 500ms, and repeats as long as it's switched on. There is an LED attached to the output pin to give a visual feedback of the pulse so you know the circuit is working.

The receiver is equally simple at present. The data pin goes to an input on the PIC. The PIC waits for a high signal, then pulses the LED as long as the signal is high. When the input signal is low, the PIC waits for 500ms, then polls the input again.

Here's the code for now: *NOTE* The actual loop to make the LED pulse was taken from an example on the Sparkfun forums by user cheesy and just modified to make it run slower


#use delay(clock=4000000,int=4000000)
#use fast_io(A)
#fuses nomclr

void main()
while(1) {


#use delay(clock=4000000,int=4000000)
#use fast_io(A)
#fuses nomclr

void main()
unsigned int i, j, k, step;
while(1) {
while (input(pin_a3)) {
step = 1;
j = 0;
for(; j < 100 && j >= 0; j += step)
for (k = 0; k < 10; k++)
for (i = j; i != 0; i--);
for (i = 100-j; i != 0; i--);
step *= -1;
j += step;
} while (j > 0);

Step 3: Assembly (pt 1)

Picture of Assembly (pt 1)

I assembled the transmitter circuit first. The connections are fairly simple.

The +9v lead from the battery goes to the switch, which goes to both the transmitter (to run it straight from 9v) and the 7805 voltage regulator. The regulated voltage goes to the PIC.

Pin 2 of the PIC goes to the the LED (via a limiting resistor) and the Data pin of the transmitter.

When the switch is flipped on, the LED begins to blink (every 1/2 second) and the transmitter begins transmitting.

I've left the antenna pin unconnected for now, but I may add an antenna.

Step 4: Assembly (part 2)

Picture of Assembly (part 2)

The receiver is a similar circuit.

The +9v goes to the switch, then to the voltage regulator. The regulated 5v goes to the PIC and the receiver. The data pin of the receiver goes to pin 4 of the PIC.

Pin 6 of the pic is connected to the LED (should be through a limiting resistor, which I forgot on the first go around, I'll have to add it in later.)

Step 5: Final Assembly

Picture of Final Assembly

I drilled holes in the cases for the standoffs to hold the circuit boards, and in the sides of the boxes for the switches.

I used the Dremel to cut out a heart shape on the top of the receiver box.

The plastic I used to cover this was just a thin scrap from a package. I used some coarse sandpaper to scratch/distress the plastic so that it wasn't completely clear, and would diffuse the LED light a bit. I then glued this piece of plastic to the inside of the receiver lid. (the light looks better than it does in the pictures, it diffuses fairly well through the plastic)

Closed up all the boxes and tested it out.

Step 6: Testing and Future Directions

Picture of Testing and Future Directions

Right now I can get maybe 90-100 feet of range with the receiver sitting in my 2nd floor apartment. Since the antenna pins on both the receiver and transmitter aren't connected to anything, I may try to find some small antennas to attach to them to see how much I can increase the range.

I briefly considered just using a 555 timer to generate the transmitter pulse, but decided that since I intend to improve the PIC code it would be preferable to use the PIC in both the receiver and transmitter. (also, using the 555 timer would have required a couple more components to generate the pulse)

I want to implement a simple serial ping so that I can avoid the noise that occasionally randomly triggers the receiver with the current code since I'm just checking for a high input.


JB95 (author)2015-11-15

Cool instructable :)
I was able to gather all required parts except for one; couldn't find a compatible girlfriend device. Where can I find one of those? o.O

The_Adverse_3n!GmA (author)2009-08-04

It makes me wonder how compact you could make this. It'd be great to wire into remotes, cameras, etc, with a very short range to use as a detector for when you lose that kinda stuff.

Lithium Rain (author)2008-04-10

Could I use this to detect other rf frequency devices (like cameras or bugs or hidden cctvs)?

daenris (author)Lithium Rain2008-04-10

Not really. You could potentially use the receiver chip to detect frequencies within the range of the receiver (434mhz). Most devices like you mention (cameras, bugs, wireless video) work on much higher frequencies.

chaoscampbell (author)2007-12-20

lol.... its probably my negative, untrusting mind working....... but its like a last stage emergency hide in the closet cheater nice idea though

Perhaps I am just as bitter as you are, but that is EXACTLY what I was thinking. I would actually be offended and puzzled by receiving a gift like this.

RetroPlayer (author)RetroPlayer2008-03-26

Oops, still good instructable and interesting project for OTHER uses.

turgan (author)2007-02-17

wow. this is a fantastic project. i'm going to go ahead and ask it: can a non-programmer geek be able to overcome this project?

zaydenam (author)turgan2007-02-17

Yeah, If you only want to make the LED pulse you can do it with a really simple 555 astable circuit. Google it find out about its schematic and formula (real simple 3rd grade stuff) and connect the output you get from your 555 oscillator to the transmitter input) And if you can just connect a 5volt supply directly to the transmitter input if you don't want a pulse. However if you want to send seial data you'll have to use a micrcontroller with SCI or if you don't want to use a microcontroller you can use the D3-6402-9 UART. Its obsolete but you can still get it from the net. Its what i'm using for my sign language glove science project at my school.

marcss (author)zaydenam2008-02-11

I may be alone here, but that sounded more like a "No," than a "Yes." =)

daenris (author)zaydenam2007-02-17

That actually won't work. I tried it, and even with a pulsing input, the output just kinda flashes. The pulsing needs to be at the output. So hypothetically you could put a 555 timer on the transmitter to create a blinking effect, and on the output put a 555 timer on the receiver to create a pulse when there's a signal received.

T3h_Muffinator (author)daenris2007-12-01

If you put a capacitor across the clock pin on the 555 and ground, it might work!

zaydenam (author)daenris2007-02-17

Yeah if it doesn't work like that. That's a good alternative. But why would you want a 555 on the transmitter just connect directly to supply so it always transmits in range and use the reciever output to drive a 555 oscillator.

daenris (author)zaydenam2007-02-17

The receiver tends to attenuate when it receives a constant signal, so it would eventually end up losing the signal. In order to prevent that it needs a changing signal received, so you need to turn the transmitting on and off.

Sir No Pants (author)2008-01-25

can i get an approximation on price

daenris (author)Sir No Pants2008-01-27

I don't have an exact breakdown by parts, but overall it was under $30. The RF transmitter/receiver were the most expensive item at around $12 (although now it looks like they're $14 from SparkFun). The project boxes were a couple of dollars each. The PICs I actually got free as a sample from Microchip, but they're likely a dollar or two from Digikey or Mouser. Any switch can be used for about $1-2. Beyond that most of the stuff was very cheap, you can get a bunch of resistors for a couple bucks and you only need two. The voltage regulators are around $1. The LEDs are cheap (again you can get a bunch for a $1 or 2). The battery, clips, and sockets are under $1 each.

sabeen557 (author)2008-01-02

I should make one. Plant the transmitter in my boss' truck. Really good instructable.

jarv34 (author)2007-02-13

nice! have you measured the power consumption to estimate your battery life on a single 9v?

daenris (author)jarv342007-02-13

Not yet. If I get a chance I'll pull them open and check.

macmaniac (author)daenris2007-02-16

Would it be possible for you to provide some schematics for the transmitter and receiver? Thankyou

daenris (author)macmaniac2007-02-16

Yeah. It's pretty straightforward, but I'll add them tonight if I get a chance.

Duardo (author)2007-02-15

I love your project, nicely done. Could you tell me which compiler and PIC programmer you used. I've been looking for a free C compiler and haven't found one yet. Thanks.

Duardo (author)Duardo2007-02-15

Thank you for your prompt and very useful reply.

daenris (author)Duardo2007-02-15

The programmer I used was a homemade version of the RCD Programmer (

The compiler I used was the CCS PIC C compiler, which is not free. There are free versions of many C compilers for PICs, though they usually have some limitations in the size of the code or the types of PICs they can program. SDCC is an experimental open source compiler, and there are some (HITECH, CC5X, BoostC) that offer free versions.

This post ( on the SparkFun forums discusses many C compilers for PICs.

daenris (author)2007-02-13

That is a good idea. I'm relatively new to PIC programming, so I'll have to look into how to setup the sleep/watchdog to control it.

Proteus (author)daenris2007-02-14

This is the project I was talking about, nice use for WDT :

daenris (author)Proteus2007-02-14

Very nice. Since I'm just starting out with PICs the code is very helpful. A lot of the sample code I find is in assembly, which I'm sure I'll eventually have to get a handle on, but I'm a C/C++ software person, and it's harder to find good examples in C. Also really nice that you have the whole circuit in a single socket.

Proteus (author)2007-02-13

Very Nice Project! I've just finished a project using a similar PIC , It's a nice idea to set the PIC to sleep on those 500ms (use WDT to wake up) and also kill the power to the receiver while pic is sleeping (transistor) so that the battery can last longer (I'll post my project soon (also used picc) , it involves a LED but I'm using an ActiveCapacitiveSensor which also drains power...)

technick29 (author)2007-02-13

Wow, this is one hardcore idea! I like it a lot, and I think I'll try making this sometime. Very thorough Instructable also! All around, good job.

daenris (author)technick292007-02-13

Thanks. I figured I'd better make my first one good :)

About This Instructable




More by daenris:14 Day Sweet PicklesPumpkin Hazelnut and Cinnamon Caramel Candy BarsP&acirc;te de Fruits
Add instructable to: