When using one reader I can get the result i would expect however when i try to use two I often don't get any result or maybe get one reading out of a 2 min testing period.
I am using the SoftwareSerial library which I am aware will close the connection to one as it opens the other.
It often gives data that is a symbol such as %%% or other unexpected characters. Is this because its reading from one serial port and then it is closed before it has collected all of the data?
Is there anyway for me to interface with all 16 readers at one time, or would i receive a better result using a multiplexer, or is it as simple as trying to streamline my code and utilise delays in a smart way?
Any help or suggestions for this would be much appreciated.
What if you had a bank of UARTs so that any reader could output at any time independent of an other?
Data rata looks pretty slow. How many characters are transmitted at one time?
Another option might be a bank of promini's with a reader attached to each, all feeding back to a master.
Can have quite large tags, and master can collect the data at high speed from each, using I2C or SPI, or wireless even with a little more hardware.
Or hardware serial to master, with RS485 for distance, and software serial to the reader.
Depending on the tag being read it but typically it has two read 12-16 characters.
I think maybe the bank of pro mini's might be the best solution as they will then be able to store the ids found and transmit back when available kind of acting like a buffer.
Perhaps the master can loop through all of the children boards and send a serial command, if the child has found a tag it can respond and send it back other wise return false and the master can carry on through the loop.
Is this something similar to what you have in mind? Could i connect all of the prominis to a digital pin on a mega board, or does it need to be a rx pin?
"Perhaps the master can loop through all of the children boards and send a serial command, if the child has found a tag it can respond and send it back other wise return false and the master can carry on through the loop."
Exactly, and described very nicely!
If you use RS485, then you can connect them all to the Rx/Tx pins, the RS485 provides the electrical separation between all the devices serial ports.
See Figure 5 in this Maxim application note. http://www.maximintegrated.com/app-notes/index.mvp/id/723
This might be a stupid question however in other examples of doing similar things like this one Tinkering with Electronics...: Arduino and RS485 (ENGLISH VERSION) each of the arduino boards has been connected via usb. So does each board require being connected to a computer in some form or what I assume to be the case that I can connect a power supply to the prominis and only have the master connected to a computer?
"connect a power supply to the prominis and only have the master connected to a computer"
That would certainly work fine. No PC/USB is needed for the slaves.
I think by the time i buy all of the boards to mount them on it wont be far away from buying them pre-made.
Im sure it is hard for you to say without actually just going a head and building it but what would you guess the time it would take to check all of the children and receive the results?
Are we talking milliseconds or seconds?
Also is there a way to wire it up so all could transmit at once?
16? Maybe tens of milliseconds. Really depends on the data rate you use.
Can be very fast.
"Also is there a way to wire it up so all could transmit at once?"
Sure. Would the result be intelligible to the receiver? No.
Half-duplex. Only 1 transmitter on the wire at a time.
Full-duplex - master and slave can both transmit.