Jana-Marie / Otter-Iron-PRO

USB-PD soldering station for JBC C245 handles.
284 stars 36 forks source link

Might be a silly question but... #5

Closed dreamcat4 closed 4 years ago

dreamcat4 commented 4 years ago

Hey I was really thinking about these projects today (not just yours, but also by others out there) and wonder why you choose STM32 platform as the MCU? The reason I ask is because I see that the ESP32 is pretty cheap now less than $3. And it has a high performance and very good timing precision. Plus 2 cores. So could that be a better MCU platform, for driving the JBC tip and updating the display?

Maybe I feel it is somewhat a missed opportunity. That nobody else on the internet has yet made any JBC controller based around the ESP32. After having researched STM32 hardware variants today (a lot - yes the whole day is lost to that!) for a 2 other Open Source Firmware projects. It seems they release many variants in the hardware it can really break things silently when you end up with a chip that 'looks the same'. But is actually NOT behave exactly the same. I think this is currently my main personal hell with STM32. While looking online to source another chip to match / replace. It is indeed a hell...

Yet elsewhere we can easily buy an ESP32. And (for sure) its always the same. For what $1 - $2 USD more to the BOM cost? While also getting a higher performance etc. What am I actually missing here?

Sorry I don't mean to say you should now switch all your MCU platform now for this device. Since its already done! I am instead trying to ask if you can imagine:

If you knew those things today, and had to evaluate which platform to choose for this project.... would you still again choose STM32 (same choice?). Or would you instead maybe want to go with ESP32 instead?

I am asking because we were discussing elsewhere this very matter: What is actually best choice for MCU platform. For other similar projects. And to get the best community involvement. So your comments / insights are so much appreciated. Clearly the otter pro is such a nice project. And a great success of itself. I hope you understand the purpose. Since we all are talking about other similar open source hardware projects. Thank you.

jeanthom commented 4 years ago

Hi dreamcat4,

There isn't actually a huge need for performance on this board, IIRC it's just running a PID controller, it negociates USB PD and renders basic graphics to an OLED display. Any MCU with a PWM and a timer could do the job actually.

While the ESP32 is a solid choice for real time/IoT/Bluetooth projects, it is (I think) overkill for this specific project. It is harder to source (I'm not saying it's impossible to buy one, but it's nowhere near the availability of mainstream 32bits MCUs), it requires more components on the PCB (eg. STM32F072 have a built-in USB DFU firmware whereas ESP32 require an external USB-UART bridge). That drives the price up and makes the design/assembly process harder.

An additional reason is @Jan--Henrik's experience with STM32F072 in USB-C projects. Even if you could get a much better MCU at the same price, should it necessarily justify the time you spend on learning how to code on a new target?

Hope this will answer your questions :)

Jana-Marie commented 4 years ago

Hey dreamcat4,

there are several reasons why I choose STMs over other CPUs and also several reasons why I try to avoid using ESP32. Both do not necessarily correlate with each other.

Why do I like STM:

Why do I avoid ESP32:

I use ESPs in my day-job and created quite a few designs with them, thus they are anything but unknown to me. I try to avoid them wherever it is possible due to high amount of bugs within Espessifs documentation, hardware and software. Just today I received a new version of the ESP32 module, which according to the change log is just like the old one, but in reality a complete interface is not connect. This is highly unprofessional and nothing I can work with. :/

There are great alternatives to the ESP32 and also for STMs. e.g.: Nordic nrf51/nrf52, Atmel ATSAM or Silabs Gecko (EFM32)

Other than this I totally agree with @jeanthom

dreamcat4 commented 4 years ago

Thank you both for these insights. Very grateful. Also keen to hear more about it. If there is anything more to be said on this topic.

For example do you guys see anything else taking the place of ESP32 in future? Like the nordic 5340? It seems great MCU just except the cost right now is rathers higher (for example than STM32). Still there is a lot of interest in it.

Or otherwise to hear a little more about the Atmel ATSAM or Silabs Gecko (EFM32).

ddavidebor commented 4 years ago

@dreamcat4 the place of the ESP32 so far has been inside a lot of cheap connected gadgets, often designed by hobbyists.

There are good alternatives by Nordic and Realtek.

dreamcat4 commented 4 years ago

OK thanks again we seem to have run this discussion out. Grateful of those commentary. Closing but by all means can still add further discussion if you wish. I might come back myself after a long time with findings from other projects.

BTW I also wanted to mention this other project, because it uses an even lower performance MCU than your 072 (it's an arduino). While OTOH with really more powerful mosfets and power circuitry etc. for driving the heater element. Perhaps "somewhat excessive", or over built.

https://github.com/Canonius/JBC_Soldering_Station

The thing is it's heat up time is worse performance compared to an original JBC station. Perhaps the firmware could be improved if it's not being limited by the MCU itself. Just as an example where they went with even slower MCU (than this STM 072 that you choose here).

So I was wondering if MCU choice is really not matter. Such as with above example project. In fact I also wish to be building (yet another) different Ardunio based controller design (by forum user 'xDadu'). Due to it's exceptionally low BOM cost. As I am also curios to see how well the performance can be for such a low materials cost. If anything can be learned from that.