Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

RFID data rate

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Mon May 24, 2021 12:28 pm    Post subject: RFID data rate Reply with quote

Hi

I am planning a RFid distance sensor .

The idea is to mount a lot of rfid fobs at about 200 mm intervals and then by reading the id's get a location value ( linear track of about 45 m )
based on values in a lookup table .

I have tested the concept with a module that use a Holtec HT48F06E chip . The coil is about 38 x 26 mm . The reading distance / response is acceptable but the serial data rate is fixed at 9600 .

The serial data rate is a problem since I need to get the current location of a moving trolley as fast as possible .


The other is the lookup or match of rfid to distance - any smart ideas for a fast lookup table for about 200 rfid's to get the matching stored distance value ?

The trolley location , distance , will be the last detected rfid fob .


Regards
Nico



(BASCOM-AVR version : 2.0.8.3 )
Back to top
View user's profile
SZTRAD

Bascom Member



Joined: 30 Dec 2019
Posts: 165

blank.gif
PostPosted: Mon May 24, 2021 1:14 pm    Post subject: Reply with quote

Hi
how fast will the cart move?
If it is not ensured that the trolley is in the reading position for at least 1s I would think about another solution.
If there is a given time then you have plenty of time to evaluate.

RS
Back to top
View user's profile
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Mon May 24, 2021 1:43 pm    Post subject: Reply with quote

I can't help with the RFID part, but perhaps you could mount 6 HC-SR04 ultrasound modules along the track?
These cost < $2 USD each.
Add an Tiny or Xtiny to drive each one, and send the data back to the Main Processor over a bus, (RS-232 / RS-485 / WiFi / BT, etc).

Each one is aimed down the track, to measure the distance to the trolley as it approaches the sensor.

Whether this would work or not depends upon the size of the trolley, other objects in the area, etc.

JC
Back to top
View user's profile Visit poster's website
SZTRAD

Bascom Member



Joined: 30 Dec 2019
Posts: 165

blank.gif
PostPosted: Tue May 25, 2021 6:34 am    Post subject: Reply with quote

Hi
I would use something like the JRT M88 for about $50.
But we have little information about the environment where it will be measured and the accuracy. There is also the question of whether the route is straight etc.
RS
Back to top
View user's profile
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Tue May 25, 2021 8:28 am    Post subject: Reply with quote

Hi
Thanks for the replies .

The rfid read speed is actually very fast - if I mount a few about 250 mm spacing and slide the fobs close to the read coil I get the id's over the serial .

Other types of rfid might be a lot faster ( higher frequency ) but I test and use what I have at the moment.

The location data is a bit delayed from the actual position but that is fine - it is used to control a heavy trolley in a dust and high humidity area .
The distance info is used to move the trolley either left or right and to control slowdown speed etc - the final EXACT stop is sensed with other sensors.



At the moment we use a Sick DT50-2 Pro laser distance sensing ( io-link) but the humidity and condensation causes laser reading problems at times.


Ultrasonic might not work in this , we need it to be enclosed and robust .

We also tried the POZYX system and it works over this distance but the reading is not very stable ( about 200-300 mm drift ) that is fed to the plc via ethercat.

Laser is the best and easy since it provide the absolute position at any time - (after a few minutes warm up ) .

we have also used an encoder on the drive shaft of the wheel ( smooth metal to train track ) so there can be slip .


The main task now is to get the position info to the plc as fast as possible from the moment its detected by the rfid.
so what is the fastest method to do a 4 byte address to get a 16 bit data value ?

To compare al 4 bytes in a search loop would waste a fixed amount of time for each lookup.
It might be better to first compare the first byte and then if a match compare 2nd etc ...
Sorting of the ids & distance info might also help to some extend .

If the rfid fob's are spaced at fixed known interval I can reduce the data to one byte ( 0.25 m x 255 = +- 63 m ) but that will not reduce the search speed itself .


One problem with the rfid system is still the dead spots between rfid fobs . If the trolley and reader unit is not close to a rfid fob at power on - the position is unknown and a seek to the nearest rfid fob is required.


I notice the Wiegand data output is only 24 data bits - so the data itself is only 3 bytes - even over serial - The fobs I have id's is in the 24 bit range so that will save time . The Wiegand data rate is 2ms per bit - so one id require 26 x 2ms = 0.052 sec .
The serial data stream at 9600 bps , sending 14 chars takes ( ( 0.000104166 x 10 ) x 14 ) = 0.01458 sec - so even at 9600 bps it is still about 3.5 times faster . So even though the amount of bits sent by serial is about 5 times more , the time required is still about 3.5 times less .

So for now the data transfer time is fixed - I only have control over lookup speed

One fast "lookup "method will be to use a 32Mb flash and save the distance as 2 x 8 bytes , ( only 16 Mb needed but will read data over 2 address spaces.

This method will always perform at the same speed for any id - the search through a block of data will vary depending on id - but need data to be saved in external memory , i2c or spi that require a bus access .

Any other methods that I am not aware of ?
Regards
Nico
Back to top
View user's profile
SZTRAD

Bascom Member



Joined: 30 Dec 2019
Posts: 165

blank.gif
PostPosted: Tue May 25, 2021 8:44 am    Post subject: Reply with quote

Ok explained essential
I personally would take a hall sensor, permanent magnet and some small attiny in this environment. Something from the new range seems optimal in terms of speed.
Each would have specific addresses and when the sensor is triggered it would send a message that the cart has passed by. This actually reverses the logic of the function.
Of course, the sensing can be your proposed RFID as well, you just don't have to deal with that logic in the higher-level system. You'll reduce the search to a 1-byte comparison, which I think will be easier.
Or instead of an address you send directly the distance of the sensor and do not decode anything.

RS
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 902
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Tue May 25, 2021 10:08 am    Post subject: Reply with quote

Nico,

the simplest solution would be a line in a loop that the trolley is pulling along.
Loop it at the close end over a transmission connected to a 20-rotation potentiometer and read it with a high performance ADC.
So that you get 0.44 part rotation per meter. Does not require a lookup table, just a little math and you always know where the trolley is.
The potentiometer could also be on the trolley with a battery operated transmitter, which would also monitor the battery voltage.
I know.... simple and not much cost.

Regards

Hubert
Back to top
View user's profile
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Tue May 25, 2021 1:39 pm    Post subject: Reply with quote

Hi
Thanks again for the replies.

It is possible to place sensors at the track and sens the trolley itself , multiple hall type sensors will work . Mechanical mounting and wiring need to change quite a bit then so prefer to limit wiring changes if possible .
The sensing and motor control itself is mounted on the trolley and linked to plc with ethercat and power cables .

We have looked the drawstring sensors - but the dust and condensation on the wire over time might also cause problems later. The loop idea is a good plan and can be fabricated quite robust .



That is why the non contact , wear free , laser and rfid ( hall ) is the preferred technology .

As if one axis is not enough - there is a second cart that travel in the y axis , the cart travel on the trolley in the x axis , and move into 18 m long storage chambers . At present the y axis travel is also sensed by laser but it is also prone to condensation during winter and high humidity , steam is also used overnight .

One solution might be to limit laser lens condensation by heating the laser sensor but that might also cause problems .



Regards
Nico
Back to top
View user's profile
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Tue May 25, 2021 5:41 pm    Post subject: Reply with quote

Quote:
The serial data stream at 9600 bps


I suspect that that is the rate limiting step within your system!

With a micro running at 20 MHz, (or an XMega at 32 MHz), even if you shave a little time off of the lookup and data processing time, you are only saving microseconds.

Perhaps, if you really need the overall speed increase, using a high quality, shielded cable, and a faster baud rate would be possible?

JC
Back to top
View user's profile Visit poster's website
SZTRAD

Bascom Member



Joined: 30 Dec 2019
Posts: 165

blank.gif
PostPosted: Tue May 25, 2021 8:45 pm    Post subject: Reply with quote

Ok
the electronics are in the trolley, if I understand correctly.
From this perspective, the sensors must be passive without power.
What about trying to use programmable RFID? Wouldn't that be a solution?
But I still don't understand where the problem is.
You have a reader that gets the data from the RFID, you process it with an AVR and send it to the PLC how?
Personally, I don't think RFID is suitable for this application.
RS
Back to top
View user's profile
jenalcom

Bascom Member



Joined: 10 Apr 2004
Posts: 365
Location: Perth, Western Australia

australia.gif
PostPosted: Wed May 26, 2021 7:49 am    Post subject: Reply with quote

I don't understand why you need a lookup table.

Surely if you can programme the RFID fobs in such a way that the lowest byte counts from 1 to 255 then you can put fob 1 at 0.25m from the end and space all the other fobs in number sequence at 0.25m intervals.

Than all you need do is read this one byte (1 to 255) and multiply by 0.25 (or even shift right two places) to get your distance.

Absolute minimum processing.
Back to top
View user's profile
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Wed May 26, 2021 9:03 am    Post subject: Reply with quote

Hi
Thanks for the feedback .

At the moment the rfid reader chip serial speed is fixed at 9600 - can change later with other hardware . 9600 is slow in todays fast world but looks as if it will not be the bottleneck.

RFid might not be the best way to solve this problem - but one of the best proven non contact options that I know about . One installed and tested it is almost fail safe .

My interest in rfid based location data stem from the use at The Port Of Rotterdam ( https://www.youtube.com/watch?v=NULoelb7PzA )
Although at a fraction of the complexity and budget .



I m using low cost non programmable fobs at the moment - if I had control over the id's it would make life a lot easier.

It might then even be possible to program the absolute distance , with extra data as the id - absolute minimum processing time .


If I get a working unit with current technology ( 125kHz at 9600 bps ) I can always improve.

Thanks again for the ideas and feedback .

Regards
Nico
Back to top
View user's profile
SZTRAD

Bascom Member



Joined: 30 Dec 2019
Posts: 165

blank.gif
PostPosted: Fri May 28, 2021 7:25 am    Post subject: Reply with quote

Hi
Check out the EM 4305 circuit, it's cheap and programmable. It works at your desired 125kHz. It is also sold as a sticker or card. The reading distance is 6cm,but with a good reader you can go further.
If you want some other solution send a drawing of the situation,maybe someone will think of another unexpected solution.
RS
Back to top
View user's profile
nicofer

Bascom Member



Joined: 01 May 2013
Posts: 90
Location: GRJ

southafrica.gif
PostPosted: Fri May 28, 2021 1:47 pm    Post subject: Reply with quote

Hi
I now have a working unit - it can read and search 240 rfid fobs and reply with the set distance , that take about 200us , with avr at 16MHz.
So that is a lot faster than the rfid reader refresh rate .

The rf reader chip will refresh with same id if not moved after about 390 ms .

Now I need to check the max speed the trolley can pass for fob to be detected and read . That will depend on antenna shape , distance etc .

A long narrow coil should work better since it would be in "range " for a longer time at high speed.

One byte id check will be faster than the current 3 byte check - but looks like the search itself is fast enough at the moment.

Regards
Nico
Back to top
View user's profile
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Fri May 28, 2021 3:42 pm    Post subject: Reply with quote

Quote:
with avr at 16MHz.


Glad to hear you have it working.

Remember that Bascom also supports the Xmega AVRs.
These run at 32 MHz!
The Xmega32E5 is the small one of the lineup.

That DOUBLES your processing power, if case you need the extra!

JC
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum