I'm currently trying to follow and RFID cat door project by @EdgeSam
I've got the new code involving millis() he updated, but I can't figure out how he could've done his wiring. I'm a major arduino/circuit newbie, but need this project done within the week. I'm using the same PIR sensor, Arduino Uno R3, and an alternative 125khz RF reader identical to the Seeed one, but just can't figure out if its my wiring that needs to be fixed or if I need a different solenoid. He's using an XHQ-PT solenoid, but those go for like $25+ on amazon. They're also limitted in being stuck open or stuck closed and I can't figure out which one is which. I'm using a basic dc12v push-pull solenoid, but it will either be stuck open or be stuck closed depending on whether I connect it to NC or NO and the RF Read and pir sensor don't change that even if the LED changes from high to low and vice versa. If I need to buy the different solenoid I will but I would prefer to have some form of guidance.
it says the stroke is 53mm so I'm guessing its 53 mm of movement. Will that be a problem? I'm cut for time so idk if I'll be able to get one with the exact stroke distance specified.
The door is just a piece of wood with some acrylic on a door hinge. I'm mainly just trying to put a code together where when the rfid tag is read and matches correctly the solenoid retracts allowing the acrylic to swing freely. I'm currently trying to move the code to work to my needs because I personally don't see the need for the proximity sensor, but I'm very new to coding and am searching in the dark right now.
The problem I'm having right now is that even though the code seems to be working the solenoid doesn't seem to be receiving any voltage. No matter what I do the solenoid doesn't retract. I can see the LED changing from high to low and vice versa on the relay, but the solenoid won't retract.
I was worried about that. I don't exactly have a way to directly connect the solenoid to power other than through the arduino. I essentially have the solenoid grounded to the arduino with the relay being powered by the arduino and the power for the solenoid running through the arduino.
I also don't know of a simple way to splice a connection directly to power for the solenoid considering its a tiny little plug in and not like plugging in a lamp. I don't know if there is a way to provide power to the solenoid without having to dismantle a power cord for it.
I will head to walmart and grab some, but right now I noticed that the relay is receiving power, but the common contact point voltage doesn't change when the LED input changes. The NO and NC work properly, but I can't tell if there is a problem with the center contact point. I'm basing it off of this image.
Sorry, but that statement is totally illogical! The common contact is connected to the NO screw when the relay is not energized, but is connected to the NC screw when the relay is energized.
So then do I just run one wire from the common contact point to the solenoid instead of the messed up wiring I’ve got going on? I’ll check when I get home, currently looking for alligator clips.
So idk what I’m doing wrong to be honest. The only time the NC screw is powered is when the common contact is connected to the power from the arduino. I tried taking a video, but the format isn’t permitted on the forums. Essentially the way I have it hooked up is the relay is powered and grounded to the arduino through the breadboard. The input is connected to slot 9 on the arduino. I have the common contact point hooked up to the 5v from the arduino on the breadboard and I have the solenoid grounded to the arduino with the solenoid’s power hooked up to the NO on the relay. I can tell I’m doing something wrong, but I’m entirely lost. My knowledge on the channel relay is based on this link.
I also noticed within the code that he has I guess an LED connected to pin 13 and pin 11 while I don’t. I’m guessing that’s for added LED’s on the breadboard to signal the “accepted” and “rejected” responses without seeing the serial monitor.
Ok, that’s what I thought. I’m looking at EdgeSam’s Millis code and he says that he hooked up the channel relay to pin 9, but then in the code writes pin 9 as a status LED instead of the led for the channel relay which seems to switched to pin 13. Now I’m confused on whether I need status led’s and why the channel relay isn’t receiving any output from the pins inside the void loop.
I think I see my problem. I have my ac power connected to my arduino. I’m actively using that same power as the power to power the relay and as the AC power for the solenoid. From what I’m seeing the solenoid needs to be connected to a separate source of power.
I’m currently trying to power everything through the arduino connected to a solderless breadboard. The arduino is powered by an ac adapter and my laptop. I have 2 jumper cables running from the 5v and ground to random spots on the breadboard and I’m connecting everything else to the rows connected to this 5v and ground jumper cables.
I just don’t know where to go from here. I don’t know if I need to go a get a seperate power source like a battery to power the relay while the COM receives power from the arduino or if I need to reroute my wiring so that the AC adapter powers the solenoid while the rest of the circuit receives power through a battery.