Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Forums that are geared towards bluetooth chips and cell apps?

Status
Not open for further replies.

fastline

Member
I have several projects that need bluetooth connectivity and at least an android app for bilateral communication. I am in way over my head here and looking for some fast track education sources. I think probably the largest part is getting over this app writing hurdle.
 
You can use ESP32 microcontroller modules. There is plenty of example code and libraries in the Arduino universe for the, Also, there is a newer Arduino Nano-like board that has Bluetooth if you want an actual Arduino. Either can be master or slave in your project. No phone required. If you'd rather, you can use wifi with the ESP32. The ESp32 can be a client, server, access point or the router on a stand alone wifi network (not connected to the internet).
What, exactly are you trying to do and what are you trying to avoid (or not do).
 
I was not aware of the ESP32, interesting. I am trying to develop a device to read a few sensors. It is something I may wish to commercialize so working with an Arduino just is not practical or professional. Currently working with PIC but could consider going a different route but in any case, trying to work from a bare uC, not a project board, which complicates this.

I realize the learning curve will probably be stiffer but I would have to play with the Arduino, then do it all over again. Nearly everything I find online is Arduino....so much so that I am getting pukey just seeing that word over and over.

Basically I need the device to either read back the sensor data to a phone in real time, to put it into "log mode" in which I will program the uC to collect sensor readings at certain defined times and log that to an EEPROM or similar storage device. I just feel this is a good excuse to finally figure out how to go wireless!!! Yes, I am very interested in wifi as well. We have other projects where range will be a problem but at least for this one, short range should be just fine.

I want the programming to work to log until it maxes out the memory, then start dumping older data as it logs new, so it captures the most recent, say, 2mo worth of data, or as much as we can reasonably log. If we can get an entire year, super! I want to be able to visit the working device, connect with it via BT, and engage a download of all sensor data. Once I have that data, I need to figure out how to make some simple charting pages to graph the data so it is easier to look at.

I think one of the more daunting tasks is figuring out what app studio to consider, and will actually cover everything I need to do in a professional way! I see so many apps that don't work right, and seem to be made by a 3yo. My needs are pretty basic but I am hoping there will be some good graphing tools so I don't pull my hair out trying to get it done. For the "live sensor data" part, that would be very very simple.
 
Last edited:
Look into Google charts. A bit of php and you can pull your csv datatable right into an html page or php doc that has the Java script to display from the Google charts API. Sounds easy, right?

An ESP32 with a micro sd card reader on board is available as well. The ESP8266 and ESP32 boards are used in lots of commercial IoT devices. They can be programmed with the manufacturer's IDE or Arduino IDE.

Your application sounds pretty easy. I'd do an ESP32 and pull the SD card when you want to transfer the data if it is a one-off. Otherwise, the options are countless if you don't like that idea. I have ESP32s set up as mesh networks over a small campus so range isn't a problem. One is a sensor network that many people access and one is a stand-alone private net for control and monitoring HVAC. The sensor data also loaded to AWS in a standard format for viewing from anywhere.
 
I appreciate the reference in the ESP. After just a quick review, I might agree that seems like it would be hard to beat! I think before we had to write off the Arduino because it was not compact enough, not enough power, not cheap enough, etc. Just not a pro setup, but the ESP is really getting there! Are there any other products in this lane I need to know about?

It does appear we might need some type of daughter board on one though to further protect the I/Os for the uC? I guess I have not yet found a PCB layout and such to better understand them.

In regards to the application for a phone. I am getting heat from a friend helping on this that native applications are a real pain as you need to get them right for a huge list of OSs. Rather we had looked at a web based app, but these devices will be used outdoors, and in many cases won't have inet services.

Part of this "app" will be to change some parameters and make adjustments to the device in the field. Bilateral communication. I will need to, for example, hit a reset or calibrate button on the phone to zero a sensor at a value. I will also need to review the data live, real time.
 
I appreciate the reference in the ESP. After just a quick review, I might agree that seems like it would be hard to beat! I think before we had to write off the Arduino because it was not compact enough, not enough power, not cheap enough, etc. Just not a pro setup, but the ESP is really getting there! Are there any other products in this lane I need to know about?

It does appear we might need some type of daughter board on one though to further protect the I/Os for the uC? I guess I have not yet found a PCB layout and such to better understand them.

In regards to the application for a phone. I am getting heat from a friend helping on this that native applications are a real pain as you need to get them right for a huge list of OSs. Rather we had looked at a web based app, but these devices will be used outdoors, and in many cases won't have inet services.

Part of this "app" will be to change some parameters and make adjustments to the device in the field. Bilateral communication. I will need to, for example, hit a reset or calibrate button on the phone to zero a sensor at a value. I will also need to review the data live, real time.

The esp32 can act as an http server so you can write a short page with text boxes, serve that to Safari or Chrome on your phone. Update the values from your phone and press enter. The parameters are passed to the Esp32 and you can set them to variables and do what ever you want with them.
 
I will have to have a convo on that app issue. It appears the ESP does not have any EEPROM on board. I am not yet sure how much actual storage I might need just yet but would you have any thoughts on that? Because this is an outdoor device, I don't think any mem card slots would be appropriate. I think the idea is to make all comms wireless only. I know they make all sorts of pggybacks for the Arduino. Not sure if they are doing that for the ESP?
 
Use the castellated holes to mount it on a PCB, add some EEPROM chips (if you can find them).
 
