ESP32 Module Project
Goal: To write custom code for an ESP32 module that allow it to be used as a slave device to both deliver JSON packets AND allow pass-through Bluetooth Serial communications.
Hardware:
We have a custom PCB which incorporates the ATmega2560 and all support hardware. We have a header with RX/TX/SPI and I2C, +5, +3.3 and GND that a CUSTOM designed PCB will interface an ESP32 module like the ESP32-WROVER. The RX/TX we are using are Hardware Serial3 from Arduino code point of view. We need the ATmega2560 to be the master: we would like to offload all the WiFi work to the ESP and just have calls to setup and control Bluetooth and WiFi. We intend to use the I2C or SPI bus for WiFi control, packets and Bluetooth Control and the UART will be used for 2-way pass-through Bluetooth comms (as Serial Port Profile device).
For Development, an Arduino MEGA hooked up to ESP-32 via RX3/TX3 at 19200 Baud and the SPI bus will work fine.
Baud rate for Serial Passthrough is MAX 19200 because the ATmega2560 is custom-clocked.
Considerations:
The end device is a hand-held battery powered system in an enclosed case. Power usage and heat are major concerns. We need recommendations on which ESP32 module to use: WROVER, WROOM, etc. And if it can/should be de-clocked to save power and cut down on heat.
Deliverables:
1) HEX and Source Code for ESP32– (preferred in Arduino environment.)
2) C++ class for facilitating communication between ATmega and ESP module.
3) Example MEGA code showing working transfer of data over Bluetooth Serial and HTTP Posts to URL.
4) Instructions on how to program the ESP32 custom firmware.
Requirements of C++ Class and ESP Firmware:
-Method to place the ESP into low-power mode or off.
-Methods to set Bluetooth Device Name, PIN
-Method to set Wi-Fi Station Name.
-Method to connect to an AP given SSID and Password– eventually we may also need WPA2-Enterprise but not for this phase.
-Method to set the URL for HTTP Posts.
-Method to define a packet of data that gets posted to URL. (2048 bytes)
-Method to check status of Wi-Fi connection (connected/Not Connected)
-Method to check last result of POST (200, 401, 404, etc. HTTP status codes or 0 for not posted) – Should reset status after call.
Data Flow and Operation for WiFi
SETUP: Pass SSID, Password, Port, URL to ESP
LOOP:
MEGA collects data from an array of sensors, data is packaged into JSON.
JSON is sent to ESP which posts to SERVER. This happens 1x per minute.
MEGA polls status of ESP which could include IDLE and PROCESSING
Repeat forever.
For Bluetooth, we need it to operate as a serial passthrough device like the HC-06 module. We just need to set the name of the device and PIN if possible. Baud rate will be 19200-N-8-1
Power Consumption
This is a battery powered device so we need to save power and heat. Data packets are sent 1x per minute so if its better battery-wise to make connection, send packet, drop connection every time we should do that.
Sample of a JSON data packet:
{ "version": 1.00,"generator": "DSII", "RAM": 1718, "serialNumber": "09-1021","stationID": "Probe in Hospital","token": "XXXXX","battery": "OK","status": "OK","timeStamp": "2019-01-22T15:53:44.000Z","data": [{ "code": 4,"unitCode": 4, "sensor": "CO2", "unit": "ppm","value": -1201.00, "id": 11188 },{ "code": 3,"unitCode": 4, "sensor": "CO", "unit": "ppm","value": 1.2, "id": 10201 },{ "code": 1,"unitCode": 3, "sensor": "RH", "unit": "RH","value": 35.2, "id": 11421 },{ "code": 0,"unitCode": 0, "sensor": "TEMP", "unit": "C","value": 19.1, "id": 11421 }] }
TEST SERVER:
[login to view URL]
if TOKEN property is set to my email address it will authorize and return 200 otherwise it will return 401.
FUTURE:
We may need WPA2-Enterprise at some point in the future.
I need an estimate for how long this project will take. I am also happy to pay a fixed price if we can reach an agreement.
Hello sir,
I have experience in designing electronics circuits and can make your project. i will make your project completely on my side and will deliver a working prototype. I can also develop hardware compatible android and windows based apps.
I can show you my previous experience on similar projects.
If you wish we can discuss in chat.
Thanks
Hi sir,
we are very best team who have done machine to machine and machine to server communications for many years.
we are able to configure these tiny esp32 modules , we are able to run both wifi and ble stack together on esp32.
lets talk to us on your project.
WE are very much looking forward to hear from you on this in coming days.
Regards,
Ahmed
Hello my name is Maria, I would like to work in this project, I’m an engineer with plenty of experience working with Arduino, Bluetooth Low Energy (BLE), Electronics, Microcontroller, PCB Layout , I have made many Arduino and PCB projects, so I am sure I can do a good work for you.
Good communication with my clients it is a top priority for me. If you have any doubt or want to see more of my work I’ll be here. Contact me for more info.
Hello,
Deep is here from India.
I can help you to develop firmware for ATmega, ESP32 using Arduino IDE. I have experience with both. Developed various firmware which also consist JSON data, HTTP posting, Bluetooth communication, Set custom SSID and Password.
I have read you requirements.
I'm agree to give you deliverables as cost and time listed in bid.
Thanks!
yes buddy,,its me imad, can do work in 50+ platforms myself,,,,,,u will get the best work accompanied with brotherhood,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Hello!
After reading your description, I interested to work with your project.
I have hardware for testing project.
And I have enough experience to make this project
Look forward to your answer.
Best regards.