Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a solution/method for battery powering CYDs #47

Open
witnessmenow opened this issue Nov 9, 2023 · 29 comments
Open

Need a solution/method for battery powering CYDs #47

witnessmenow opened this issue Nov 9, 2023 · 29 comments
Labels
Add-ons Related to add-ons for the CYD help wanted Extra attention is needed

Comments

@witnessmenow
Copy link
Owner

It would be great to create a method or documentation around battery powering the CYD.

I'm sure it's very achievable using a cheap lipo IC like the TP4056* and possibly using the JST connector beside the USB, but a documented path to this would be great.

Not my area of expertise at all, but I do have some of the ICs ordered so I'll probably throw a stab at it shortly. But would be very happy for others input.

Also, maybe a stretch goal, but maybe even a PCB design specifically for the CYD , so it could be neatly mounted, might be cool

*Affiliate

@witnessmenow witnessmenow added help wanted Extra attention is needed Add-ons Related to add-ons for the CYD labels Nov 9, 2023
@suchmememanyskill
Copy link
Contributor

I can confirm using the JST connector next to the usb port, you can provide 5V to VIN and ground to ground, and the display powers on. (using the model that also has a usb-c port)

I did notice some weird behaviour (web requests failing) while i was doing this, but i'm unsure if that's due to the way i'm powering the display or if my power source is just bad

@bjinse
Copy link

bjinse commented Nov 30, 2023

You might check out this case, mentioned on the 3d models page, that links to a BMS and batteries.
https://thangs.com/designer/dimosram/3d-model/ESP32-2432S028%20enclosure%20for%20Battery%20and%20BMS-788656

@BludzUK
Copy link

BludzUK commented Mar 14, 2024

Hello all.
I'm new to world of programming and have been thankful for this GitHub page, it has allowed me to make a good start on a project I'm working on.
It wasn't until I had got quite far into the project that I realised that powering the CYD is going to be a bit of an issue, and then found that I wasn't alone.
Today I managed to find a workable solution. I tried a couple of different power modules from Amazon and found one that allows you to connect a 1s battery (18650 or lipo) and it ups the voltage to 5v (you adjust the output voltage with the dial). You can charge the battery using the usb c and the lights indicate when it is charging or charged.
Here's a link to the module, https://www.amazon.co.uk/gp/product/B0C3V847G2
I'll be working on a case in the near future that will house these extra components and maybe some physical buttons depending on how my project goes.
Hope this helps.
IMG_20240314_181059405
IMG_20240314_181122799

@kf106
Copy link

kf106 commented Mar 26, 2024

Why is the switch needed? Is it just there for a manual power on/off or do you need to turn off the board when charging the battery? Can it be left out?

https://nl.aliexpress.com/item/1005005236888266.html?gatewayAdapt=glo2nld seems to be a similar unit, but without a trimmer and a fixed 5V output if I understand correctly. It's also cheaper.

Also, this video https://www.youtube.com/watch?v=wYAZQzt_TVY is for an older USB-micro version of the TP5046 charging module, but a comment claims that it doesn't detect that the battery is drained which can cause damage to the battery.

NB: I'm always concerned about battery connection to homebrew devices because there's a fire risk.

@gjashley
Copy link

TP5046's are pretty safe.
I used one of these boards:
https://a.aliexpress.com/_mKCGlnc. It switches to the battery when it's unplugged (which also reboots the CYD so it's not really a UPS solution)
I have measured the power draw and it does drop way down to battery maintenance levels when all the power leds on the board are lit (ie when it measures 4.2v)
There is a button which powers it off when it is running on battery.

@BludzUK
Copy link

BludzUK commented Mar 26, 2024

@kf106 It there was not a switch the unit just powers up when the battery is connected. Sadly the little charge/voltage regulator doesn't have a switch. I did also wonder if you could run the screen while charging so I wanted to test that. I can confirm that it works like I hoped and you can charge the battery while the screen remain running.
Honestly though I realise that a lot of the work I'm doing to make this screen work (not to mention all the work everyone else has done), is all to make the shit version of this screen/esp32 work. They sell a MUCH better version 3.2 inches with capactive touch instead of crap resistive touch, oh and it is IPS so the colours look way better, black actually is black rather than grey. They also added battery input direct on the board and it uses a single usb c to do charging and programing. Seems pointless wasting time making the shit version work when the best version is so cheap still (like $7).

@BludzUK
Copy link

BludzUK commented Mar 26, 2024

@gjashley Yea, I have some of those too actually, but it doesn't have a usb c for charging, so I assume you just add one?

@gjashley
Copy link

Yeah, here's a project I've been working on with i2c sensors: image

@gjashley
Copy link

gjashley commented Mar 28, 2024 via email

@kf106
Copy link

kf106 commented May 15, 2024

