Good day! Since I won't be using a breadboard for my circuit because I will place it in an enclosure, I'm still not sure if my connections are correct.
For now, I already connected the battery by soldering to the switch, then switch to the buck converter (to convert 7.4v to 5v), and it works
I also connected the esp32 to the adxl and it does it job (detecting vibrations) - I did this by just using the USB connector to the laptop.
My uncertainty lies with the voltage sensor and common ground.
• in the diagram, I plan to connect voltage sensor VCC and GND to Buck Out+ and Buck Out-
• for the S, is to the D32 (gpio32) in the esp32, and negative terminal (-) to the buck IN- for detection of battery health
• I also plan to connect the 5v(VIN) and GND of esp32 to Buck Out+ and Buck Out-
• for the gnd of the adxl345, I plan to maintain its vcc connection to 3.3v of esp32 but change its gnd connection to Buck Out- for the common ground.
Is my plan correct? I need to solder these connections since the breadboard I need is not available in the shops rn so I'm trying to not have any errors in the connection😓
Your wiring diagram is extremely hard to read. But if that's a SPDT switch and if the common terminal is the one on the right, you're going to have a very bad day when you short the positive output of that 7.4V battery to ground.
Thank you for this comment. I just checked right now with my multimeter in continuity mode, and indicates a short circuit. I think I reversed my wiring, so the one in the right (com terminal) should be connected to the battery directly right? and the other terminal I connected to the battery should've been connected to Buck In + right?
Let's just hope you connected your resistance meter when the circuit was powered. If so that is good but useless. Any unpowered reading will look like a short because of conduction by the static protection diodes all ICs have.
I wasn't planning on using any boards since I 3d printed a case for the esp32 and the sensor😅 I'm just uncertain if I the common ground should be placed on the buck out- and also the connection of the voltage sensor
Since you don't have a PCB where a ground plane could solve this, you'll have to create one yourself. You pick a good spot like the buck converter, and make it the center of a GND star. Ditto for Vcc.