Using Parallax Basic Stamp II to Ring a Doorbell Remotely





Introduction: Using Parallax Basic Stamp II to Ring a Doorbell Remotely

The problem? A dog that gets way too excited when the doorbell rings.

The solution? Ring the doorbell at random times when no one is there, and nobody answers it, so as to counter-condition the dog - to break the association that a ringing doorbell equals excitement.

The technology? A Parallax 418 MHz RF Keychain Transmitter, Receiver, and a Basic Stamp 2.

Step 1: Design

Parallax makes some very easy to use Microcontrollers. For this project, I used their Basic Stamp II and their 418 MHz keychain tramsitter and its matching receiver.

On the schematic, the receiver is marked IC2, the Basic Stamp is marked IC3. IC1 is an LM7805 voltage regulator. BP1-3 are binding posts. P1-11 are sockets and plugs, where off-board components connect to the on-board components. S4 and S5 were going to be dipswitches, but ended up being jumpers. The idea is that if I steal the BS2 for some other project, I can close these two jumpers and connect two of the RF Receiver buttons directly to the relays.

The relays are S101N11 solid-state relays.

I built it on Perfboard, cut to fit a Radio Shack project box. I didn't have connectors or headers on-hand so I used some machine-pin sockets. They're in five groups. P2 is where the internal 9V battery plugs in, if I'm powering it from an internal 9V battery. P1+P3+P4 connects to the external power binding posts, the on-off switch, and the power-on LED. P5+P7+P10 and P6+P8+P11 connect to the switched binding posts, the indicator LEDs, and the momentary contact test switches. P9 is the Basic Stamp serial programming interface.

Step 2: Soldering

There are plenty of instructables explaining how to solder, so I won't recap.

I built this on perfboard in a Radio Shack project box.

My usual technique for through-hole perf-board soldering is to use wire-wrap to make the connections, then to solder the wire-wrapped connections. The thick black wire wrapping around the board is the antenna.

The first picture shows the back of the board, where the connections are made. The second shows the front of the board, inserted into the box with the connections to the off-board devices (switches, LED, and binding posts) made.

Step 3: The Code

The code is pretty simple - Basic Stamps are programmed in Basic, as the name would suggest.

The program has buttons 1&3 switch one relay, buttons 2&4 switch the other relay, and button 5 starts switching the relays randomly, between five and fifteen minutes apart.

You'll notice two commented-out sections. I used to have buttons 3&4 latch the relays - press them once and they'd close, press them again and they'd open. That's not appropriate for a doorbell, but I left the code in the file in case I use the box for something else.

Step 4: Installed

When I went to install this, I found that the doorbell wiring was a tangled rats nest that was impossible to work with. So I made a little junction panel out of a piece of basswood and some screw-down junctions. Two wires from the transformer, two wires from each of the two doorbell buttons, three wires from each of the two doorbell ringers, all come into separate screwdowns on the outside rows of the junction panel, and are connected using short patch wires between the inside rows. The panel is screwed into the wall with 1/4" standoffs.

The project box is mounted using velcro against the wall, sitting on the top edge of the junction panel.

Rather than relying on a battery, I added a the smaller project box on top. This contains a bridge rectifier, a 1000 uF 35V capacitor, an LM7809 voltage regulator on a small heat sink, and the 7809's ripple caps. This converts the doorbell circuit's 16VAC into 9VDC, which is acceptable as input to both the 7805 and the BS2's onboard voltage regulator.

