I am working on a datalogger for suzuki/kawasaki motorbikes. I have it already working on a bluepill, it uses 2x SPI (SD and MPU9250) and 2x UART (GPS and a L9637 [it is an ic used to talk with the ECU]). But yesterday i had the very very bad idea that i would like to have camera control (like gopro or other camera with wifi) so here i am to ask for advice ![]()
which of them do you think is better:
1) change the bluepill with a esp32
2) add to the existing project a esp01 (esp8266)
i guess is difficult to give a suggestion without seeing the code so if needed i could post it. I think that the main problem with the esp32 will be the maths with floating number and i have a few of them
both have pro and con, i would prefer the solution number 2 but here people are more expert than me so any suggestion is welcomed
[aster – Mon Jan 15, 2018 12:15 pm] –
i would like to have camera control (like gopro or other camera with wifi)
What kind of control do you mean? Pan-tilt-zoom? Or other? Which?
in the case of the esp01 i will do it with AT commands.
this spanish boy hacked all gopro commands, if you have one you may be interested: https://github.com/KonradIT/goprowifihack
1) keep what you have STM32 and add WiFi with ESP32/ESP8266
2) integrate all functionality into one uC, say the ESP32
Personally, I have an on-again, off-again relationship with the ESP32. I have more experience with the ESP8266 but the single core and the task switching between the Arduino-side and the RF-side is troublesome. Were I doing this, I would incorporate the WiFi with the ESP32 and get some serious experience with the chip. Then, when the camera stuff is all working on the ESP32, take a look at the load on the ESP32 to determine if you have ample resources to move the logging code.
yep the two schools of thought represent perfectly my problem. usually, in my experience, when there are different schools of thought none is the only correct but all have part of reason
also the price is something to keep controlled, esp32 is 7€ while bluepill+esp01 is 3€
to be honest i think i will stay on the stm32, i like the mcu, i like the repo, i like the forum <3
and considering that i will do this project for people who probaply doesn’t have any idea of what microcontrollers are (motorcyclist) i think that using the stm32 is more (
) simple than the esp32
[aster – Mon Jan 15, 2018 3:54 pm] –
<…>
also the price is something to keep controlled, esp32 is 7€ while bluepill+esp01 is 3€
to be honest i think i will stay on the stm32, i like the mcu, i like the repo, i like the forum <3![]()
<…>
Recent reduction in ESP32 prices for Rev 1 silicon:
https://www.aliexpress.com/item/LOLIN32 … 43452.html
but still more than the blue board
https://www.aliexpress.com/item/STM32F1 … 40083.html
Still, from my limited testing, ESP8266 Arduino code ports very well to the ESP32 dual-core uC. So the idea of using the ESP8266 is a good way to go … just remember, you must release the Arduino code every 50mS or shorter in order to keep the RF side of the ESP8266 healthy!
Ray
[mrburnette – Mon Jan 15, 2018 7:51 pm] –
… remember, you must release the Arduino code every 50mS or shorter in order to keep the RF side of the ESP8266 healthy!
Sorry for sidetracking the thread, but what did you mean with that, how to you release the code? with a delay() perhaps?
I don’t have experience with the ESP yet, but was thinking on using one for a humidity logger. My code should take less than 50ms to read and go back to sleep, but I’m curious about that need to release and how to do it.
Ray i just discovered about the revision in esp32 but for now i think that the 3 euros less is not enough good: https://cdn.instructables.com/ORIG/FJP/ … WQBOV7.pdf or maybe yes ![]()
By the way i meant that i will use both the bluepill and the esp01 which will be used with AT commands to do the turn on / shooting of the camera
[victor_pv – Tue Jan 16, 2018 3:32 am] –
<…>
Sorry for sidetracking the thread, but what did you mean with that, how to you release the code? with a delay() perhaps?
I don’t have experience with the ESP yet, but was thinking on using one for a humidity logger. My code should take less than 50ms to read and go back to sleep, but I’m curious about that need to release and how to do it.
Victor,
Sidetracks are learning experiences … IMO. The way the ESP8266 core is managed is that non-OS (a very elementary RTOS) is incorporated into the native code compiles and provides a pseudo-thread to the Arduino code. However, non-OS is a light-weight and does not fully manage Arduino … the default circumstance is to automatically pause Arduino at loop() and return to the Espressif thread to manage RF protocols and stacks and required housecleaning. When the core is finished with the RF side, the non-OS returns to the Arduino thread … which by default is at the top of loop(). Other ways to force a servicing of the RF side is: delay(n), delay(0), and yield().
There are various online articles about how tightly the loop() must execute, the figures range from 30mS to 50mS … failure to release the user’s code quick enough usually has very bad consequences
The above does not apply to ESP32 dual-core device… FreeRTOS is integrated into the compile automatically.
Ray
One of my ESP8266 Projects you may find interesting (RF disabled, just a fat SRAM Arduino)[w/assistance from martinayotte]::
https://www.hackster.io/rayburne/esp826 … ime-1df8ae
What do you do with all of that unused flash? (Build tables, of course!):
https://www.hackster.io/rayburne/oui-ou … 266-323ae4
Other Projects including many ESP8266 rehashes:
https://www.hackster.io/rayburne/projects
[aster – Tue Jan 16, 2018 8:50 am] –
a) You have to release the code, that means “do the internes stuff to keep the connection going” with yield() or delay(0) i have read that it is suggested every 200milliseconds to be very safe. Mandatory every 500b) Ray i just discovered about the revision in esp32 but for now i think that the 3 euros less is not enough good: https://cdn.instructables.com/ORIG/FJP/ … WQBOV7.pdf or maybe yes
c) By the way i meant that i will use both the bluepill and the esp01 which will be used with AT commands to do the turn on / shooting of the camera
a) I think you are off by an order of magnitude. My readings suggest 30mS with a necessity approaching 50mS.
b) You’re doing the design and pricing the components. I cannot argue with that.
c) The serial communications grew up on the “AT” concept. If it works for you … do it.
Ray
[mrburnette – Tue Jan 16, 2018 3:18 pm] –
a) I think you are off by an order of magnitude. My readings suggest 30mS with a necessity approaching 50mS.Ray
To be honest i read it on instructables, not thebest source of information i would say ![]()
[aster – Wed Jan 17, 2018 1:17 am] –[mrburnette – Tue Jan 16, 2018 3:18 pm] –
a) I think you are off by an order of magnitude. My readings suggest 30mS with a necessity approaching 50mS.Ray
To be honest i read it on instructables, not thebest source of information i would say
![]()
I always hate to leave something “open” without providing a definitive reference:
http://arduino-esp8266.readthedocs.io/e … and-delays
Summary quote:
Remember that there is a lot of code that needs to run on the chip besides the sketch when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending events each time the loop() function completes, OR when delay is called. If you have a loop somewhere in your sketch that takes a lot of time (>50ms) without calling delay, you might consider adding a call to delay function to keep the WiFi stack running smoothly.
There is also a yield() function which is equivalent to delay(0). The delayMicroseconds function, on the other hand, does not yield to other tasks, so using it for delays more than 20 milliseconds is not recommended.
Dhrystone and Whetstone Benchmarks for stm32
viewtopic.php?f=3&t=76&start=160
^^ almost 500 Mflops done by pito with overclocks
i have that strange feeling that a F407 could literally compress and stream video into files on an sd card, normally that’s the job for those Ghz large arm cores e.g. R Pi 3, but F407 may be able to do so if the image is rather small and frame rates isn’t too high
OT the black F407VET boards are reaching rather interesting price points
running close to $10 a board (i think some including shipping)
https://www.aliexpress.com/w/wholesale- … 7vet6.html
[ag123 – Thu Jan 18, 2018 4:09 pm] –
if floating point matters, i think F407 or maybe F405 is probably a king of the hill![]()
Dhrystone and Whetstone Benchmarks for stm32
viewtopic.php?f=3&t=76&start=160
^^ almost 500 Mflops done by pito with overclocksOT the black F407VET boards are reaching rather interesting price points
running close to $10 a board (i think some including shipping)
https://www.aliexpress.com/w/wholesale- … 7vet6.html
$10 per board is still 500% more than the cost of a < $2 blue board. Op is not building a quad-copter, just some data logging and a few sensors and possibly a future WiFi interface.
If we could get the F407VET down to $4.00 then I think the ~2x price differential would sway most of us to pay the extra for low quantity needs.
However, since the Op ultimately wants to have WiFi, an < $5 ESP32 board definitely should be considered for the future as that solution offers a very close price point to the F407VET, simplifies the hardware design, provides full coverage of the current known requirements; however, there is likely the port requirement for the desired libraries.
Ray
https://www.aliexpress.com/wholesale?ca … Text=esp32
earlier on some of my searches seemed to land me on somewhat pricier esp32 boards
[ag123 – Thu Jan 18, 2018 4:34 pm] –
i think u’re giving me some incentive to try out esp32 too![]()
https://www.aliexpress.com/wholesale?ca … Text=esp32
earlier on some of my searches seemed to land me on somewhat pricier esp32 boards
You will pay a little extra for the ESP32 boards with the “tin shields” covering the ESP32 + EEPROM as this configuration is RF/Noise reducing. Just for playing and DIY projects, the strict FCC stuff is not too important since most of what you can mess-up from digital harmonics is on your own home
(maybe an ESP32 cluster could even warm up your lunch like a microwave over)
On the positive side, it makes the EEPROM easy to change.
Ray
yep, the f103 is enough for this
there is likely the port requirement for the desired libraries.
i already have the code compiling on esp32, maybe it won’t work, who knows, but this is a good starting point ![]()
[ag123 – Thu Jan 18, 2018 4:34 pm] –
i think u’re giving me some incentive to try out esp32 too![]()
https://www.aliexpress.com/wholesale?ca … Text=esp32
earlier on some of my searches seemed to land me on somewhat pricier esp32 boards
he gave the same incentive to me too
when i will receive the esp32 i will decide which mcu to use and then make the pcb, the only problem is that i will see it in 2 months ahahah in italy the national post is soooo slow
i was just looking for the esp32’s spi pins andddd them are configurable as you wish, “like a fpga”, interesting ![]()
[aster – Fri Jan 19, 2018 2:52 pm] –
…
he gave the same incentive to me too![]()
when i will receive the esp32 i will decide which mcu to use and then make the pcb, the only problem is that i will see it in 2 months ahahah in italy the national post is soooo slow
i was just looking for the esp32’s spi pins andddd them are configurable as you wish, “like a fpga”, interesting![]()
Wish you were closer, I have 5 of the boards, 1 “real dev boards” and 4 clones. The clones were far less expensive, but we’re slower to arrive. Adafruit has the official boards in-stock for $15 USD…. pricy but I wanted one “official” board just in case I had an issue with a clone.
There is one issue I have noticed with the Chinese boards that is not s/w or Espressif h/w but is a board layout and will not affect development:
https://www.hackster.io/rayburne/esp32- … one-7f4ff7
Ray
[aster – Fri Jan 19, 2018 2:52 pm] –
he gave the same incentive to me too![]()
when i will receive the esp32 i will decide which mcu to use and then make the pcb, the only problem is that i will see it in 2 months ahahah in italy the national post is soooo slow
i was just looking for the esp32’s spi pins andddd them are configurable as you wish, “like a fpga”, interesting![]()
the notion of a $4.90 board with wifi + ble + 32 bits (512k ram i think and running at some 200mhz?) is hard to match even for that wifi + ble + 32 bits alone, doubt it is easy to find something cheaper with the same. for ble there is nrf51822 but similarly those boards hover around $4 i think and is possibly slower than esp32 as nrf51822 is a cortex-m0 if i remember correct
https://www.hackster.io/rayburne/esp826 … ime-1df8ae
Also, the unused flash can easily be configured as SPIFFS which is very easy to utilize in Arduino-ish programs:
https://www.hackster.io/rayburne/oui-ou … 266-323ae4
Ray


