Looking for advice on circuit layout

I need to get data from a compass module to an ESP32 Thing Plus, but they need to be powered separately (I think) - compass needs 5V and ESP32 needs 3.3V.

I’m using a USB power bank with 2 ports.

Does the diagram below look right? (I’m a day 1 novice when it comes to circuits)

I’d be glad to hear any other ideas :slight_smile:

My main point of confusion is the GND connections. I’ve read that they all need to be connected, but I don’t know if the forking I did between the compass and logic level converter is viable.

There is no need to use two separate power supplies, however the circuit will work with a few small changes. I would expect that the logic level converter you are using will require both 5V and 3.3V supply (to indicate what voltage level it has to convert to on each side). For example:

For safety you should confirm that the GND wires are connected at the battery end - there is probably a path that will be common all the earths through the devices, but to be sure of that you should always provide your own common connection for multiple grounds. Note that there are some old-style battery units on the market that are designed only for charging phones, and they may cut out when used with very light loads. These units are often marked ‘Power Bank’. If you notice power disappearing soon after you switch everything on that is likely the problem.

The simpler arrangement would be better. The ESP32 Thing Plus has a 3.3V regulator on board and this voltage is available for external devices. So you could power the ESP32 and the compass from a single 5V supply. Then the logic level converter can get 5V from that same source, and 3.3V from the 3.3V pin on the ESP32. So delete the battery for the compass, run a pair of red and black wires from the + and - terminals at the battery to the compass, connect an orange wire between 3.3V on the ESP32 and ‘Lo V’ on the logic level converter, and a red wire from the battery or the compass to ‘Hi V’ on the logic level converter.

2 Likes

Hi Jacob
The grounds are all connected OK.
What sort of logic level converter is that. It looks like you have to supply it with 5V at the “HV” pin and 3.3V at the “LV” pin. You have not shown that.

If the ESP32 is powered at the USB connector it will be 5V and it probably has an on board regulator (I don’t know).You have shown it being powered at 5V.

I have said it before (dozens of times) and will do so again. These power banks ARE NOT power SUPPLIES. They are designed for charging of other devices. If the current load is too low it will shut down. That is how it detects “end of charge”.

So if it switches on and switches off after a few seconds that is normal and don’t say you were not warned.

If both the compass and ESP32 are being supplied 5V they can both be powered from the same SUPPLY. (NOT a power bank)
Cheers Bob

2 Likes