Files
2026-07-01 18:20:08 -07:00

7.7 KiB

#pcb/musicplayer #pcb


TPS63020

Choosing an Inductor

Neither of the options given in the datasheet are still available so a different inductor will need to be chosen

The equations needed to find the peak current in steady state operation are Duty cycle boost: D=\frac{{V_{OUT} - V_{IN}}}{V_{OUT}} and peak current: I_{PEAK} = \frac{I_{out}}{\eta * (1 - D)} + \frac{{V_{IN} * D}}{2 * f * L} where

  • D = duty cycle in boost mode
  • f = converter switching frequency
  • L = inductor value
  • \eta = estimated converter efficiency (This is taken from section 8.2.2.2 of the datasheet)

First, to calculate the duty cycle boost we can plug in the output voltage (3.6V) and the "minimum input voltage in boost mode" which for the BQ25985 is listed as 2.304V

D = \frac{{3.6 - 2.304}}{3.6} = 0.36

Now calculating for I_{PEAK} using the values

  • D = 0.36 (calculated previously)
  • f = 2.5 (MHz, typical stated in datasheet)
  • L=1.5 (uH, value for inductor used)
  • \eta = 0.9 (efficiency assumption stated in datasheet)
I_{PEAK} = \frac{3.6}{0.9 * (1 - 0.36)} + \frac{{2.304 * 0.36}}{2 * 2.5 * 1.5} = 6.36

The datasheet states to pick an inductor with a saturation current 20% higher than the calculated value which would mean I_{sat} \geq 7.63 (FIND NEW INDUCTOR) The EXLA1V0402-1R5-R has a saturation current of 6.7A which should be a good value for this application. The DC resistance is also low and comparable to the options listed in the datasheet.

Output Capacitors

The datasheet states no major considerations except for capacity and being small and ceramic. Either ones I already have or any 22uF ceramic capacitor will be used.

Input Capacitors

Other than being X5R or X7R no other major considerations are needed for the input capacitors.

Output Voltage Selection

Since 3.6V are needed the values of 180K and 1.1M will be used for the feedback voltage divider as stated in the table of common output voltage values in the datasheet.

V_{OUT} R1 R2
3.3 V 1.1 M$\Omega$ 180 k$\Omega$

Layout Considerations

Figure 31 in section 10.2 of the datasheet should be used as an example layout for the regulator

It may not be entirely necessary to have this component since the battery charger should keep the output system voltage above a floor of 3.5V, but just in case I will keep it in case something happens and it drops below this so the LDOs can still operate fully.

PCM5102A

LCD Selection

Initially I was planning to use the NHD-2.4-240320DA-CTXN but I found that it requires 9.0V to drive the back light. Since I am driving this off of a single cell lipo I didn't want to add the additional complexity of another boost converter to get to 9.0V. I was able to find another very similar display that instead uses 3.0V (up to 3.3V) to power the back light.

The display controller gives the option of using SPI or parallel RGB to control the display. I decided to go with SPI since it is much simpler to route and manage and I don't need the performance gained by the parallel RGB interface.

Backlight Resistors

To limit the current of the backlight for the display series resistors are needed for the anode (power supply) pins. To calculate the value for the resistor the equation

R = \frac{{V_{in} - V_{f}}}{I_{f}}

is used which gives the current limiting resistor needed for a LED. The display used has a LED voltage of 3.0V and will be supplied with 3.6V (from the buck-boost). It also typically draws 160 mA of current. Plugging in these values gives

R = \frac{{3.6 - 3.0}}{0.16} = 3.75 \Omega

For a standard value a 3.7 \Omega resistor will be used. This may make the display a little bit brighter but won't change it very much. The 3.6V power rail is used to give more buffer for variations in the forward voltage of the backlights. Even though the typical forward voltage is 3.0V it can range from 2.7V to 3.4V and having a larger difference between V_{in} and V_{f} means that manufacturing variations won't affect the brightness and current draw of the display as much. It will also pull the load of the display off of the LDO and put it onto the buck-boost converter that can output much more current.

Backlight Control

Since this device will be battery-powered and the display is not needed most of the time it needs to be able to be controlled by software by the ESP32-S3. To do this a transistor will be added to the cathode pins to control the backlight with an io pin from the microcontroller. I chose this mosfet since it has very low resistance and should turn off and on with the 3.3V logic levels of the ESP32-S3.

USB

There are a few considerations needed for effectively routing USB. The first is inline resistors for the data lines. Based on the hardware design guidelines 22\Omega resistors were chosen. The hardware design guidelines also suggest adding footprints for capacitors to ground on the data lines which were also added. These can be populated later to help match impedance although they will likely not be needed.

MicroSD Card

There are two different modes that can be used to read and write data to the microSD card, SPI and SD-MMC. SPI is simpler but SD-MMC can get faster speeds and is supported by the ESP32-S3 so that is what I will be using. the ESP32-S3 can multiplex this functionality to any of the GPIO pins so the pinout of the microcontroller is not important. 10K pullup resistors are also needed on the CMD and data lines for the micro SD card to ensure that they do not enter an undefined state. I have also included a 10K pullup resistor on the card detect pin so that it is easier for the microcontroller to read and the in is in a defined state when there is no card in the slot (the pin is pulled to ground when there is a card inserted).

Control Scheme

This device will not have a touchscreen (the display doesn't have one and I don't want to use one) so I will be controlling everything with physical buttons. To do this my goal is to have physical buttons on the top for play/pause and skip forwards and backwards. I was also able to find a "thumb-wheel switch" on DigiKey which looks like a great option for volume control and navigation. It should have not only up and down selection but also a push in button for confirm. It also has two different angles for each direction that it measures although I am not sure yet if I will make use of both. I would also like a physical power switch that cuts off power to the device (except for the battery charger) to conserve battery.

Analog Power

One of the challenges of designing this PCB was designing around analog power needed for the DAC. For the audio quality to be good and have minimal noise the analog power inputs need to be clean and separated from the digital power on the board. Since a switching buck-boost converter is used the power rails will have a lot of noise that is not good for the DAC. A buck-boost is still needed to step up the voltage if needed and use the full capacity of the battery and not have to cut out early. To fix this two LDOs were added to clean the power rails and provide a stable source of power. One is for the analog power and one is for digital to provide separation between the two. For this to work the buck-boost output needs to be pushed to 3.6V so that there is enough headroom for the LDOs to properly operate.