I was not aware of the ESP32, interesting. I am trying to develop a device to read a few sensors. It is something I may wish to commercialize so working with an Arduino just is not practical or professional. Currently working with PIC but could consider going a different route but in any case, trying to work from a bare uC, not a project board, which complicates this.

I realize the learning curve will probably be stiffer but I would have to play with the Arduino, then do it all over again. Nearly everything I find online is Arduino....so much so that I am getting pukey just seeing that word over and over.

You're worrying totally pointlessly - there's nothing 'magic' about an Arduino - it's just a microcontroller on a development board. So you do your development on the Arduino development board, and then swap to a bare Atmel processor - EXACTLY as you would with a PIC or anything else. You can even buy Atmel processors with the boot loader already loaded, so a bare processor that can be used exactly as an Arduino.

It's just as practical and professional as any other processor.

However, if you want Bluetooth, then (as Gophert suggested) the ESP32 is a great choice - and is Arduino compatible as well :D
 
Nigel, part of it was trying to stick with a more "standard" programming language but I think the Arduino stuff stuck pretty good and probably not much use in fighting that. there was a higher cost for the Atmel chips but at our volumes, it likely would not matter. The main thing is I have to accelerate some of these projects. If we do this to old way, we have to work up every component, design the pcb, etc.

It appears we might be able to do a daughter board for the ESP to add some of our other stuff. We do have some 240VAC switching to do, and rather not have that in the same board anyway.
 
Nigel, part of it was trying to stick with a more "standard" programming language but I think the Arduino stuff stuck pretty good and probably not much use in fighting that. there was a higher cost for the Atmel chips but at our volumes, it likely would not matter. The main thing is I have to accelerate some of these projects. If we do this to old way, we have to work up every component, design the pcb, etc.

It appears we might be able to do a daughter board for the ESP to add some of our other stuff. We do have some 240VAC switching to do, and rather not have that in the same board anyway.

I usually just design my PCB to accept the plug in ESP32 modules - makes it nice and simple :D

Mains isn't an issue as long as you keep the spacing reasonable, and remove all unused copper round the mains area.
 
Update, I am still looking into the ESP32 systems but I realized that one of the downsides is no phone support like Microchip. I might then ask you guys with experience, the device I am developing will need to run on battery power with a projected battery life of 1yr. This has but emphasis on power requirements. The benchmark we are working with is about 3uA. I do understand the system would need more power with a wireless connection is being used but for the majority of the time, the system is only really required to datalog sensor data at determined intervals.

For instance, I will want the system in a deep sleep mode and mainly maintain a time clock and take one sensor reading once/week. However, once a trigger is tripped, that is when I would want more data points logged. Probably in the 1 per 30sec range. Once trigger is released, it would log for a bit after that, then go back to sleep.
During all of this logging, there would be no need for radios at all. I would only want to connect to the device every so often to gather the logged data.

The reason I mention is I am curious if you guys have investigated the actual power consumption in something like this?
 
Use a PIC in sleep, waking up every second using a 32KHz XTAL on TMR1 (I think it's TMR1? - it's in the datasheet), do the clock housekeeping, check if it's time for radio yet - if not, go back to sleep. If it's time for radio, then power the ESP32 up using an FET switch fed from a PIC pin, when done turn it off again.

You'll get lower consumption doing it that way, than using the ESP32 on it's own.
 
I really appreciate the feedback! To be honest, this is in a sort of in the think tank in the R&D phase right now. I see what you are saying about employing the PIC, but then we have two uCs to program, etc, etc. I am fighting like mad to keep the KISS concept as much as possible.

It was first intended to get this to survive 1yr on a 9V battery. However, I know not only will we be stretching it on battery like, it will also limit what we can do with the device! Having all that wifi a BT power..... I am sort of revising my previous thoughts of Li battery and a simple solar cell.

I think a single 18650 would provide ample battery reserve, but we had previously written off a boost reg because they eat power and we have 5V sensors. I need to do some thinking here. My apology if I am dancing around different strategies.
 
I really appreciate the feedback! To be honest, this is in a sort of in the think tank in the R&D phase right now. I see what you are saying about employing the PIC, but then we have two uCs to program, etc, etc. I am fighting like mad to keep the KISS concept as much as possible.

It was first intended to get this to survive 1yr on a 9V battery. However, I know not only will we be stretching it on battery like, it will also limit what we can do with the device! Having all that wifi a BT power..... I am sort of revising my previous thoughts of Li battery and a simple solar cell.

I think a single 18650 would provide ample battery reserve, but we had previously written off a boost reg because they eat power and we have 5V sensors. I need to do some thinking here. My apology if I am dancing around different strategies.

Assuming you mean a PP3 for 9V power, it's not a good choice - an 18650 and running at 3.3V saves using a boost reg.

You might like to look at:


My issue is with the ESP32 modules, as you have other current wasting items on them.
 
I have several projects that need bluetooth connectivity and at least an android app for bilateral communication.
You may find this article from the latest CCS PIC compiler newsletter interesting - "EZ App Lynx"


It's a free app for android or iphone plus a library for the PIC compiler that allows you to create a "universal" interface - the app screen layout is defined by the MCU it's connected to at the time, so you can create any display & control layout you like.

Hardware-wise, your device just appears to need a generic Bluetooth module with serial connection to work with it.

The CCS compilers are not exactly cheap, but the included functions and simplicity of use compared to the Microchip XC compilers are well worth the cost, in my opinion at least.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top