Solenoid is... backwards?

Hi so I threw a bunch of things together and basically, I made an RFID door lock. The only problem is is that the solenoid starts in the retracted position with the relay set on the LOW state, which changed to HIGH if a card matching those in a list is found, which then, the solenoid goes from its retracted state to the extended state. - basically its just working in reverse and I have no idea why.

Any and all help is appreciated,
Chris

Maybe your logic is backwards or maybe the relay is wired wrong. It should be in the locked-position when power is off, right? If that's working correctly you just need to reverse your logic in software.

About the solenoid, is the extended position the active (powered) state? Or the unpowered state?

Some relay modules are active LOW, others active HIGH. I've encountered both, can be quite confusing if you're dealing with a mix in a single project. How about yours? Which way does it work?

It sounds to me like you indeed simply have to reverse the logic in your code.

wvmarle:
About the solenoid, is the extended position the active (powered) state? Or the unpowered state?

Some relay modules are active LOW, others active HIGH. I've encountered both, can be quite confusing if you're dealing with a mix in a single project. How about yours? Which way does it work?

It sounds to me like you indeed simply have to reverse the logic in your code.

DVDdoug:
Maybe your logic is backwards or maybe the relay is wired wrong. It should be in the locked-position when power is off, right? If that's working correctly you just need to reverse your logic in software.

The relay is active in a HIGH state I believe, and the solenoid is locked in the unpowered state and retracts when it is connected to the relay, however, I will attempt to reverse the logic in the program and double check the wiring for the relay, and I will let you know how that goes. I didn't realize that some relays could be active in a LOW state. Thank you guys for your help.

Topher264:
The relay is active in a HIGH state I believe, and the solenoid is locked in the unpowered state and retracts when it is connected to the relay, however, I will attempt to reverse the logic in the program and double check the wiring for the relay, and I will let you know how that goes. I didn't realize that some relays could be active in a LOW state. Thank you guys for your help.

Good news - problem solved thank you