You are browsing as a guest. Sign up (or log in) to start making projects!

Nightly

Hardware
  • 4 Devlogs
  • 9 Total hours

6-in-1 affordable alarm clock (with some twists!)

Open comments for this post

3h 12m 38s logged

Realized it’s a bit hard to work on the charger mechanisms because I’m rather unfamiliar with how the charging docks, power delivery and things like that work, so I looked into that first. Found a nice article explaining some key considerations for selecting a good charging dock, and the main points such as having a power rail, cooling, status indicators, and certain physical retention designs are good inspiration. I think I much better understand what I have to do to charge, but the STM32C0 doesn’t have USB-PD negotiation support, so I’m switching to a STM32G0. Unfortunately it’s close to double the cost but it’s worth it for the power delivery and added I/O pins. OK rip the initial STM32G0 I found actually is too cheap it doesn’t have the UCPD peripheral that’s required so I need another MCU (again).

Also, I realized that the user shouldn’t need to replace the battery since it will recharge, so I can just directly use a 18650. I swapped back the battery holder in my schematic too.

I came up with a method of charging things – the STM32G0 will request the total required voltage based on the number of devices it senses, and then the total voltage will be split into the separate voltages required for each part. I ran that by AI, and it turns out I need to use buck converters to step down the voltage which makes sense since parallel circuits will still have the same amount of voltage drop.

I researched a bit and it turns out that USB 2.0 and 3.0 are pretty much equally slow for USB A ports, so I decided to go with a 2.0 one for the price. That’s because the STM32G0 only has enough for 2 sets of CC pins so having my second USB port be a USB A instead of a USB C will allow a second device to charge at 5V without needing to negotiate anything.

Ok I pretty much figured out what I have to do, and the next session, I’ll get to wiring everything I learnt today! Plus searching for valid buck converters that can provide variable amounts as controlled by the MCU

0
0
6
Open comments for this post

2h 24m 1s logged

I realized I don’t actually need USB3 because the STM32 doesn’t have SSRX/TX support, so I found a USB2 receptacle I could use instead. I also thought it’s probably better to use AA batteries because it’s more universal, so I found a 3 AA battery holder and added it as a battery in my schematic. However, I realized if I let the user replace the battery they might accidentally place a non-rechargeable battery, and also, since there’s a recharging circuit, the battery shouldn’t ever die, so it might be better to use a 18650 after all.
I added the new elements into my schematic, and should’ve wired the charge management controller. I had to consult online sources to get a refresher on pull-up and pull-down resistors, as well as find the resistance for the STAT pin connection’s pullups to the MCU. Here’s my new schematic:

0
0
3
Open comments for this post

2h 32m 6s logged

I worked on researching different elements behind USB-C ports’ pinouts, starting to wire the power parts of it. It made me look into power delivery and handshakes to negotiate different voltage and currents, but it seems that for simple phone charging the default will suffice.
I also learned more about the differential pairs for RX/TX, though I’m not quite sure what I’ll be using that for yet.
I spent some time thinking and making sure I thoroughly understand what goes on with the pull up and pull down resistors for the CC (channel configuration) pins – based on the pull up/ pull down resistors and the voltages, you can tell whether the CC1 of the plug is connected to the CC1 of the socket (unflipped orientation) or the CC2 is.
I verified that the VCONN stuff mentioned on this article does not actually apply to my PCB since the cable length is short.

It seems like I covered everything for the USB research, so next session I can start wiring more!

0
0
2
Open comments for this post

1h 13m 3s logged

I figured out how the battery charging and load sharing system should work, thanks to these godsend docs, so I added some of the required components into the schematic page.

0
0
30

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…