Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Wish to configure PIC16F18856 with radio tag

Status
Not open for further replies.
T

treez

Guest
Newbie level 1
Hello,
We wish to configure our offline LED lamps at the end of the production stage. We therefore wish to put a M24LR64-R radio tag on the PCB, and connect it to our PIC16F18856 micro thats on the lamp PCB.
We can then transmit to this radio chip and “tell” the lamp what power its supposed to run at, etc etc....
The problem is the datasheet doesn’t give a recommended footprint for the PCB antenna that is needed. Do you know of one? Also, what do we use to actually transmit data to the antenna of the chip?
Presumably the M24LR64-R needs to have its clock and data lines connected to the TX/RX pins of the micro? Also, how does the micro know when we have loaded the M24LR64-R with the data?.....i mean, when we power up the lamp, and haven’t yet sent the configuration data to the M24LR64-R, then how does the micro know that it must wait for us to send the data?
What if we send the wrong data to the M24LR64, and then wish to re-send the data...how will the micro know that we want it to re-read the M24LR64? (and scrap the first lot of data)?



M24LR64-R datasheet
https://www.st.com/resource/en/datasheet/m24lr64-r.pdf
 

As for the "antenna" respectively coupler coil, you surely want to review the ST application notes associated with the device, e.g. AN2972.

Possible interaction with µC is obvious when reading the datasheet, I think. It's essentially a dual ported memory, all information has to be deposited and retrieved there.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Or 11 and 12 if you use the first I2C interface. If those aren't available, you can bit-bang I2C very easily on any port pin.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks,
The M24L64R part seems to have gone obsolete now, so we are going to use the M24LR64E-R instead….

Do you believe it is possible for this RF chip to get data put into its memory even when there is no Vcc supply for it? (ie it uses the power from the RF transmission that impinges on it) –The datasheet doesn’t appear to make this clear, but I think AN2972 says it can do this?

Page 13 of AN2972 provides an equation whereby the inductance of a “square spiral” antenna can be calculated…however, the equation on pg 13 doesn’t include many of the necessary parameters, eg, the coil trace thickness, the spacing between traces, the permeability of FR4, etc etc. Therefore, the “eDesignSuite antenna design tool” from st.com has to be used….

..However, when I use this tool, I put in 10 turns, and it draws only 5 turns. Why is this?
(ok, i just tried it again, and now its doing it correctly)
In fact, when I put in 10 turns without having filled in any other parameters, it does then actually draw 10 turns, but its when i add the length and width parameters etc that it then halves the number of turns that I put in.....
ok, ive tried it again, and its ok now

..So my question is, ..is this tool reliable?…and how can I calculate the antenna inductance if this tool is not reliable?

M24LR64E-R datasheet:
https://www.st.com/resource/en/datasheet/m24lr64e-r.pdf

AN2972: App Note on making antenna for RF chips like M24LR64E-R
https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.CD00232630.pdf

eDesignSuite antenna design tool:
https://my.st.com/analogsimulator/html/#/home
 
Last edited by a moderator:

I would say this is a "try it and see" scenario. You need to experiment to be confident it would be reliable, especially if using RF excitation. You might be able to store data in the memory using the RFID EM field but you would have to be careful with the I2C interface which obviously needs a powered SCK source.

I use RFID extensively here but for security access, not as a memory for another device. I'm not sure of pricing but have you considered Expressif devices? I've recently started using very cheap ESP8266 devices for remote controlling via ethernet and they have built-in antennas. It isn't RFID but I can telnet into systems remotely using wifi and read status or write operating parameters of PIC based controllers. They have simple UART serial interfaces. In fact I'll be configuring and monitoring systems from off-shore next week using nothing more than an Android phone!

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks, we’ll look into those.

A the moment we wish to look into the the M24LR64, M24SR64 or ST25DV-I2C or ST25DV-PWM.
We are trying to assess what is the difference between these chips. All we want to do is throw data in with RF, also preferably have the option of doing this with the chip not actually powered. And obviously to read the data with the micro.

The M24LR64 is a “long range” chip, and the M24SR64 is a “ short range” chip, but the datasheets don’t say what this actual range is in metric units.
I wondered if anyone knows?

M24SR64 datasheet:
https://www.st.com/resource/en/datasheet/m24sr04-y.pdf

M24LR64E datasheet
https://www.st.com/resource/en/datasheet/m24lr64e-r.pdf
 

SR seems to be for NFC mode and LR for conventional RFID mode.

It depends on the antenna and environment but I would guess NFC (as in contactless payment cards) would have an expected range of only a few cm, perhaps 5 or 6 at most. RFID (product tracking and security) usually has a longer range of maybe 50cm.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks, Page 15 of AN2972 says that the antenna of the NFC chip should not overly a ground plane. We are wondering if this applies to a PCB which sits on top of a thermal rubbery pad, which sits on top of a large aluminium heatsink…presumably the antenna on this PCB cannot be used over such an aluminium heatsink, as it would be too close to it? (the thermal pad is only about 0.3mm thick)

AN2872
https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.CD00232630.pdf
 

Section 3.5.3 explains. For data transmission it will not be optimal if there is a ground plane or perimeter conductive path, both will reduce the range and de-tune the antenna. If you want to power the device via RF the problem becomes worse because you need every microwatt you can muster to power the IC as well. You can compensate for de-tuning by adjusting the LC parameters of the antenna but you can't do anything about losses to surrounding metalwork.

What exactly are you trying to do? If all you need is to program the PIC memory without physical connection, there are probably easier ways to do it and store the values in the PICs own EEPROM. It saves you the bother of using the I2C interface too. A one-way serial link is very easy to produce as long as the data speed is fairly low and as I imagine you only want to transfer a few bytes it seems overkill to employ a second memory and associated circuits for such a trivial task.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
The M24LR64 is a “long range” chip, and the M24SR64 is a “ short range” chip, but the datasheets don’t say what this actual range is in metric units.
I wondered if anyone knows?
The datasheets are referring to well defined RFID standards, "proximity" (SR) ISO 14443 and "vicinity" (LR) ISO 15693. The actual range is defined by a minimal magnetic field strength, and depends in so far mainly on the reader power and coupler size. The specs are however presuming standard tag coils. Magnetic shorts like ground planes or metallic chassis can considerably reduce their efficiency.

It's of course possible to estimate the coupler performance in an AC magnetic simulation. From your description of the geometry, I would guess that standard systems don't work in this situation and you need a special designed reader. I wonder if the effort pays.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks, i looked at the ESP8266 but the board is too big for us. We like the NFC's because they lay out so small.
All we need to do is put 30 or so bytes into the memory so that the microcontroller can read it and configure itself for whatever behaviour is wanted....eg Max power, Dimming profile, minimum light level, etc etc.
 

To me, it seems like a lot of effort to store 30 bytes. I assume as NFC/RFID is considered that you are thinking of factory configuration rather than after installation so why not use a simple OOK style data transfer using an LC circuit and detector. My idea is simply to pulse RF on and off at a frequency of your choosing and use the recovered voltage from a 'crystal set' receiver to drive the UART input. The PIC can do the rest easily and maybe flash the light as conformation that everything (including preamble and CRC) was received and stored successfully. It is a very simple low cost and reliable solution.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks you’re right we do want to configure in the factory. To be honest we just need something on the PCB , that the production staff just hold the RF_transmitter against, …and voila, that’s the data sent. The NFC chips are the only reasonably cheap thing that can receive RF that fits on our PCB.

We would rather have something that can receive the RF data when not powered…some of the NFC chips can do this…but if their Vcc pin is connected to a rail with say 20mA of load on it (various opamps resistors etc etc ), then I don’t see how the NFC chip is going to get powered by the incoming RF wave, as surely the energy would dissipate off on the Vcc rail?

...I suspect what we need is a fet switch which keeps the NFC chip disconnected from the rail till the product is powered up?..(then the micro can turn on the fet switch so that the nfc chip gets powered from the rail)
 

You are correct that other circuits will drain the already weak VCC away but a diode in series with the receiver supply should be sufficient to block the flow. I'm not ruling out NFC as a solution but I still feel you are over-complicating things. Even a tiny PIC with some EE memory on board could easily do the same job and be RF powered. Bear in mind that your main MCU only has to read the parameters in once at power up so you probably don't want to spend too much on circuits that spend 99.99999% of their time redundant.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Many years ago while a student working at a holiday job for an electronic manufacturer, we use to test car radio PCBs by holding the PCB onto a 'needle board' which made contact with key parts of the circuit, powered it, made some measurements and generally tested that the board was working correctly before it was mounted into the chassis.
You could use the same principle to hold the PCB against some strategically placed contacts to power the board and pass in the data you want stored.
If you have to hold the PCB to something for the NFC to work, then using a test/programming jig is probably simpler and more reliable. It also means you don't need to add much (if anything) to the board itself for a 1-time program.
Susan
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks but the NFC offers easiest solution. The micro powered by RF sounds good, but i must confess we are not aware of micro’s which can be RF powered etc.
The NFC chip can have data loaded into it even when it has no Vcc supply, but as you kindly suggest, it needs a diode into its Vcc pin so that the voltage generated to its Vcc pin doesn’t drop away due to the other stuff on the Vcc rail “drinking” from it.
The M24SR64 datasheet says it needs a 10nF capacitor on its VCC pin, so i presume this has to go on the anode side of the diode, as the RF wave will surely not be strong enough to charge up a 10nF capacitor to any significant voltage?

- - - Updated - - -

Th NFC chip is so simple, and even when the product is in its enclosure, the data can be re-sent (ie the unit can be reconfigured)

The ST25DV04K-IER6S3 looks so much cheaper than the M24SR64 but its so difficult to see what the difference is between these kind of chips

- - - Updated - - -

ST25DV04K-IER6S3 datasheet:-
https://www.st.com/resource/en/datasheet/st25dv04k.pdf
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top