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
Lamp Zapper Guide
-
- Posts: 1
- Joined: Thu May 31, 2018 3:42 am
Re: Lamp Zapper Guide
Thanks for the guide. It's great. Quick question though. Do you have a STL file or something from the project box?
-
- Posts: 5
- Joined: Tue May 07, 2019 5:36 pm
- Been thanked: 1 time
Re: Lamp Zapper Guide
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?
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?
- wermy
- Site Admin
- Posts: 1346
- Joined: Tue May 03, 2016 8:51 pm
- Has thanked: 620 times
- Been thanked: 1322 times
- Contact:
Re: Lamp Zapper Guide
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/ToxyRocker wrote: ↑Tue May 07, 2019 5:57 pmJust 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?
- 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
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
Zapper
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;
}
}
#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;
}
}
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);
}
}
#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);
}
}
-
- Posts: 1
- Joined: Wed May 12, 2021 11:04 am
Re: Lamp Zapper Guide
I wasn't entirely sure what I was looking for since I've never used one before.
Who is online
Users browsing this forum: No registered users and 1 guest