mcqn / my-bikes-got-led

My Baby's Got LED, bike edition
Other
0 stars 0 forks source link

Pin access for redesign #21

Open huffeec opened 2 months ago

huffeec commented 2 months ago

With the new components #20 we will be able to slightly reduce the footprint of the board. With that in mind do we still want to expose all the pins of the esp32, provide a subset, or none at all?

The ESP32-C6-MINI-1-N4 #19 has USB serial, can we lose the UART header?

amcewen commented 2 months ago

I think having a few pins available for other things is useful, but it doesn't need to be the full set. Enough for a button (in WLED, so in addition to the usual bootstrapping ones), and an ADC and I2S pins to allow either option for the sound-reactive options (if the ADC can use one of the I2S pins that'd be fine, as you won't want both options at the same time)

The USB is an interesting question. I'd not spotted it has that. The tricky part, I think, is that the battery charger chip also wants the USB D+/D- pins. I think that's to allow faster charging options, which would (probably) trump easier flashing? Most of the time you could flash new versions over WiFi.

huffeec commented 2 months ago

The DSEL pin can be used to switch use of D+/- pins as described here.

reference circuit

But, this might be overcomplicating and not something we need to worry about?

amcewen commented 2 months ago

Using the DSEL pin is tempting. Looking at the circuit it'd be two extra components: a 2-channel switch and a pull-up resistor?

The TI switch is only available from Farnell with a 40-week lead time, but maybe this NXP chip would be a suitable option? That'd add ~43p to the BoM cost, which doesn't sound terrible for keeping USB support on the ESP32.

huffeec commented 2 months ago

There isn't anything specific in the c6 mini datasheet but the c6 series datasheet does show it's supports USB 2 but not 3

"USB 2.0 full speed compliant, capable of up to 12 Mbit/s transfer speed (Note that this controller does not support the faster 480 Mbit/s high-speed transfer mode)" 4.2.1.6

huffeec commented 2 months ago

The NXP NX3DV42GU-115 is available at LCSC in single units ($0.82ea).

amcewen commented 2 months ago

Sounds like USB multiplexing is a go :grinning:

huffeec commented 1 day ago

This has moved on because of #25 (Using the IP5310 instead)

The current design has d+/- direct to the ESP as the battery management isn't using them.

Additional inputs available

5V, Data and GND test points Test points on reverse for GPIO0/1 (External crystal)

There is also a test point on the battery management for the KEY pin in case we need that. And 3 unpopulated resistors VSET, RSET, VTHS. I don't think we'll need access to any other pins but there is space on the board if we do want to add extra test points for access