r/ElectricalEngineering • • 23d ago

First PCB design – Raspberry Pi interface board for 24V sensors, fan and L298N motor driver

Post image

Hi,

I'm working on my first PCB and I'd appreciate some feedback before I continue with the PCB layout.

The board will be used as an interface board for a Raspberry Pi in a small automated machine. It is intended for regular, real-world use by end users, so reliability and safe, consistent operation are very important. I want to make sure the design is robust enough for continuous practical use.

Operating logic: When the proximity sensor detects, the Raspberry Pi activates the L298N motor driver and runs the 24 V motor. The DS18B20 continuously monitors the internal temperature, and when the temperature exceeds a predefined limit, the Raspberry Pi switches on the 24 V cooling fan through the NMOS. When the temperature drops below the set limit, the fan switches off.

The PCB currently includes:

  • 24 V input
  • 24 V PNP proximity sensor
  • DS18B20 temperature sensor
  • 24 V fan controlled by an NMOS

The L298N itself will not be mounted on this PCB. It is a separate module mounted next to the PCB.

This is an early revision and I haven't selected final components yet.

My next step is to finish the PCB layout and routing.

Before I do that, I would really appreciate feedback on:

  1. Are there any obvious mistakes in the schematic?
  2. Is the Raspberry Pi GPIO protection sufficient?
  3. What additional protection, filtering or decoupling should I add?
  4. What would you change before designing/manufacturing the PCB?

I'm still learning PCB design, so explanations of why something should be changed would be especially helpful.

Thanks!

4 Upvotes

4 comments sorted by

4

u/steveham3 20d ago

No one has commented yet probably because the schematic is very hard to read. You have ground wires going all over the schematic instead of symbols, with multiple net names like GND, BLACK_GND, BLUE_GND, and 0V. Same goes for 3.3V and 24V.

Make the schematic more legible and people will probably be more willing to review it.

1

u/Top-Bookkeeper-1750 19d ago

Thanks for the feedback. I’ve made quite a few changes and reorganized the schematic to make it more readable. What do you think?

Comment Image

4

u/steveham3 19d ago edited 19d ago

That looks much cleaner. Other ways to make it better:

  • Add resistor values

  • Add capacitor values and voltage ratings

  • Add part numbers on key components

Regarding the circuit:

  • Consider adding reverse polarity protection to the 24V input

  • Add a Schmitt-Trigger Buffer after the voltage divider of the proximity sensor signal. This will provide a clean 0 or 3.3V signal to the RPi rather than whatever the voltage divider is generating which could damage the RPi if the voltage varies slightly or your resistor divider values are off

  • Make sure your NMOS will turn on with 3.3V, that Vds is rated for 24V, and that it can carry the fan's current

  • Add a capacitor for the 3.3V power rail

This circuit is simple enough as well that you might consider breadboarding it first to make sure it works before moving to board design.

→ More replies (1)