Thermal Printer 58mm TTL as Slave

Hello, I am new to electronics. I am trying to build a Bill & Receipt printer device wireless via BLE communication and ESP32 C3 Mini, now I wanted to design a board for my project but I am new to Kicad been building this for almost a week, I'm done with routing my traces but I don't wanna make a mistake here when ordering my first PCB design, can you guys help me with my project? I am open to any suggestions, concerns & warnings before I order my PCB.

Question 1: Why does draw filled zones with net to GND it removes all the GND traces and am I using this right?

Question 2: Is my trace is too width? I choose 2.5mm for my 3S TYPE C 4A charging module as well as my thermal printer PRN_VCC and PRN_GND.

Question 3: Is my mounting hole 3.2mm with 8 vias is necessary in my board? and am I grounding it right?

I would not worry about layout just yet as your design has some problems.

IRLZ44N need at least 5V gate drive, so you need a MOSFET that will work with 3.3V

It not a good idea to cut power to a device by disconnecting ground

What is the purpose of Q2?

2 Likes

So you have not yet successfully built a working prototype and tested it thoroughly?

You may think you want that, but you will be disappointed. Designing a board comes after building and testing a working prototype. That prototype can be on breadboard or soldered on a protoboard or stripboard.

1 Like

Yes I have tested everything in prototype without any problem. I have tested it in perfboard works perfectly fine, the reason I wanna build a pcb board for this to reduce the board size, and without using awg wires anymore.

1 Like

The IRLZ44N works with esp32 c3 mini I uses the GPIO 1 to drive the gate of MOSFET IRLZ44N and it works without a problem. And the purpose of Q2 is detecting the charging state or the 3S type C module

Maybe for the one you have but the next one you buy may not work or may get hot.

2 Likes

The IRLZ44N works because it is designed to fully turn on with low gate voltage typically 1V,2V

No it is not. The gate threshold is the voltage you need to be below to make sure the MOSFET is OFF not the voltage to be above to make sure it is ON

You have no idea what the maximum Rds(on) is at 3.3V gate drive.

What is 3S typeC module?

1 Like

Understood thanks, anyways the 3S TYPE C 4 Amp module is a 12v battery charging module with a type c port.

Is Vin the USB voltage or something else? Your Q2 circuit make no sense.

Yes it is the USB voltage input,
The transistor Q2 acts like a switch. When VIN has voltage, it turns ON and pulls the ESP32 pin to ground. When there’s no voltage, the pull-up resistor keeps the pin HIGH. So we detect charging just by reading HIGH or LOW.

No it won't.
A hint: The Arrow inside the transistor symbol actually indicates the direction of current flow.

2 Likes

Thank you for that, one mistake could mess up everything. It Emitter should be GND right, then collector should be GPIO3.

Yes emitter to GND.
However since this is battery operated, you don't want to waste power, so make R4=5.1K and R3=1K.

1 Like

Need help with the MOSFET circuit?

1 Like

yes sure, or maybe it would be easier if I just use voltage divider since the purpose of it is just to detect charging state.

No it safer with the transistor.
With a voltage divider you should still have a protection diode, so you are not saving much component wise.

1 Like

Thanks for the advice. Now since I may be ordering it from JLCPCB, Is my trace too big? I chose 2.5mm track width for my 3S TYPE C 4A charging module as well as my thermal printer PRN_VCC and PRN_GND.

I suggest you take my advice about the MOSFET circuit, up to you though

2.5mm trace is not to big for power.
I would make all other traces at least 0.4mm and vias at least 0.4mm.

If there is no reason to have the board grounded through the mounting holes, I would just use plain mounting holes.

What is this deal? double trace?

Base on my research the mounting holes being grounded would help
Better Return Path for High-Frequency Noise
EMI / Noise Shielding

I am not actually sure if it helps at all base on what I'm building, but basically it would only be mounted on a thermoplastic for the casing.

The purpose of the double trace is just to prevent ground loop from EMI issues or noise, that is also base on my research.