Page 2 of 2

Re: Lamp Zapper Guide

Posted: Fri Mar 16, 2018 2:05 am
by coops375
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 :)

Re: Lamp Zapper Guide

Posted: Thu May 31, 2018 3:55 am
by Rens_tillaer
Thanks for the guide. It's great. Quick question though. Do you have a STL file or something from the project box?

Re: Lamp Zapper Guide

Posted: Tue May 07, 2019 5:57 pm
by ToxyRocker
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?

Re: Lamp Zapper Guide

Posted: Tue May 07, 2019 6:03 pm
by wermy
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/

Re: Lamp Zapper Guide

Posted: Wed Apr 14, 2021 11:20 am
by RetroRocket
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);
}
}

Re: Lamp Zapper Guide

Posted: Wed May 12, 2021 11:09 am
by ashishkumarji
I wasn't entirely sure what I was looking for since I've never used one before.