Go Down

Topic: Multiple Arduino on a machine (Read 536 times) previous topic - next topic

prash_21

Hi,

I need help with a project, currently we are using Arduino to automate the card reader in our project. So basically the arduino soldered to the card reader and is connected to the desktop using the USB port.
So whenever our test website needs authentication, the arduino intercepts the request and inputs the pin or password (usually a 6 digit number) of the card to authenticate.

Now the plan is to take this a step forward, we want to have multiple such Arduinos connected to the machine via USB hub and at runtime based on a parameter i.e. a specific card to be used, the corresponding Arduino should be used to input the pin.

So if we have Card A, B and C we will have one USB hub connected to the machine and the arduinos will be connected to its USB ports and so would the card reader be and at run-time if I pass "A" it should input the pin for "A" and so on on for other Cards.

Is it possible and if yes, could you please help me with some pointers please?

Thanks.

sterretje

#1
Sep 08, 2019, 04:47 pm Last Edit: Sep 08, 2019, 04:48 pm by sterretje
How does your Arduino intercept a request?

Why do you think you need multiple card readers?
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

DrDiettrich

You can build a master Arduino, that communicates via SPI or I2C with the input terminals, and via USB to the PC.

wvmarle

What card reader?
What pin code?
Why does the Arduino have to "enter" the pin code?
What web site?
Where's the code running on that Arduino?

Just some questions that popped up reading your rather unintelligible rambling. Remember that you may know "everything" about your project, we know absolutely nothing about it. So without explanation what you're saying there is just gobbledygook.

Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Paul_KD7HB

The quick answer is EACH Arduino will be a different serial port on the PC. Hope that helps.

Paul

taterking

of course it is possible but I cant think of any reason why you would want do this.

first of all if you are only holding a bunch of 6 digit numbers you pry dont need SD cards at all.
arduino boards com with on board EEPROM that should be sufficient storage.

is there some reason why you would need more than one board?
is there some reason you need more than one card?

if so, another alternative would be letting the arduinos talk to each other and only having one connection to the PC.

if you really want to set this up how you are describing then the answer is "yes". just plug all your boards into your usb jacks and a PC will automatically recognize them. the program on the PC just needs to know what port name was assigned to each board to make the serial communication.
Building robots to take over the world.

prash_21

if you really want to set this up how you are describing then the answer is "yes". just plug all your boards into your usb jacks and a PC will automatically recognize them. the program on the PC just needs to know what port name was assigned to each board to make the serial communication.

Hi,

Thanks for the replies guys! I really appreciate it.

I want to use multiple cards and card readers with with aurdino attached to it and the code to input the pin uploaded of it on a machine.

I also understand that if I connect them to a USB hub they would have different port numbers which would differentiate them from one another.

However my question is how do I write a program which would identify which aurdino or which com port to use? Basically how do I automate it?

Delta_G

Probably the first question is why do you need multiple card readers?  You haven't answered that and it's confusing to me.  How should it choose which card reader to check?  Is it based on which website or what? 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

david_2018

#8
Sep 11, 2019, 12:21 am Last Edit: Sep 11, 2019, 12:23 am by david_2018
However my question is how do I write a program which would identify which aurdino or which com port to use? Basically how do I automate it?
That is a question on how to program the computer, not how to write code for an arduino.  You could have the arduino send an identifying code to let the computer know which port it was on, but you would also need to be able to tell the card readers apart and associate each of those with the appropriate arduino.
[edit]If you are going to use a separate card reader for each card, then I don't really see why you even need the arduino, the computer itself should be able to send the correct PIN code once it sees which card reader is being used.

Quote
Probably the first question is why do you need multiple card readers? 
If the arduino can intercept the data from the card reader, then it should be able to look up the PIN code for the card that was swiped, unless there is some encryption being used that removes any identifying characteristics from the data stream.

taterking

if you are writing a program for windows then C# already has a .net library for serial communication. it's actually rather simple. with basic commands just like arduino's library.  by default a windows machine is going to assign a string name to each arduino. should be "COM1","COM2","COM3".. and so on. C# should easily be able to  page through each string name and see if there is a connection that exists for that name.

To distiguish the difference between the arduinos. you would need to have the arduino tell the pc which one it is through the serial connection after it is established.
Building robots to take over the world.

prash_21

if you are writing a program for windows then C# already has a .net library for serial communication. it's actually rather simple. with basic commands just like arduino's library.  by default a windows machine is going to assign a string name to each arduino. should be "COM1","COM2","COM3".. and so on. C# should easily be able to  page through each string name and see if there is a connection that exists for that name.

To distiguish the difference between the arduinos. you would need to have the arduino tell the pc which one it is through the serial connection after it is established.

Let me try this one. Thanks

GoForSmoke

How many card readers can one Arduino board support? Do you ~need~ a usb hub?

You could code it so that whatever reader has a card reads the card and signals having data ready to the rest of the sketch by setting a flag variable. Some code sees the flag and sends the PIN#. If more than one card is swiped, call it an error.

1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Robin2

So whenever our test website needs authentication, the arduino intercepts the request and inputs the pin or password (usually a 6 digit number) of the card to authenticate.
How can we be sure this is not a project that is trying to do something illegal?

And multiple Arduinos are being considered to speed up the trials of different combinations in order to find the one that gives access to someone's bank account?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

DrDiettrich

The Arduinos do not know about the PIN. They sent to the PC what has been entered, the check occurs on the PC.

prash_21

How can we be sure this is not a project that is trying to do something illegal?

And multiple Arduinos are being considered to speed up the trials of different combinations in order to find the one that gives access to someone's bank account?

...R
hi Robin,

This is not any credit card or debit card reader that we are talking about. Apologies for not making it clear earlier. The cards install a certificate on our machine which is then used to authenticate a user to log in on the website. And requirement is that we sometimes need two levels of authorization which means two separate users need to login and authorize and as we currently have only one arduino setup for a single card we are unable to automate those scenarios.

So the objective is to connect two arduinos to two ports on a USB Hub and depending on which user logs in the respective card reader is triggered and the arduino inputs the default pin to simulate two users login.

Go Up