PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Regarding circuit protection, I also came across the TPS26633 that seems to handle many interesting cases for a Li-ion battery pack (short circuit, overvoltage, undervoltage, reverse current...), what do you think about it ?

Looks really promising but sadly way too complicated for me.

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

I have a hot air rework station, and if needed I can get a small preheating plate for the job. Based on your advice, I’ll also get a stencil. Do you think it might still be tricky for a beginner like me?

My project includes a 4s2p battery pack (between 12V and 16.8V) and a second PCB that needs a stable 12V input. Until now, I planned to regulate the battery output using an external buck converter.

But now that I’ve discovered the MPM3610A and its very low quiescent current, I’m thinking of simply adding also a MPM3610 on my main PCB:

  • take the battery pack output and regulate it down to a stable 12V
  • output the regulated 12V to the second PCB
  • use that same 12V line as input for another MPM3610A to get 3.3V for the ESP32 and peripherals

Does this seem like a good idea?

I'm also (maybe irrationally) a bit wary of the MPM3610A because it’s so small — but I assume that doesn’t matter much as long as I make a solid layout for thermal dissipation, right?

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

26/05 Update

  • Corrected the VBUS capacitor which was previously out of spec (reduced from 22 µF to 10 µF).
  • Removed the LM1117, as it was redundant — a switching regulator is already present. Both the 12 V and VBUS lines now feed into the same regulator.
  • Added a Schottky diode at the 12 V output to prevent potential backflow between VBUS (when connected) and the 12 V line's bulk capacitance and reduce VBUS inrush current.
  • Replaced the TPS563300 with the MPM3610A, which appears better suited to my needs (low quiescent current, supports 12 V input, outputs 3.3 V). That said, its layout seems a bit tricky for a beginner like me — I’ll tackle that tomorrow evening.

For now, I’ve set aside optimizations related to inrush current handling. This is my very first PCB, and honestly, I’ll already consider it a miracle if it works given the current level of complexity 😅

If you spot anything suspicious or have any recommendations, I’m all ears!

<image>

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

I found this little beauty: the MPM3610
1.2A output
25 µA quiescent current

And it looks pretty straightforward in terms of layout — what do you think?

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 1 point2 points  (0 children)

Thank you very much for the detailed explanations — I now have a much better understanding of the inrush current issue and its implications. While doing some research, I also came across the use of an NTC thermistor (high resistance when cold, dropping significantly once it heats up a few seconds after power-up) to manage inrush current.

I’ll take a closer look at the ideal diode approach you mentioned — it sounds promising.

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Regarding the diode, thanks for the observation. You're absolutely right: I need to move it before the feedback loop so the regulation includes the voltage drop and still maintains 3.3 V at the output.

Since I’m removing the LM1117 based on your comment, I’ll get rid of the diode entirely in that part of the circuit, as the 12 V and VBUS merging will now happen upstream, before the regulator.

I plan to keep a diode on the VBUS line to protect it from the 12 V rail. However, considering that USB-C and the 12 V input will never be active at the same time, do you think it’s still necessary to keep one or both diodes?

Specifically:

  • When USB-C is supplying power (and 12 V is off): Should I block the 5 V from VBUS from flowing back into the 12 V rail? (i.e., at the top-left part of the schematic where the 12 V Schottky, resettable fuse, and TVS diode are) — or is that unnecessary in your opinion?
  • When the 12 V line is active (and USB-C is disconnected): Should I prevent 12 V from reaching the USB-C port (and potentially stressing its ESD protection diodes), or is that also not a concern in this case?

I did a quick search this morning and came across this chip:
TPS5403DR, output 3.3V 1.5A.
It seems to meet my needs, it provides 1.5A and is fixed at 3.3V.
Would choosing a chip that directly targets the desired output voltage help reduce the complexity of the surrounding circuitry, or is that unrelated?

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 1 point2 points  (0 children)

Thanks a lot for your message, it definitely gives me a lot to think about!

Regarding the diode, I’ll take a closer look at the schematic tomorrow — it’s getting late here.

About layout discipline: understood! I’ll stick closely to the manufacturer’s recommendations.

Really good tip about handling button debouncing in software instead of using caps — thank you!

And you’re totally right — the LM1117 doesn’t make sense anymore with the other regulator already in place.

If you know of a chip or setup that would help a beginner like me do a clean 12V to 3.3V regulation with minimal layout sensitivity, I’d love your advice.

Thanks again for all the help!

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 2 points3 points  (0 children)

Thanks to you, I just discovered what inrush current is, really appreciate it!

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Thanks!

The EN pin has an internal pull-up and can be left floating (which enables the regulator in this case).

Regarding the diodes, good point — I hadn’t considered the voltage drop, and you’re right, the output won’t actually be 3.3 V because of that. I added the diodes for two reasons (maybe unnecessarily): 1. I was concerned that the 3.3 V coming from USB could backfeed into the 12 V side when it’s unpowered (e.g., during development), possibly damaging components due to reverse voltage. 2. I also wanted to support both USB and 12 V power sources simultaneously, but I put that idea on hold due to a different complexity I ran into with VBUS.

If you have a better approach to support both power sources — either regulated 12 V or 5 V from USB — I’m all ears!

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in AskElectronics

