Instructables

Arduino Remote Control

Problem: Living out in the middle of nowhere, I have problems getting fast internet, so I have a big antenna on my roof (see picture). The connection is borderline so it seems to help if I recycle power on my radio/antenna. Being a Lazy Old Geek, it is not convenient to unplug and re-plug the power connector.

Solution: Often, I am reclining on my bed with my laptop, (see easylaptopstand), so I decided to build a remote access power resetter (see first picture) with an Arduino clone. I can aim my laser pointer at the resetter and it will automatically cycle the power on the radio/antenna.

Parts list:
Phototransistor: Digikey SFH310 $ 0.38
Relay: Digikey Z146-ND (G2RL-24DC5) $3.22
Transistor: 2N3904
LED book lamp: Dollar store
Laser pointer: Dollar store
Anarduino (Arduino clone): Ebay $18.90 for 2

USB-BUB: seems to be cheaper at Wulfden $16
http://wulfden.org/TheShoppe/pa/index.shtml
 
 
Remove these adsRemove these ads by Signing Up

Step 1: Simplified Electronics Theory

Skip this step, if you’re not interested or already know it.

A phototransistor is basically an on-off switch like a light switch or a pushbutton. But it’s controlled by light instead of mechanically pushing the button. When light illuminates the phototransistor, the two leads will (basically) be shorted together. When the light is removed the two leads will be disconnected. (see picture)
Specifications: The specification that is most significant is whether it is an NPN or PNP. My design is based on an NPN phototransistor. The data sheets have a lot of information about wavelength, sensitivity and (collector) current. Unless you are designing for a specific application, these shouldn’t be that critical. Most phototransistors will respond to typical light sources like LEDs and laser pointers. One thing you may need to worry about is the distance between the light source (especially an LED) and the phototransistor. With the LED and phototransistor, I had, they had to be within about three inches of each other. That’s why I decided to use a laser pointer where I can be across the room.

A relay is (usually) an electromechanical switch. (See pictures) The relay is the upper part of the drawing. The little curly cue thing is the coil. It is an electromagnet that is a magnet when voltage is applied to the coil. When there is no voltage, the COM (COMmon) connector is connected to the NC (Normal Connected) connector.
When the coil is activated with voltage, the magnet actually moves the COM connector. The COM connector is disconnected from the NC and is connected to the NO (Normally Open) connector.
So depending on what you are trying to do, you can open a circuit with the voltage or close a circuit or both.
By the way, this is called SPDT (Single Pole Double Throw). The particular relay I am using has two sets of contacts, so is a DPDT (Double Pole Double Throw) but I am only using one set for this application.

The second drawing shows an important feature of a relay labeled “Isolation.” What that means is the coil is completely electrically and physically isolated from the contacts.
Specifications: The specifications for relays are divided into the input (coil) side and the output (contacts) side.
On the input side, the voltage and current are important.
On the output side, the current capacity is the most important.

A transistor is an electronic amplifier with three leads. See picture. There are two types of transistors, NPN and PNP. I will only be using NPN. Basically a little current between the base and emitter controls (amplifies) a lot of current between the collector and emitter.
 
globrite9 months ago
A nice and safe alternative is to use a Wattstopper power unit which is UL approved, has zero voltage switching and as a bonus has DC output at about 150 mA to power your controller. One such unit (B-120 EP) is available from Amazon for about $15. - Enjoy.
arduino man2 years ago
If any one would like some cheap handmade arduino bricks
pleas go to my etsy shop 111swords.
I would greatly appreciate it.
Fearce12 years ago
Nice, I've spent alot of time reading and learning from your posted instructables
Great work!

Q: What happens when you shine the laser then remove the laser (to reset the Anarduino) then repeat the process while its running?
Does it just re-trigger the reset or ignore it until its finished with it's sketch?
msuzuki777 (author)  Fearce12 years ago
Sorry, I had to revisit this Instructable as I forgot how it worked and I've dismantled it for other projects.

Every time the phototransistor sees the laser, it will re-trigger the reset. The reset pin on the AtMega takes precedence over any software that is running.

Technically, the low reset needs to last 2.5microseconds to guarantee a reset.

LOG

p.s. I was just looking at the AtMega documentation. There is a way to disable the reset pin but I don't know how you would do it.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!