[Solved] Questions from a newbie about Bluepill.

Working libraries, libraries being ported and related hardware
flyboy74
Posts: 231
Joined: Wed Jun 13, 2018 11:02 am

Re: ?Help! Questions from a newbie about Bluepill.

Post by flyboy74 » Thu Aug 02, 2018 8:59 am

All code on the ESP32 robot was running in MicroPython. I used a library written by someone else here is his code https://github.com/jczic/MicroWebSrv it is in python but all the concepts should be the same for Ardunio.

I how ever write all my own keimatics for the robot see this series of 3 videos

https://www.youtube.com/watch?v=Rr02JyVlNfE&t=14s
https://www.youtube.com/watch?v=8yS1m_NS-bA&t=118s
https://www.youtube.com/watch?v=DfykegzGoDw&t=148s

All the body I designed myself in Autodesk fusion360 and cut out with my laser cutter

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ?Help! Questions from a newbie about Bluepill.

Post by mrburnette » Thu Aug 02, 2018 12:34 pm

flyboy74 wrote:
Thu Aug 02, 2018 8:59 am
<...>

All the body I designed myself in Autodesk fusion360 and cut out with my laser cutter
Very impressive build! Bravo.

Ray

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ?Help! Questions from a newbie about Bluepill.

Post by mrburnette » Thu Aug 02, 2018 12:46 pm

flyboy74 wrote:
Thu Aug 02, 2018 5:13 am
<...>
The only main downside that I have found with ESP32 is low pin count. I am always struggling for enough pins on my projects. My play with STM32 atm is because I am playing with a camera running 8 bit parallel and a LCD in 16 bit parallel.
Exploring my earlier statement a bit more in depth, we must utilize auxiliary uC's to manage real-time events. Just as the human arm will pull quickly away from a hot surface, the brain is only involved after-the-fact... usually with the pain signals! Architecturally, we are working with distributed systems. There have been lots of attention given to the layered approach for AI.

Most hobbyists that utilize GPS fail to realize that the GPS unit is a rather powerful microcontroller. After it does all the dirty work, it sends a nice serial stream out for digestion (usually by our STM32 or an Atmega uC. Distributed processing is all around us but we often fail to realize the team effort: just consider the modern automobile and the uC's connected to the vehicle bus.

Ray

human890209
Posts: 34
Joined: Mon Jul 30, 2018 12:19 pm

Re: ?Help! Questions from a newbie about Bluepill.

Post by human890209 » Fri Aug 03, 2018 1:21 am

Hi,
we must utilize auxiliary uC's to manage real-time events.
Sorry, I'm a newbie.
I'm confusing that why auxiliary uC is related with the lack of pin count? Are you suggesting that using an STM32(more pins) talking to other hardware and communicate with ESP32 on a higher AI level? Using ESP32 like a brain and STM32 as epencephala and nerves?
I noticed the low pin's number of ESP32, too. I think that's reasonable for a board already with wifi and Bluetooth. And that won't piss STM32 off...

My question is:
Most hobbyists that utilize GPS fail to realize that the GPS unit is a rather powerful microcontroller. After it does all the dirty work, it sends a nice serial stream out for digestion
Is the "dirty work" and the "Serial stream" more concerning about hardware circuit connection(a lot of input pin and a few output pin) or calculation?
Is ESP32 not good at real-time calculations?
Last edited by human890209 on Fri Aug 03, 2018 5:49 am, edited 1 time in total.

flyboy74
Posts: 231
Joined: Wed Jun 13, 2018 11:02 am

Re: ?Help! Questions from a newbie about Bluepill.

Post by flyboy74 » Fri Aug 03, 2018 1:41 am

Is ESP32 not good at real-time calculations?
This is a good question and I am a noob so not 100% sure on answer. I do know from my experience that ESP8266 and RPi zero have bad latency because of the threading to maintain the WiFi. I do believe that the dual core of the ESP32 had addressed some of these problems but am still lead to believe that STM32 still has faster interrupts than ESP32

human890209
Posts: 34
Joined: Mon Jul 30, 2018 12:19 pm

Re: ?Help! Questions from a newbie about Bluepill.

Post by human890209 » Fri Aug 03, 2018 5:53 am

Hi,
My ESP8266 and ESP32 haven't arrived yet.
Will ESP32's extra processor core still get latency problems?
And cause I haven't tried an ESP8266 yet, could I turn off the wifi and make it a normal board like STM32 to avoid the latency problem?

And another question for ESP32 and ESP8266.
They got 520k and 50k SRAM, but how much resource is consumed by the WIFI function? Are 520k and 50k 100% available for my sketch?

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ?Help! Questions from a newbie about Bluepill.

Post by stevestrong » Fri Aug 03, 2018 8:34 am

human890209 wrote:
Fri Aug 03, 2018 5:53 am
And cause I haven't tried an ESP8266 yet, could I turn off the wifi and make it a normal board like STM32 to avoid the latency problem?
...
They got 520k and 50k SRAM, but how much resource is consumed by the WIFI function? Are 520k and 50k 100% available for my sketch?
Although I am also interested to get the answers, I think these questions should be put on ESP forum.

human890209
Posts: 34
Joined: Mon Jul 30, 2018 12:19 pm

Re: ?Help! Questions from a newbie about Bluepill.

Post by human890209 » Fri Aug 03, 2018 12:05 pm

You are right, I'm sorry. Please forgive me. :(

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ?Help! Questions from a newbie about Bluepill.

Post by stevestrong » Fri Aug 03, 2018 12:14 pm

No problem, I have done myself a quick research on the net, and found a relevant link here: https://esp32.com/viewtopic.php?f=19&t=5308&start=10.

But one should really stick to the topic of the first post.

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: ?Help! Questions from a newbie about Bluepill.

Post by mrburnette » Fri Aug 03, 2018 12:38 pm

stevestrong wrote:
Fri Aug 03, 2018 12:14 pm
No problem, I have done myself a quick research on the net, and found a relevant link here: https://esp32.com/viewtopic.php?f=19&t=5308&start=10.

But one should really stick to the topic of the first post.
Solely my fault for hijacking the discussion ... In this forum, it is easy for me to go from an "engineer" prospective to an "architectural" prospective, thus many questions arise. To somewhat cap this discussion, let me say in general terms:

[*] ESP8266 is a single core uC like the STM32Fxxx. The "Arduino Core" of the ESP8266 uses a task-switcher called non-OS that allocates time slices between the RF stuff and housekeeping and the Arduino thread. Thus the programmer is entirely responsible for releasing the Arduino thread before the RF section becomes stale (the cause of many crashes.)
[*] ESP32 Arduino core includes FreeRTOS such that by default, one core is for the Espressif stuff and one core is for the Arduino.
[*] An Operating System such as the Linux implementation in Raspberry Pi generally adds more latency than an RTOS and much more than Arduino on a uC.

A PhD friend of mine who is retired and deeply into robotics and machine learning is building his latest robot with 3 tiers of microcontrollers with the top level being an ESP32 hosting the aggregation of signals on a webpage ... ESP32 likely to be replaced with an RPi Zero in the future.

uC latency article by DigiKey

ESP32 + MicroPython latency

Overview of Interrupt Latency issues


Ray

Post Reply