Skip to main content

Site Navigation

Your Account

Choose Language

Anything programming related to the Hexbright

34 Questions View all

Setting PB0 aka PIN 8 aka DPIN_PWR high when plugged into USB

It seems to me that setting PIN 8 high while the Hexbright is powered through USB is not safe. This is because the CP2102 itself contains a voltage regulator and the respective pin is connected to VCC (which explains why the ATmega MCU is always powered when connected to USB), so if I put high level to pin 1 (EN) on the MIC5353, then the outputs from these two regulators are short-circuited, and I'm not sure if it is safe to do so. Does anyone know?

And is there any way to detect whether the CP2102 is powered on?

Answered! View the answer I have this problem too

Is this a good question?

Score 0
Add a comment

1 Answer

Chosen Solution

get_charge_state in the hexbright library will tell you if the light is running on battery power, is charging, or is charged.

As to the relative safety of setting that pin, I don't know - but I'm pretty sure you're the first person to ask this question.

Was this answer helpful?

Score 0

Comments:

I did my own research meanwhile, and connecting the outputs is safe. Why? One of the voltage regulators will always have a slightly higher Vref, so it will provide enough current to keep the voltage at that level. The error amplifier in the other regulator will get negative feedback, so the power FET is closed.

In short, if both regulators are enabled, you won't know which of them actually provides the VCC, but the other one is safely out of the game.

by

Add a comment

Add your answer

tesarikfamily will be eternally grateful.
View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 0

All Time: 69