question

Hello I am a student from Sweden and I need some help from you. Right now I'm working on a projekt.I bought the Arduino Uno and I want to check reley with RFID. 4 lights, I want to turn on and off with rfidcard. Each card must verify the state of a relay basically check in and check out. (on-off) I am grateful if you can answer back on my questions. With regard Agron Sweden

Don't bother checking for the two duplicates of this question, I've deleted them.

Edit: that's now THREE cross-posts I've deleted.

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME

it is the first time in the forums sorry I did not know about

You have 4 lights, each turned on or off by a relay. Your 4 relays are controlled by an Arduino. The Arduino is connected to an RFID reader. You have 4 RFID cards. Each card controls one of the four relays/lights. As a person enters the area they put their card on the reader to turn on their light. As each person leaves they put their card on the reader to turn off their light.

Do I understand correctly?

johnwasser: ....

As a parson enters the area........

I don't think it is restricted to persons of a particular religious faith. ;)

Weedpharma

yes so i think john

just like you said john I want to do. I have 4 pieces rfid card. best regards agron

Agron: it is the first time in the forums sorry I did not know about

That's why we made a sticky topic: How to use this forum

By the way "question" is not a good thread title.

I'm tempted to reply: "answer".

Is this another cross-post?

Boy, we are desperate aren’t we? Do you think asking the same question six times gets you six times as many responses, is that what you think?

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

4 lights, I want to turn on and off with rfidcard. Each card must verify the state of a relay basically check in and check out. (on-off)

How do rfid cards check of the state of a relay being controlled by an arduino?

Start with any Arduino. I recommend the Arduino UNO because it is most common and therefore easy to get help for.

Add a 4-relay module. You can get them from eBay for under US$5. Pick one with optocouplers/optoisolators for additional safety. The contacts on the relays will act as AC switches to provide power to the lights.

Connect four Arduino pins to your four relays. I'd use pins 2,3,4,and 5. Pins 0 and 1 are the serial interface so don't use them unless you have to.

Buy an RFID reader that works with the Arduino. Also available from eBay for under US$5. Usually they connect to the Arduino with a serial connection. Use SoftwareSerial to turn pins 6 and 7 into a serial port.

Write code to read card ID's as they arrive. Keep track of the state of the relay outputs. When a card ID matches one of the four, toggle the state of the relay and set the output pin for that relay to the new state.

That is all you need.

If the signal lights are remote, you might want to add local lights so the user can tell if their light is ON or OFF.

Hi, I think the OP wants the RFid to toggle its respective output, such as getting on and off a bus.

Tom.... :)

I think the OP fired off six questions, and then went to bed, as we haven't heard from him/her since. Maybe s/he was hoping there would be a nice lot of replies in the morning.

Agron: Hello I am a student from Sweden and I need some help from you. ..... I am grateful if you can answer back on my questions.

You didn't actually ask any questions, so it's not clear what you need to know. Have you tried anything so far, if so show us and explain what (didn't) work.

Since you're a student, and this is presumably a college / uni project, you won't be expecting full solution will you?

So you need to go first...

That said, here's my advice:

  • If you haven't got any Arduino experience yet, work through the examples
  • Then separate the "rfid" side of things from the "relay" side of things in your mind: don't think of it as "card must verify the state of a relay" because that's not how it works.
  • Read up on how to work with relays. The exact details will depend on the relay module you have. Get that working. For testing your relays, I'd use switches on some digital pins as your inputs. If "this pin" is high or low, do something to "that relay", kind of thing. This might help to get started; just a random site I found by Googling "arduino relay module"
  • Then read up on the rfid: I modified the code in this thread to read my cards, and it's simple to add a few lines to handle 4 cards not 2. Get your cards working...
  • Then once you have the relays working correctly and the rfids working correctly, combine the two sketches so that if I read "this card" do something to "that relay"

One thing is for sure: as a student, you won't get a turnkey solution here.

Good point, JimboZA. I think the implied question was: will you do my homework for me?

And the answer? No.

Hi, I hope he doesn't work for MYKI. (Sorry a sad Victoria, Australia, Public Transport JOKE)

Tom..... :)

Sadly, I have to use that system. It is so bad it would take quite a few paragraphs to explain exactly why.

Hi, we have it out here too, but simple for buses and train to big smoke. None of this zone stuff.

Tom.... :)

It can't possibly be as complicated as they have managed to make it here. It's like it was programmed by ... beginners. :)