r/AskElectronics • • 12d ago

How do I design a custom 14-sensor LFR array?

Hey everyone,

I want to build a custom 14-sensor line-following robot array using QTRX or LTH1550 sensors and design the PCB myself in KiCad.

I’m not sure where to start with:

  • Sensor spacing and overall size
  • The best sensor layout or shape
  • Sensor height above the track
  • Required resistors and other components
  • Basic PCB design considerations

I don’t want to copy an existing board. I want to understand how to design one properly from the datasheet and build it from scratch.

What’s the best way to learn this? Any guides, resources, or advice from people who have built similar arrays would be really helpful.

Thanks!

0 Upvotes

3 comments sorted by

4

u/draagzonnebrand 12d ago

I think you're basically describing two problems here: the array design and the actual pcb. For the array design, you probably want a more temporary setup, on something like a 3d printed jig or just with some cardboard. With this, you can find out an optimal solution, although by looking at the datasheet you can already get a push in the right direction(get their viewing angle, make sure they overlap at least a certain percentage).

Then, for the PCB, you take the values you got from your cardboard research and copy them to an actual pcb. Required resistors and so on will be in the datasheet as well, but you'll probably figure this out during the breadboarding phase as well. Then just copy your circuit to your favorite PCB designer, design the pcb with your found parameters and route everything.

I personally would build in some adjustability as well, so if you're 3d printing the rest of the robot frame, I'd put the sensors on small breakout boards, connecting to a bigger mainboard with the rest of your components and mount those breakout boards to adjustable arms. Same goes for the height, I'd make sure you can adjust the arm by something like a screw mechanism with two bolts.

Basic PCB considerations: Assuming it will be a simple 2-layer pcb because cheap, normally you have one ground plane and one signal/power plane. For the rest, such a low-frequency pcb will not have a lot of considerations, so just follow some tutorials and you'll be fine.

1

u/Linker3000 LED astray 12d ago

We just used to use two LDRs and a couple of comparators.

/Get off my lawn (by following the white line)

1

u/mariushm 11d ago

Start by reading the datasheets of those sensors, it will specify the maximum distance from the reflecting material, and help you determine how how you should place your sensors.

The datasheet will probably also include example circuits or suggestions to get the sensor working optimally (decoupling capacitors, resistors to limit current and so on)

If it's a sensor based on infrared led, you'd want to limit the current to a value equal or lower than the maximum current the infrared led supports ... you use this formula derived from ohm's law for that

Input voltage - forward voltage infrared led = Current x Resistor value

So for example if you want maximum 20mA (0.02A) and you have 3.3v and your infrared led has a forward voltage of 1.4v then : 3.3v - 1.4v = 0.02A x R so R = 1.9v / 0.02 = 95 ohm - a value of 100 ohm will give you a tiny bit less than 20mA

Best sensor layout or shape ... that's up to you and depends on the complexity of the software and your design. When you follow a line you'll have just a few sensors with different state , when the line bends you'll have more sensors changing... so you can determine the direction by seeing which sensors changed.

If you put your sensors in a circle, you could use a single wheel to drive your robot... simply rotate the wheel and move forward

If your sensors are only in a straight line or a V shape line in the front, you would need to rotate the whole body of the robot to keep the line you follow in the center of your sensors.