Lamp Zapper Guide

Got an idea for a project? Found a cool project you want to share? Post it here!
coops375
Posts: 1
Joined: Fri Mar 16, 2018 1:52 am

Re: Lamp Zapper Guide

Post by coops375 » Fri Mar 16, 2018 2:05 am

Morning all,

I finally got around to building the lamp zapper :)

Everything works now which is nice, the only problem I have is the straw with electrical tape around the IR LED doesn't really help.

I've even tried aluminum foil around the straw and then electrical tape on top of that, but still had little success. The IR receiver still picks up the IR LED despite not pointing anywhere near it.

Any tips on reducing the directions of the IR LED?

I'll aim to post picks if you want to see them. I'm from the UK so had to do the IR receiver power section a little differently.

Tips - the knock off Arduino boards I purchased had a different pin-out to the FTDI cable I bought which meant they wouldn't program at first.
- cleaning alcohol is great at removing hot glue :)

Rens_tillaer
Posts: 1
Joined: Thu May 31, 2018 3:42 am

Re: Lamp Zapper Guide

Post by Rens_tillaer » Thu May 31, 2018 3:55 am

Thanks for the guide. It's great. Quick question though. Do you have a STL file or something from the project box?

ToxyRocker
Posts: 5
Joined: Tue May 07, 2019 5:36 pm
Been thanked: 1 time

Re: Lamp Zapper Guide

Post by ToxyRocker » Tue May 07, 2019 5:57 pm

Just found this on youtube and love it. Im going to make my own but i have a little question.
How fast does the arduino boot? Had an idé to add a microswith to the trigger as an on/off switch.
If that is to slow i'm thinking grip safety. Like on a real firearm.

Any thoughts?

User avatar
wermy
Site Admin
Posts: 1346
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 619 times
Been thanked: 1323 times
Contact:

Re: Lamp Zapper Guide

Post by wermy » Tue May 07, 2019 6:03 pm

ToxyRocker wrote:
Tue May 07, 2019 5:57 pm
Just found this on youtube and love it. Im going to make my own but i have a little question.
How fast does the arduino boot? Had an idé to add a microswith to the trigger as an on/off switch.
If that is to slow i'm thinking grip safety. Like on a real firearm.

Any thoughts?
Should be very fast, and actually, something I've been meaning to do is make the trigger power it up, use a transistor to keep itself on momentarily, and then cut power, similar to what I did in this project: http://www.sudomod.com/3d-printed-ardui ... -ornament/
ImageImageImageImage

User avatar
RetroRocket
Posts: 146
Joined: Sun Apr 09, 2017 8:53 pm
Location: Seattle
Has thanked: 60 times
Been thanked: 64 times
Contact:

Re: Lamp Zapper Guide

Post by RetroRocket » Wed Apr 14, 2021 11:20 am

I know this is an old project, but hoping someone with more experience can help me. I'm pretty unga-bunga when it comes to programming.

My boss is actually responsible for the design of the US NES and Zapper, and I'm building him a sort of trophy for his career achievements. I thought it would be awesome to build an NES with lighting triggered by firing the zapper at it. I followed the guide but replaced the extension cord to the lamp with a 12v adapter running LED strip tape.

Thanks in advance!

EDIT: Figured it out! I ended up having to modify the script with support from my buddy. I was using this ATmega328P based Nano clone
The pinout is different so some things had to be adjusted. Will be posting my own project as a new thread when finished.

Lamp
SpoilerShow
#include <IRremote.h>
#include <Bounce2.h>

#define RELAY_PIN 12
#define BUTTON_PIN 10
#define RECV_PIN 11

Bounce button = Bounce(BUTTON_PIN, 10);

bool relayState = false;

IRrecv irrecv(RECV_PIN);
char lastChar;

void setup() {
Serial.begin(9600);
pinMode(RELAY_PIN, OUTPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP);
digitalWrite(RELAY_PIN, relayState);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {

button.update();
if (button.fallingEdge()) {
relayState = !relayState;
digitalWrite(RELAY_PIN, relayState);
}

if (irrecv.decode()) {
char result = char(irrecv.decodedIRData.decodedRawData);
Serial.print(result);
if(result == 'P' && lastChar == 'Z') {
relayState = !relayState;
digitalWrite(RELAY_PIN, relayState);
}
irrecv.resume(); // Receive the next value
lastChar = result;
}
}
Zapper
SpoilerShow
Transmitter:
#include <IRremote.h>
#include <Bounce2.h>

#define triggerPin 2

IRsend irsend(9);
Bounce trigger = Bounce(triggerPin, 9);

void setup() {
pinMode(triggerPin, INPUT_PULLUP);
}

void loop() {
trigger.update();
if (trigger.fallingEdge()) {
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);
irsend.sendRC5('Z', 12);
delay(20);
irsend.sendRC5('P', 12);
}
}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest