**COMPLETE** Amazing Spiderman 2 -- Automatic Door Lock **PARTS LIST**

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.


cjschalk

New Member
Hi there, I am almost done with this project, and I really can't thank you enough for sharing this. I am working on coding my arduino to the LEDs/actuator, and I am wondering how you accomplished the polarity switch to retract your actuator without one of those relay switches. Did you incorporate the polarity reversal in the code for the arduino to get the actuator to retract? I'd love to hear. But either way, this is one of the best functioning prop builds I've seen on here. Thanks a
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

JohnnyNeutron

New Member
Hey guys,

I have been getting a ton of messages about the code for this prop. I am sorry that it has taken me so long to respond, I am a senior engineering student and have very little spare time. Anyways, here is the code that I wrote for the lock. It is extremely primitive, but it works just fine.

#include <Servo.h>


#define LINEARACTUATORPIN 9 // Linear Actuator digital pin


const int receiver1Pin = 2;
const int receiver2Pin = 3;


const int greenledPin = 5;


const int redledPin = 6;


int button1State = 0; // variable for reading button one status


int button2State = 0; // variable for reading button two status


Servo LINEARACTUATOR;


int linearValue = 1100; // current positional value being sent to the actuator

void setup()
{


LINEARACTUATOR.attach(LINEARACTUATORPIN, 1050, 2000);


pinMode(receiver1Pin, INPUT); //Pin Definition
pinMode(receiver2Pin, INPUT);
pinMode(greenledPin, OUTPUT);
pinMode(redledPin, OUTPUT);


LINEARACTUATOR.writeMicroseconds(linearValue);


}


void loop()
{


// if button on fob is pressed, set the linear value


button1State = digitalRead(receiver1Pin);

if(button1State == HIGH)
{
linearValue = 1100; //set position value
LINEARACTUATOR.writeMicroseconds(linearValue);


digitalWrite(greenledPin, LOW); //Turn on green led
digitalWrite(redledPin, HIGH); //Turn off red led
delay(200);
digitalWrite(redledPin,LOW);
delay(200);
digitalWrite(redledPin, HIGH);
delay(200);
digitalWrite(redledPin, LOW);
delay(200);
digitalWrite(redledPin, HIGH);
delay(200);
digitalWrite(redledPin,LOW);
delay(200);
digitalWrite(redledPin, HIGH);
delay(200);
digitalWrite(redledPin, LOW);
delay(200);
digitalWrite(redledPin, HIGH);
}



button2State = digitalRead(receiver2Pin);

if(button2State == HIGH)
{
linearValue = 1700;

LINEARACTUATOR.writeMicroseconds(linearValue);


digitalWrite(greenledPin, HIGH); //Turn off green led
digitalWrite(redledPin, LOW); //Turn on red led
delay(200);
digitalWrite(greenledPin,LOW);
delay(200);
digitalWrite(greenledPin, HIGH);
delay(200);
digitalWrite(greenledPin, LOW);
delay(200);
digitalWrite(greenledPin, HIGH);
delay(200);
digitalWrite(greenledPin,LOW);
delay(200);
digitalWrite(greenledPin, HIGH);
delay(200);
digitalWrite(greenledPin, LOW);
delay(200);
digitalWrite(greenledPin, HIGH);
}


LINEARACTUATOR.writeMicroseconds(linearValue);


}



Hope this helps!
 

Azavala0453

New Member
Do you by chance have a picture of where the jumper cables go on the arduino and the breadboard???? If not can you send me one? Thank you!! :)

- - - Updated - - -

I'm stuck on where the wires go on the breadboard and arduino! Can I get some help??
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Azavala0453

New Member
can you please upload a photo of the wiring from the arduino to the breadboard?????????? I've come so far, and that's all I need!!!!!!! Please!!!!!!!!!!!!
 

JohnnyNeutron

New Member
Can you please send or post a photo of the wiring from the arduino to the breadboard for the actuator to move??? Please?

I do not have a photo of the bread board wiring at the moment. However, the wiring it very straight forward. The actuator acts the same as a normal servo, which has 3 wires, power, ground and signal. So, First make sure you have power and ground wired to it, then you will receive your signal from the RF receiver. The same goes for the RF receiver, as in you will have to wire power and ground to it which are marked on the pcb.

https://www.adafruit.com/products/1097

The link above shows some pictures from adafruit where they wired up a simple LED circuit. The overall technique for sending signal to the actuator is the same.

Hope this helps!
 

Azavala0453

New Member
I do not have a photo of the bread board wiring at the moment. However, the wiring it very straight forward. The actuator acts the same as a normal servo, which has 3 wires, power, ground and signal. So, First make sure you have power and ground wired to it, then you will receive your signal from the RF receiver. The same goes for the RF receiver, as in you will have to wire power and ground to it which are marked on the pcb.

https://www.adafruit.com/products/1097

The link above shows some pictures from adafruit where they wired up a simple LED circuit. The overall technique for sending signal to the actuator is the same.

Hope this helps!

So with that being said, does this mean that the actuator would be plugged into the ar500 receiver? I'm more of a visual learner and I've come so far with buying the parts! :(
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

JohnnyNeutron

New Member
So with that being said, does this mean that the actuator would be plugged into the ar500 receiver? I'm more of a visual learner and I've come so far with buying the parts! :(

No, the actuator does not get plugged in directly to the receiver. I respect that you have purchased the parts, and have been working hard. I apologize that I do not have a photo of the circuitry at this time.

https://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors/servo-motors?view=all

The link above is a great tutorial explaining how servos work, and how to send a signal to one using an arduino. Use this exact principle to send a signal from the receiver to the actuator.

I will do my best to field further questions.
 

Azavala0453

New Member
No, the actuator does not get plugged in directly to the receiver. I respect that you have purchased the parts, and have been working hard. I apologize that I do not have a photo of the circuitry at this time.

https://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors/servo-motors?view=all

The link above is a great tutorial explaining how servos work, and how to send a signal to one using an arduino. Use this exact principle to send a signal from the receiver to the actuator.

I will do my best to field further questions.

Ok thank you for doing your best. It's just frustrating because I spent a lot of money and I'm really stumped :(.
 

JohnnyNeutron

New Member
When do you think a photo of the circuitry will be posted??

The lock is in storage at the moment, in one of the many boxes. I built this about a year ago, and havent really thought much about it since, so I apologize that I do not have it readily available. Have you taken a look at the links I provided in the previous posts?
 

Azavala0453

New Member
The lock is in storage at the moment, in one of the many boxes. I built this about a year ago, and havent really thought much about it since, so I apologize that I do not have it readily available. Have you taken a look at the links I provided in the previous posts?

Yes. One problem. The actuator I bought has only two ports at the end of the wire instead of 3. Would it still work? It's a firgelli actuator. And would the principals work *exactly* the same as the servo motor circuitry as it would for the actuator? That's the main problem- turning the actuator on. :(
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

JohnnyNeutron

New Member
Yes. One problem. The actuator I bought has only two ports at the end of the wire instead of 3. Would it still work? It's a firgelli actuator. And would the principals work *exactly* the same as the servo motor circuitry as it would for the actuator? That's the main problem- turning the actuator on. :(

I do not know if it will work with a two wire actuator. The principles from that tutorial will be the same, as far as how to send signals to a servo, which is exactly what is needed. If you have further questions, just shoot me a message here on the forum.
 

Spiderman1

New Member
I do not know if it will work with a two wire actuator. The principles from that tutorial will be the same, as far as how to send signals to a servo, which is exactly what is needed. If you have further questions, just shoot me a message here on the forum.

Yes. One problem. The actuator I bought has only two ports at the end of the wire instead of 3. Would it still work? It's a firgelli actuator. And would the principals work *exactly* the same as the servo motor circuitry as it would for the actuator? That's the main problem- turning the actuator on. :(

Hey I was just wondering if you two are still active on this site and if so could help answer a few questions I have before I begin this project.
 
Last edited:

Spiderman1

New Member
I will do my best to answer any questions you have.

Thank you. here are some questions I can think of off the top of my head.

1. On your one of your first pictures you showed the patio lock, was some of the base of the lock shaved/sanded off?

2. I have looked for linear equators and ive found a 6v 100:1 ratio and a 12v 50:1 ratio, which one do you recommend?

3. I saw you posted some coding for the lock, is it needed and if so, what program would i use to install it?

Thanks again
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Top