You can see the transmitter hanging on a nail.



    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Pro Tips Challenge

      Pro Tips Challenge
    • Paper Contest 2018

      Paper Contest 2018

    We have a be nice policy.
    Please be positive and constructive.




    Ceasar Milan would straighten out yr dog in 3 minutes ;-)

     could i use my basic stamp to put out infrared codes and open anybodys garage or work anybody's TV lol

    Would it not have been simpler to have made a jump circuit along the doorbell to output wire since theres only two strips and you just solder a switch inbetween the two?

    There are two door buttons, and two bell units, and each bell unit has two bells and three wires (one wire for each bell + ground). The box is wired in as simply as it can be, if it's going to emulate both buttons and trigger both bells.

    Wow, really nice Instructable. Nice soldering job you have done, I would be getting burned a lot, nice job.

    I like wire-wrap because it makes for cleaner connections than other prototyping methods I've tried. Traces on the circuit board are cleanest, of course, but that's a lot more work. Wire-wrap is often used without soldering, of course, but it tends to loosen up over time unless you're using special-purpose wire-wrap sockets (which have sharp corners on the pins). Wire-wrap won't work for high-current circuits, or for high-frequency signals. But it works great for simple digital circuits like this.

    Have a look a this. I'm really impressed with that guys wiring techniques. And the stuff he's designing are 9 times out of 10 absolutely outstanding....



    I'd never seen anyone use enameled wire for anything but coil winding. Interesting technique. I may give it a try, someday.

    I've used magnet wire to salvage broken PCB's and it works great. An ideal finish is to secure them with epoxy, especially on the turns. I have a future project in the works to salvage a N64 Gameshark that was nearly broken in half. I may post it in the future.

    I have to add that I like the motives of this project, and it may work, but dogs think differently than that. The most common mistake is to "humanize" dogs, as if they think like we do. They are intelligent, but their brains work on a more primal "program" that ours do. You have to be a pack-leader, and assert yourself as such at all times.

    The order of structure for any dog is: Discipline, exercise, and affection, in that order, and no other. Without the first, the second and third are meaningless, without the second, the first and third is meaningless, etc...

    Affection is only deserved for approved behavior. Giving affection for a dog that is insecure only reinforces the behavior associated with insecurity as being an approved mode to stay in. Affection = expected behavior to a dog, which is why you don't coddle a dog in fear, or you will encourage fear as a way of getting affection by that dog.

    If your dog is behaving in a manner that you do not approve of, and you cannot immediately stop the behavior, your problem is not the doorbell, it is the relationship between you and your dog. All dogs are "pack animals", despite their appearance, and if you express disapproval when the dog behaves this way, and they ignore you, either the dog does not respect you as the alpha "pack-leader", or you are inadvertently promoting this behavior as you try to suppress it through the wrong means. There is a right and a wrong way, and more often than not, people use the wrong way without them even knowing it.

    Dogs *require* a discipline in a hierarchy, a structure, and they have to know that you are in charge of them, if you expect them to follow you and your wishes as pack-leader. That is their genetically-ingrained social structure. It's not that you punish the dog, or hurt them when he does undesired behavior, it is that you assert your dominance, but without anger toward them.

    Exercise is important, to spend a dog's internal energy, or it may be focused on other things inappropriately, such as a doorbell ringing. Lack of enough exercise can make the trigger mechanism for a dog more "itchy", because dogs get "cabin fever" more easily than humans do. Most dogs need a daily walk of at least 30 minutes, or at least 1 hour of active play, to get out their internal stress of domestication. If you take your (fit) dog out for an hour and it does not tire, it's probably bored overall. Be sure to give him/her enough attention and love, and a good weekend of trying to play with them until they are simply exhausted, is good for their health, and great for your relationship with them.

    If you are truly dominant over a dog, they will know it and will comply absolutely, which is why you never show a vicious or combative dog any fear on your part....never retreat. Defy a dog's challenge for alpha-status against you, and it will more likely than not submit to you wholly, so long as you are consistent, firm, and unrelenting. Many breeds respond tho this right away, some will be less trusting, but even a Doberman can be stared-down into submission (figuratively-speaking, only trained-pro's know what I mean).

    An initial measure for extremely aggressive dogs is to snatch them by the scruff of the neck and hold them down, on their side, until they submit. The most important command for a dog is "DOWN", where the dog is expected to submit and lay down, off it's feet. Dogs can learn words (a chihuahua can learn at least 165 different single-word commands, yes, 165 words), so be firm and unrelenting, as you would with an unruly child that you are fed-up with. As soon as you cave in your dominance role, and allow them to bend or break any rules, they will continue to do so, and push it as far as they can get away with, in an attempt to gain "pack-leader" status. This is the only politics they know, so you have to know the game and play it better to get their respect, submission, and the desired behavior.