I ordered a bunch of "5V 1A TYPE-C Micro USB 18650 TC4056A Lithium Battery Charging Board Charger Module with Protection Dual Functions TP4056" boards that were 1-50€ each. Scavenged a battery from a broken PS4 dualshock, and a broken bluetooth speaker provided both a connector for the battery, and a plug for the connector next to the micro USB port.

Five minutes of soldering, and it's charging the battery and powering the CYD. Unplugging the USB-C cable results in the display dimming ever so slightly, but the software keeps running.

It's a cheap solution, and it works. It's a shame they didn't include a TP4056 on the board and a battery connector like some of the boards out there.

cyd-charger

@lcorsini
Copy link

Is there an alternative way to power the board with a battery without using the serial jst connector?
because I have a gps receiver already connected to it
I thought of desolder the micro usb (mine has usb-c too) and connect the TP5046 and battery to that connector, is there a cleaner solution without removing the port? (apart from making a micro usb power cable)

@SimpleAsh
Copy link

Hi I new to commenting, here but I read through info here and #87
And though I would have a try,
It seems to work, if anyone is interested
https://youtu.be/XBvBRjAgCMo?si=fAkkX4ocsOttr9-3
Uploading 20240728_092152.jpg…

@lcorsini
Copy link

lcorsini commented Jul 28, 2024 via email

@SimpleAsh
Copy link

Arr .. I see, I haven't looked at the pin out code yet, just looked at the board, I'll get ATGM336H NEO-6M on order for a play,

@lcorsini
Copy link

Yeah I had one lying around and is working fine, but it occupies the serial connector that everyone uses for the battery

@polarkernel
Copy link

Yeah I had one lying around and is working fine, but it occupies the serial connector that everyone uses for the battery

@lcorsini Very interesting! I made a working solution for a NEO-6M using the GPIO pins 22 and 27 of the connectors P3 and CN1, but it is very annoying to have to use two JST's. I tried to use the RX and TX of connector P1, but the program hangs, when I try to connect to the serial port. Are these GPIO pins 1 and 3 on P1? Did you need any special setup?

Sorry to be a bit off-topic.

@Vendetti
Copy link

Vendetti commented Aug 5, 2024

They sell a MUCH better version 3.2 inches with capactive touch instead of crap resistive touch, oh and it is IPS so the colours look way better, black actually is black rather than grey. They also added battery input direct on the board and it uses a single usb c to do charging and programing. Seems pointless wasting time making the shit version work when the best version is so cheap still (like $7).

@BludzUK whats it called? i cant find it on ali

@BludzUK
Copy link

BludzUK commented Aug 5, 2024

@Vendetti
Looks the same as the rest at a glance, but I started using these instead now.
https://www.aliexpress.com/item/1005005138982767.html

@VuDucVN-tech12
Copy link

Hello all. I'm new to world of programming and have been thankful for this GitHub page, it has allowed me to make a good start on a project I'm working on. It wasn't until I had got quite far into the project that I realised that powering the CYD is going to be a bit of an issue, and then found that I wasn't alone. Today I managed to find a workable solution. I tried a couple of different power modules from Amazon and found one that allows you to connect a 1s battery (18650 or lipo) and it ups the voltage to 5v (you adjust the output voltage with the dial). You can charge the battery using the usb c and the lights indicate when it is charging or charged. Here's a link to the module, https://www.amazon.co.uk/gp/product/B0C3V847G2 I'll be working on a case in the near future that will house these extra components and maybe some physical buttons depending on how my project goes. Hope this helps. IMG_20240314_181059405 IMG_20240314_181122799

Hey man! Could you please take a look and let me know if my connections are correct and if this setup will work properly like yours? I'd greatly appreciate any feedback or suggestions you might have to improve it. I've attached an image of my schematic for your reference.
marauder-engver

@SimpleAsh
Copy link

SimpleAsh commented Aug 27, 2024 via email

@SimpleAsh
Copy link

Uploading 361652964-8a9e5147-0d6e-4635-8f9e-af7025c544c1.jpg…

@SimpleAsh
Copy link

cyd stuff

Very basic but red + black - gps module
I believe it is easy on model with 2 JST plugs

I'm simple ish on skills I hope this makes sense 4you

@SimpleAsh
Copy link

The correct boards help

@SimpleAsh
Copy link

I'm not a master so..

@SimpleAsh
Copy link

One board and battery was all that was needed different board 🛹 might be harder to turn 😂

@SimpleAsh
Copy link

Comments spot on the you tube
Will get you thre

@VuDucVN-tech12
Copy link

Im using tp4056 charging module with the mini 3.7v to 5v step up converter and connect with the JST 4-pin next to the USB. it can power it, but when i do any kinds of attacks (e.g Sour Apple, Evil Portal ) it will reboot the CYD ? Any solution ?

@AllanOricil
Copy link

Is there an issue to use a power bank?

@jayb880
Copy link

jayb880 commented Jan 10, 2025

there is a way of connecting a battery and c type charger without using any of the JST connections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add-ons Related to add-ons for the CYD help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests