View previous topic :: View next topic |
Author |
Message |
RogerM
Joined: 07 Jun 2004 Posts: 10
|
RN4870 and RN4871 Microchip Bluetooth Low Energy Modules |
Posted: Wed Dec 25, 2019 7:49 pm |
|
|
Does anyone on this forum have experience with interfacing to either of these Microchip BLE products? I have a succeeded in talking to them using modified RN4020 code that is used in EZ App but get some unpredictable results - in looking at the Microchip forums it appears many people have a variety of reliability/consistency issues. Since I did this back April Microchip have made some firmware upgrades I have not tried these, last time it was a lot of frustrating work, never clear if it was my problem or the RN4871 - so before I go through that all again I'm curious to know if anyone else has made it work.
My application is a "serial cable replacement" to an Android App. I have made it work using a different BLE product (Silicon Labs BGX13P) but would prefer the RM4871 as it it quite a lot smaller which is important for my application.
Roger |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Thu Dec 26, 2019 4:15 am |
|
|
How are you generating the reset signal?.
These chips are very fussy about this signal. You need either to
use a hardware reset chip, or directly control the line from the
processor. Do not try to reset with a simple resistor/capacitor.
If you look at the data sheet, out of about five places where they
show reset circuits, four show an IC, and there is also a note
recommending this.
If the reset does not rise quickly, the internal configuration can become
corrupted, and the wake up can also be unreliable. I found that a reliable
reset signal 'reformed' the modules..... |
|
|
RogerM
Joined: 07 Jun 2004 Posts: 10
|
|
Posted: Thu Dec 26, 2019 3:56 pm |
|
|
That is very interesting and helpful. I used 2 different setups.
On one I connected the Reset directly a pin on the PIC. I did not use a reset I/C. The code in the PIC does a reset based on the CCS example. But this set up would not protect the rn4871 during the initial power up. It did not have the resistor/capacitor on the line.
On the other set up I was given and used a mikroe click board. this has the mcp112 reset chip. It uses 10K pull up resistor rather than the 4.7k on the RN4871 data sheet but I assume this would not be an issue ? The RST pin on the click board goes directly to the RST pin on the RN4871 not through the reset chip or resistor/capacitor . Again I don't think this would be a problem. From memory I did most of my testing with the other setup and a problem I had with this one was that it had the older version of the RN4871 firmware and I had some difficulty doing the firmware update. That issue is now cleared up.
One final piece of surprising information (to me anyway) was when doing the the test on the "other" BLE part I had some inconstant results and got an error code that suggested the power was not adequate. I was powering my proto board with a 300ma wall wart that I thought would be adequate give the low consumption of the BLE part and the PIC. I replaced this with a 1 amp wall wart and those problems went away. I'm not sure what power source I used when doing the initial RN4871 testing but it could have been this on and it could have contributed.
So after all that It sounds like you were able to use these parts successfully by following the rules better than I did ? Did you use the MCP112 or would you suggest something else? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19540
|
|
Posted: Thu Dec 26, 2019 11:49 pm |
|
|
Resetting with the PIC is OK. What you should do, is have a pull down
resistor on the pin so that it stays low untill the PIC operates it.
On power, the same thing applies as with most radio modules. You need
a significant 'reservoir' capacitor. Preferably with a low ESR, placed very
close to the module. The 'average' consumption is low, but
momentarily the drive gates can draw very significant current. This
momentary demand can result in the line dropping for a few nSec if
there isn't a good reservoir. This also requires reasonably thick traces
between the reservoir and the supply pins. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Fri Dec 27, 2019 6:24 am |
|
|
As you've found out the power supply is CRITICAL to reliable operation ! ANY peripheral that draws a momentary high current will cause 'odd' problems, usually randomly...hair pulling events, requiring 2-3 pots of coffee...
A BLE module is no different than a relay or LED,though we all know about relay inrush current and design accordingly , gee BLE means 'Low Energy' so our minds say 'that can't be the problem'...
My PSUs are generally X5 the maximum current needed, with lots of bypass and reservoir caps. Sure it's 'overkill' but reliable.
Jay |
|
|
|