using the brain inside a HM-11 (or simillar bluetooth module)? - Page 1
Forum section: electronics / general

author: JPortici
author_rank: Super Contributor
timestamp: December 28, 2016, 03:06:07 pm
content: Hi! So, we have a wired remote for a product. We are considering upgrading the remote to a new model that also supports bluetooth. That would enable us to- Use a mobile app/computer software to control the product (mostly gimmick but hey!)- Use a mobile app/computer software to adjust the parameters/monitoring/diagnostics without having to open it up and connect the programming cable.There is a catch: For the product + remote combination to work the pair has to be connected at startup, because the remote has to exchange settings with the device. Could get around it but let's say i won't because of legacy support.One first, quick, design idea is to just solder on one of those cheap and ready made bluetooth modules (other guy is testing with HM-11 module) and get over it. but beside probably not having enough room it seems like a total waste of resources, as the remote itself is VERY simple. a tiny bit of logic and a timer for the state machine. Also, there are enough GPIOs on the bluetooth modulewhat if i only used the bluetooth module, re-programming the MCU inside it? Is this me wanting to complicate things too much? After all, the module should already be certified and i'd still be using the certified bluetooth stackotherwise, the bluetooth module + a tiny pic16f18323 that forwards and merge the data from/to bluetooth and product or something...

author: krho
author_rank: Regular Contributor
timestamp: December 28, 2016, 04:38:45 pm
content: If you are looking at the additional MCU, then I'd recommend to use an ESP32.It's currently a little hard to get them, but seeing that you are from EU olimex does seem to have astock.

author: JPortici
author_rank: Super Contributor
timestamp: December 28, 2016, 05:43:45 pm
content: hm. i have to check the current solution power consumption to see if we're in the same ballparkdon't care about the wifi so that would be completely turned off

author: jnz
author_rank: Frequent Contributor
timestamp: December 28, 2016, 06:36:17 pm
content: First off, drop all plans if a design goal is "gimmick", you'll thank me later. Second... You don't seem to be sure about what you want.If you are just configuring settings... You want Bluetooth Low Energy and not Bluetooth Classic (SPP). If you want to support Apple devices, you need an MFI license to use BT in serial mode but not for BLE. So if the goal is to support IOS, don't plan for BT Classic. There are BLE modules like Silicon Labs' modules that support running code on them using their BASIC-like interface. Since you need to support a legacy product, what I would do is...Get a module that support some scripting or BASIC like language, set up the GATT profiles for the data you need to store, take connections whenever and store the data, on boot your script would UART/SPI/USB the data to the existing PIC. The PIC would have no idea anything is different, the BLE module can accept connections whenever and store the data for the next reboot or trigger the PIC in some way, and you have very little fuss on your end, the BLE stuff would be pretty much done right from the start.Lots of companies support BLE modules with a BASIC or scripting interface, LAIRD is one off hand, the SiLabs modules support BGScript, and there are more. I think Microchip even has one that out of the box fakes UART.If I needed to support JUST a simple connection interface over BLE, I'd use one of those existing chips and the scripting. You won't get ANY serious performance from these scripting interfaces, but so what!? All you need is to transfer some data to another module.

author: JPortici
author_rank: Super Contributor
timestamp: December 29, 2016, 06:49:12 am
content: quite possibly the answer i was looking for!This is mostly for a gimmick and i agree it's pretty much useless, which is why i specified it, but i can foresee some cases where sending logs wirelessly could come in handy. worst case we'll have a couple of prototypes we will use internallyperformance needed is nil. two bits of logic for handling LEDs and buttons on the remote. And the communication is a simple 19.2kbps UARTa bluetooth module with a scripting tool is probably the simplest and best choice, though i checked for example the prices of the BT900 and that's nearly as much as we sell the (wired) remote for, that will have to be taken in account too.Anyway now i have more keywords to search with. thank!

author: jnz
author_rank: Frequent Contributor
timestamp: December 29, 2016, 07:27:38 am
content: Quote from: JPortici on December 29, 2016, 06:49:12 amI don't know your budgeting but the SiLabs or Microchip can both get pretty cost effective. You do need a whole module to avoid the costs of certs, but iirc I saw whole modules around $6 USD ready to role at 1 off volume.No problem, good luck with it.

author: JPortici
author_rank: Super Contributor
timestamp: December 29, 2016, 02:53:00 pm
content: thanks again, i'm about to order a RN4871 from microchip, seems to be the cake!