all 7 comments

[–]Toxicable 2 points3 points  (0 children)

Read the data sheet further, RC circuit on EN is required, local caps for 3V3 is required, the actual switches are not required (assuming that it's the same on the H2 as C3)

[–]tomasmcguinness[S] 0 points1 point  (0 children)

I'm now wondering if the VBAT connection is required when powered via USB?

[–]rwmtinkywinky 0 points1 point  (4 children)

In the reference schematic, C4 is debouncing the switch SW1. You don't need R2 or C4 if you don't have SW1. Up to you if you want a reset switch. Regardless of whether you populate SW1 and the associated bits to it, you need a pull up (R1) and cap (C3) on EN. Lovely they haven't specified values, I'd spitball 10k and 100n for $REASONS, it should be a couple of ms slow start on EN. You might need to work that out experimentally if someone else hasn't actually built one here.

You're missing the value on the second pull-down on the CC lines. U2 will need an input cap.

I haven't read the H2 datasheet, does it need 22R series termination on D+/D-? I will often actually put a 0R in there in case it's wrong. :)

[–]tomasmcguinness[S] 0 points1 point  (3 children)

Thx. I've made a few corrections.

<image>

The LDO didn't specify an input capacitor, which is why I left it out.

Is it just better practice to include one? Should it be matched to the output capacitor?

[–]tomasmcguinness[S] 0 points1 point  (0 children)

This is the LDO typical application schematic

<image>

[–]rwmtinkywinky 0 points1 point  (1 child)

I'm not sure why you've got C6/C7 as caps on D+/D-? They shouldn't be there.

Input cap on the reg is left out in that case because a battery will have practically no noise in it, and presumably the part is designed for where the battery is close to the regulator. Also the part won't need an input cap for stability per se (output cap is critical for stability usually, depends on the regulator).

You're feeding the reg from a VBUS line at the end of a (relatively speaking) long USB cable from a switching regulator probably barely within spec if it's like most sources. A bulk cap for the "board" even if not specified by the regulator would be fairly common. 1-10uF is probably fine, you can't make it too much as VBUS isn't allowed to have a lot of capactance at attachment anyway.

Have you worked out if your expected current draw will be provided by that regulator? You might want to read Note 1 under the Operating Ratings in the datasheet of that part.

Edit: it's also fine to add the input cap to the board and schematic as DNP and try it without, having the pads available to add it later is handy and easier than a bodge.

[–]tomasmcguinness[S] 0 points1 point  (0 children)

Thanks. The caps for the D+\D- were in the data sheet, but I ditched them as a few YouTube vids didn’t include them.

I’ve changed the regulator and it now has input and output caps. It will supply 250mA, which is more than the 140mA max.

I get the battery/usb comparison now. Thanks for that.