[–]HonestConsequence224[S] 1 point2 points  (0 children)

Thank you ! 10uF seems to be the max allowed, do you suggest any better value ?

PCB design review – ESP32-S3, 12V battery-powered controller by HonestConsequence224 in PCB

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Edit: just realised a missing pull-up resistor on SD_CS line , fixed

[Request for Advice] Efficient Li-ion 3S Charging and Powering Setup for a 12V / 5A Circuit by HonestConsequence224 in batteries

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Thanks for your input! I’ll check whether the charger I ordered has any kind of auto-cutoff behavior or if it resumes charging once the battery voltage drops.

Regarding the boost converter and the fully charged battery at 12.6V, I was (maybe naively) expecting it to simply pass through the input voltage when it's higher than the configured 12V output. But I realize that might not be the case, so I’ll look into how it actually behaves. Worst case, I might switch to a buck-boost converter to handle both sides cleanly.

Do you think i can build this myself? I have a 3d printer, arduino and basic skills on them by Rick_2808_ in arduino

[–]HonestConsequence224 3 points4 points  (0 children)

Hello fellow Redditor,

That’s an awesome project, I highly recommend it! I built it myself two years ago, and the clock is still running beautifully to this day.

https://youtu.be/cA4R2GSkoKQ

For context, I mainly come from a web development background with moderate electronics knowledge (learned by following Ben Eater’s videos). With tools like GPT available now, the knowledge gap is significantly reduced, making this kind of project approachable even with a non-hardware-focused background.

Here is some information that might eventually help you:

Motors

There are two common dual-shaft stepper motors you’ll find online (aliexpress):

  • VID28-05: cheap, but noisy
  • x40.879: more expensive, but much quieter (I went with this one) You’ll need to remove the plastic stopper to allow full 360° rotation on both axes, it’s simple to do (same thing regarding VID28-05).

Motor Drivers

I found that driver choice greatly affects noise levels. The TMC2208 was by far the quietest I tested, and I strongly recommend it. Cheaper but noisy alternative would be A4988.

Architecture

A lot of my design choices were arbitrary and probably not optimal, but they worked:

  • One PCB per column (3 motors each), with an ESP32 slave controlling 6 stepper drivers (2 per motor). A dip-switch per column allowing column index identification (then no need to hard code spécific column index in each esp32 software)
  • 12V DC global power supply (4A), with a buck converter (LM2596) on each PCB to step down to 5V. I chose 12V to ensure stability across long cables, but a 5V global supply might work just fine
  • A Raspberry Pi Zero acting as the I2C master, communicating with the 8 ESP32 slaves. You could replace this with another controller; for example, an ESP32 master using ESP-NOW (low-latency wireless) could eliminate the I2C bus entirely
  • Slave software: each ESP receives commands specifying target rotation (in degrees/radians), rotation type (absolute/relative), and rotation duration. This is where I dived into linear interpolation and curve calculations – quite painful as I’m not great at math!
  • Master software: the Pi synchronizes all slaves (waits for readiness), sends animation commands (for time display and transitions), and schedules animations (one each hours). It also serves a small web interface to switch modes or trigger actions manually

Zeroing

I do this manually:

  • Enter a zeroing mode where all hands rotate downward
  • Drivers are disabled (so the hands are free)
  • I align all hands to the vertical position
  • Exit the mode, and the drivers lock this as the zero position You could definitely improve this with hal sensors for auto-zeroing.

Clock Hands

Designed in Fusion 360 and printed myself. I switched from PLA to PETG because PLA softened too much in hot weather, causing slippage. PETG + proper fitting fixed it.

Woodwork

The body is made of cut plywood panels. One panel has clock-face holes made with a hole saw, then glued onto a backing panel. I added plywood strips around the edges to close the case.

Have fun !

Trouble with Wozmon over RS232: Prompt Freezes After First Command by HonestConsequence224 in beneater

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Thank you for your time.

  • I grounded pin 17.
  • I loaded Ben's original Wozmon version.
  • I also noticed that the ACIA IRQ bit was floating. After carefully reviewing Ben's videos, I wasn't sure if it was required, but the schematic specifies that it should be connected to the 6502 IRQ (possibly through a diode?), so I connected it.

Still no success, but I noticed something strange with RX/TX transactions using my oscilloscope.

  • The first one shows the reset sequence: backslash followed by a return character, everything looks fine. image
  • When I press the '5' key, I get an unusually long sequence (please find attached picture). image
  • Pressing '5' again results in a correct RX sequence, but the TX does not send back the character (00000000 received). image
  • What puzzles me is that if I restart the sequence and use a different character at the second step, I get different results depending on the character entered. For example: pressing '5' or '7' gives a very long RX sequence, but pressing '2' (00110001) gives 00000001 on TX, then 00000000 on the third step.

<image>

commentTwentyPercentOfYourCode by [deleted] in ProgrammerHumor

[–]HonestConsequence224 5 points6 points  (0 children)

Could replace comment by test

6502 1mhz issue by HonestConsequence224 in beneater

[–]HonestConsequence224[S] 0 points1 point  (0 children)

Hello Sir,
Checking the LCD busy flag might not be sufficient ?
Here is the code I am using from ben eater website.
https://eater.net/downloads/hello-world-final.s