Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are there 2 MCUs? #9

Closed
unaiur opened this issue Dec 31, 2021 · 6 comments
Closed

Why are there 2 MCUs? #9

unaiur opened this issue Dec 31, 2021 · 6 comments

Comments

@unaiur
Copy link

unaiur commented Dec 31, 2021

Great project! It is something I has need searching for a while but I have one question... why is the second MCU required?

ESP32 is quite capable, has 2 "high" speed cores plus a low power coprocessor and plenty of peripherals, like a Hall effect sensor and an opamp to measure current and a ADC that is fast enough to count revolutions by software.

I am sure you have some reason to use the STM mcu as the core instead. I just would like to know.

Thank you very much!

@Lenti84
Copy link
Owner

Lenti84 commented Jan 4, 2022

I wanted to make the VdMot Controller a kind of modular.
STM32 is the core of the system for motor control, valve managing, RS485, 1-wire and optional CAN.
Wifi / Ethernet is only an option and realised via the ESP32 (older hw revision ESP8266).

If you look the other way round the STM32 is a cheap and intelligent port extension for the ESP ;-)
Meanwhile the STM32 it is fully flashable via ESP32 web interface...

@unaiur
Copy link
Author

unaiur commented Jan 6, 2022

Ummm, I would like to use the low power RiscV core inside Esp32s2 instead, to reduce the component count and make it simpler (I am a software guy).

Also, I will try to use the 13bit/6Khz ADC in that core to measure the active motor current across a 1ohm resistance and try to identify the back EMF using software implemented low/high pass filters.

Do you know the maximum hz of the motors in your project? If they run at more that 15.000 rpm it won't be possible to implement it by software, but seems unlikely given the low voltage they use.

@xal88
Copy link

xal88 commented Jan 7, 2022

Ummm, I would like to use the low power RiscV core inside Esp32s2 instead, to reduce the component count and make it simpler (I am a software guy).

Also, I will try to use the 13bit/6Khz ADC in that core to measure the active motor current across a 1ohm resistance and try to identify the back EMF using software implemented low/high pass filters.

Do you know the maximum hz of the motors in your project? If they run at more that 15.000 rpm it won't be possible to implement it by software, but seems unlikely given the low voltage they use.

Hi,
I think that the project has a good modular HW design for now, with the ESP32 a very common, good available cheap chip.
And you can flash the STM32 from webserver on ESP...
The ESP32S2 has only 2 13 bit ADCs, so this is no option. And it is a single Core CPU, and the old ESP single cores had problems with interrupts when using WiFi....
But in the end its Andreas design, and he has put a lot of effort into the current design.

@Lenti84
Copy link
Owner

Lenti84 commented Jan 11, 2022

I think to remember the motors do approx 8000 counted revolutions in 60s running time. So this should be slow enough for a software appraoch then.

Please keep in mind that with actual hardware concept you will need more pins than the usual ESP32 can offer. Thus you will need a port expander oder something similar.

But at the actual state of the project i cant justify such fundamental changes...

@unaiur
Copy link
Author

unaiur commented Jan 12, 2022 via email

@Lenti84
Copy link
Owner

Lenti84 commented Jan 26, 2022

I wish you success! Keep us updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants