Component Selection

Power Regulator

When designing a system, I find it best to begin from the Power source and work down to the sensors and other components. Using the LTpowerCAD application, I found the LTC3621 Synchronous Step-Down Regulator to have reasonable efficiency and a wide input voltage range for many different applications.

LTC3621 Typical Application

The Motor Encoder board is designed under the assumption that a Central board will be supplying 5 volts, which then needs to be regulated down to 3.3 volts for most ICs and sensor components. Therefore we have the following parameters:

$$ V_{in} = 5.0 \text{ V} $$ $$ V_{out} = 3.3 \text{ V} $$ $$ I_{out} = 1.0 \text{ A} $$ $$ I_{rip} = I_{out} * 0.4 \text{ A}$$ $$ F = 1.0 \text{ MHz} $$

$$ L = \frac{V_{out}}{F * I_{rip}} \left(1 - \frac{V_{out}}{V_{in}} \right) = \frac{3.3}{1 * 0.4} * \left( 1 - \frac{3.3}{5.0} \right) \approx 3.0 uH$$

In order to determine the feedback resistor values, we use the following equation found in the datasheet:

LTC3621 Feedback Resisotrs

$$ V_{out} = 0.6 * \left( 1 + \frac{R_{2}}{R_{1}} \right) = 0.6 * \left( 1 + \frac{619k}{137k} \right) \approx 3.30 \text{ V} $$

Reading into the datasheet, the most efficient low-current mode the LTC3621 operates in is the Burst Mode. Therefore, when we are creating our schematic we must be sure that the Mode pin is connected to the INTVcc pin. This also provides a 400mA current clamp, which should be sufficient for this small system.

LTC3621 Mode

Microcontroller Unit (MCU)

Since we determined that we will be using the STM32F103C8T6 chip previously, we should refer to the ST reference designs for tips, as well as other boards, such as the Blue Pill. Although ST doesn’t have any specific reference boards for the F103C8 chipset, they have a NUCLEO-F103RB reference design, which will be useful nonetheless.

Reference Designs

  1. NUCLEO-F103RB
  2. Blue Pill

MCU Crystals

It’s always a good idea to follow reference designs due to their known functionality. I particularly do this when dealing with crystal selection and routing, as well as any high-speed designs. Therefore, if I’m unable to find the exact same crystal used, I try to find one with the same specifications, such as Capacitance, and ESR, but with tighter constraints on their tolerances.

Always check your MCU datasheet for Crystal specifications and tuning options, such as extra capacitors or resistors.

If you ever run into any issues with brining a new board online, always check that the clock is generating the correct center frequency. This frequency can be tuned as needed.

Magnetic Hall Effect Sensor

Sometimes it may be tricky to determine which sensor to select, since there are hundreds if not thousands of them on the market. Therefore, when you have the time and resources, it is always best to purchase multiple sensors and test them for your application. This step can save you hundreds if not thousands of dollars, in the event that you have to rev your PCB board due to changing your sensor and its footprint.

Always test sensors before commiting them to a design, especially if they have unique PCB footprints.

Two sensors that I’ve selected for initial testing are as follows:

  1. TLE49462KHTSA1
  2. SI7202-B-04-IBR

Both of these sensors have models that are SOT-23 compatible, with matching footprints.

If you don’t test sensors and have multiple options with the same footprints, be sure their pins are in the same locations.

Connectors

There are two main connector terminals that are required for some board, a connection point for programming the MCU and a connection to link the board to an overall system.

Since one side of the board will be facing the motors, which produces a large amount of magnetic noise, I decided to go with connectors that are perpendicular with the boards surface. This may reduce the chances of magnetic noise that a right-angle connector may receive from exposed wire hanging near the connector.

Furthermore, in order to reduce the chances of interference from the motor, I decided to not use any through-hole connectors or components(besides mounting holes).

SideView

Debugging Connector

There are tons of other connectors such as 10-pin and 20-pin JTAG, Tag-Connect connectors, Cortex Debug Connectors, etc. However, I am using a simple four pin SWD connection header due to its small footprint. It should be noted that when I was researching how to program the STM32F108 chip, I ran across the requirement to set the BOOT0 & BOOT1 pins to specific values to flash programs on the MCU. Therefore, I’ve also added a 6-pin connection point that includes the BOOT0 & BOOT1 pins, as well as the 3.3V power rail and ground. This will allow us to use jumpers on the connector.

I also threw in a USB micro connector that can be used to program and power the board. This piece is optional since the MCU can be programmed using the SWO connector.

System Connector

Since I am being frugal on the expenses of this board, I opted for a simple 4-pin header as the main connector. This can alawys be updated to a more secure connector in a later rev of the board.

Misc. Connector

For initial revs of boards, I always like to include an additional header that can be used for testing, troubleshooting, or expanding board functionality as the system progresses. After all of the desired functionality is established, this connector will be removed along with the micro USB connector to save board space and reduce costs.

Reset Button

It’s good practice to include a physical reset button for any board.

Mounting Holes

Since most boards aren’t floating in space, we should include mounting holes so they can be secured inside of an enclosure or to another structure. Therefore, I’ve added two standard M3 mounting holes.

Unless on purpose, don’t leave your mounting holes floating, this can sometimes cause interference or sporatic board functionality.