rosmo-robot / Open-Core-M5stack

Adapter for ESP32-Dev-C & M5stack modules
MIT License
10 stars 0 forks source link

Review ESP32 adaptor board #1

Closed samuk closed 2 years ago

samuk commented 2 years ago

Does this seem like it would work?

runger1101001 commented 2 years ago

It is a bit hard to say because there aren't any net-labels, or I'm not smart enough to make EasyEDA show them. So its a bit of guesswork which trace does what.

I'm guessing the resistors and solder jumpers are for I2C pull-ups? Are the other lines for SPI? if yes, which is the nCS line? That usually wants a pull-up resister too... Are the UART lines connected? Are they crossed? Should they be? Did you cross-check the pins used against the ESP32's flash pins? It has a bunch of pins you can't really use, or only after boot-up is complete. It's usually a mistake to connect things to these pins, it can prevent the ESP32 booting.

Lots of questions around power:

I see you've connected the 3.3V to the m5 header, but not the 5V... why not? I'm guessing a lot of modules would use the 5V line, which seems to be the "main" power line of the m5 stack...

Looks like no power is applied to the UAEX(?) header, isn't it supposed to have 3.3V or 5V?

What happens on the MCU board if the 3.3V line is back-powered? (and the 5V assuming it gets connected?)

What's the power concept? How does the MCU board get its power when USB is not connected, and what happens if USB is connected?

runger1101001 commented 2 years ago

Another comment: I see that most of the m5 header pins are not connected. But if this is to be a replacement open core board for m5 stack, all the ESP32 pins should be connected to the corresponding m5 header pins, or it won't be compatible with the standard core and the other modules...

samuk commented 2 years ago

Thanks, I uploaded it here without really checking it. I think we're missing the whole bottom layer. I'll get back to the guy and see if he can export again/resolve.

samuk commented 2 years ago

OK this is better: https://365.altium.com/files/CDB3C9AB-1C0E-4B25-A3A4-1780F1BBCA1A

Which of your queries remain unanswered?

samuk commented 2 years ago

"Did you cross-check the pins used against the ESP32's flash pins? It has a bunch of pins you can't really use, or only after boot-up is complete. It's usually a mistake to connect things to these pins, it can prevent the ESP32 booting."

esp32 flash pins are gpio 1 and 3 and those pins are connected with both m5 connector and uext connector

Ref: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

Would you recommend disconnecting them and choosing some alternates for GPIO?

runger1101001 commented 2 years ago

Hey, the new picture looks much better for the header connections.

Now I have the following points:

Flash pins: are GPIOs 6,7,8,9,10,11 - these pins should not be used, really, but it looks like they aren't exposed on the MCU board anyway, so all good there. Pins 1,3 are the default UART, you can use those.

samuk commented 2 years ago

Comments from developer "you don't have to worry about those 3.3v and vin/5v.

as long as you are using 3.3v in that 3.3v pin it will be fine (input or output). as esp32 dev board already have a voltage regulator inside. But you have to supply 5 v or more in the vin pin .

I checked those arduino mcu vin 3.3v and 5 v rail. those are same as esp32 dev board one.

and you will not need any mosfet or diode for sense or switch. (i tested that myself in my some other pcb) . you will need that if you want to keep esp32 powered by battery and also charge the battey using vin."

if you want to battery charge and battery to power the esp32 and supply 3.3v also then a separate battery charging circuit is needed in the pcb(though this circuit available in esp32 dev board ,, but no pin is available in header pin for connecting battery. if vbat pin was available we can just connect that with battery

Alternative (but more expensive) ESP33 with vbat: https://www.adafruit.com/product/3405 https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinouts

However, this would not be compatible with the 'standard' ESP32devC-v4 pinout https://www.espressif.com/en/support/documents/technical-documents?keys=Reference+Design&field_type_tid[]=127 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html#pin-layout https://www.olimex.com/Products/IoT/ESP32/ESP32-DevKit-LiPo/resources/ESP32-DevKit-Lipo-GPIOs.png https://www.aliexpress.com/item/4000090521976.html

ShouravSarkar commented 2 years ago

Hi there. vbat pin is exposed because there is not connection pin for battery from esp32 dev board. we can still use vbat but we have to make separate circuit for that which will power the board and also charge the battery from the VIN supply.

there are some board like adafruit esp32 board which is open source and they break out the vbat pin

runger1101001 commented 2 years ago

Much as I like the Adafruit products, I think that would make the whole thing more expensive... and specific to a vendor/board. As far as I know there are quite a few of the DevKit type boards out there, presumably most with compatible pinouts? So I think that is actually a good choice.

I'll trust you on the power concept ;-) if you say you've tried it out in the past, that's what's most important.

Maybe a solution for the VBAT is to use an existing battery-charger/boost converter board - there are many on aliexpress... or make the decision to keep it as it is, and open-core just doesn't do the battery charging... For Rosmo, there needs to be a different charging concept for its 3 LiFe batteries anyway...

ShouravSarkar commented 2 years ago

can you tell me one thing? you are going to power the board using vin . right? and 3.3v will be output for other sensors that use 3.3 v. right?

for battery charging you can use those aliexpress module. but it is better to integrate so single vin will power everything

runger1101001 commented 2 years ago

Hey, when you say "the board", you mean the DevKit MCU board? I guess that's up to you, depending on your design for the open core board...

AFAICT the power concept for M5 stack seems to be mainly the 5V line, which either powers the core or is powered by the core. There's also the VBAT pin, which is expected to be powered by a Lion/LiPo 3.7V 1S cell. This pin either powers the m5 core, and via it the 5V line of the m5 stack, or it is powered by the m5 core's built-in charger, when the m5 core is plugged into USB. VUSB isn't exposed unfortunately, so you can't charge the battery from another source.

The 3.3V line can be used to power 3.3V peripherals/modules, we'll use it to power the prototype ESC board when not connected to USB.

ShouravSarkar commented 2 years ago

yes.

as your description, this PCB will be okay.

only thing is the battery now. if you want to use battery then we have to use another battery charging circuit and also some mosfet diode etc

samuk commented 2 years ago

I think the board as it stands works for our use case? Just to re-state to check my understanding:

Is that correct?

For use cases beyond this, where people want to use a 3.7v Lipo, can they not use the ESP32-Olimex-Lipo-board and connect the Lipo directly to the ESP32-Olimex-Lipo-board? So long as they then apply 5v to the 5v-M5stack-Mbus-pin for charging, the ESP32-Olimex-Lipo-board, should then handle the charging?

ShouravSarkar commented 2 years ago

For use cases beyond this, where people want to use a 3.7v Lipo, can they not use the ESP32-Olimex-Lipo-board and connect the Lipo directly to the ESP32-Olimex-Lipo-board?

yes. If they connect battery with esp32 board it will work perfectly and it will charge when 5v apply to m5 stack

samuk commented 2 years ago

This issue has served its purpose, check other issues in the queue.