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

Imax B6 80W clone compatability? #333

Open
hojnikb opened this issue Mar 11, 2023 · 16 comments
Open

Imax B6 80W clone compatability? #333

hojnikb opened this issue Mar 11, 2023 · 16 comments

Comments

@hojnikb
Copy link

hojnikb commented Mar 11, 2023

Do these recent clones from aliexpress for example still support cheali? Or are they using different, unsupported MCUs?

@joshgarde
Copy link
Collaborator

Depends on the clone; can't tell by just looking at the listings. In general though, the ones that advertise 32-bit CPUs are safer bets than just going for the cheapest possible listing because the chances its a reprogrammable ARM are higher

@silvio2402
Copy link

Hi, I hope you are doing well.
I bought such a B6 80W clone from here on AliExpress. It has a CMS32L051.
Would this be compatible? And would 80W theoretically work with the cheali firmware?
I know 80W is a BS number because the included power supply only outputs $12V \times 5A = 60W$.
Thanks

@diggit
Copy link
Collaborator

diggit commented Apr 19, 2023

Hi @silvio2402, this MCU is currently not supported. Fortunately, it's an ARM with enough storage, so it's definitely doable. The only issue I see is reference manual in chinese. Then someone has to add support for it (C++ coding).

@silvio2402
Copy link

silvio2402 commented Apr 19, 2023

Hi @diggit, I have some electronics and coding knowledge and I'd be willing to invest some time to collaborate to make this work. Is this the reference manual you're referring to?
Also, are there any resources available from the cheali-charger project which files need to be created/edited? If you could mention some commits/pull requests which could help me understand what it takes to support another MCU it would be very helpful. I'll have to get familiar with the codebase so is there any documentation?
If I need help, is the Google Group an appropriate place to ask about the development?
Thanks
Edit: Do I need an IDE/which one would you recommend?

@diggit
Copy link
Collaborator

diggit commented Apr 19, 2023

Yes, that is reference manual I've found. Maybe it's not exactly necessary to study it, as there is also some code in that keil pack on their website (it's just zip archive).

Regarding cheali development
I did not contribute any code here 😅.
You'll need new directory here https://github.com/stawel/cheali-charger/tree/master/src/hardware that includes some drivers and hw configurations. Look into those already there. Then some changes to cmake configs https://github.com/stawel/cheali-charger/blob/master/CMakeLists.txt etc.

About development tools...
I use VSCode/VSCodium with cortex-debug and cmake plugins (some other plugins for higher comfort).
As compiler: GCC (arm-none-eabi) works well.
STlink/J-Link as SWD probes, but there are other options...

I do this stuff as daily job, so I can also have a look, if you need help. Why everyone has to copy most ugly charger in the world? I'll probably also get one anyway, for science...

@silvio2402
Copy link

Thanks for your reply!

I've downloaded and unpacked the keil pack from the Cmsemicon site and copied the CMSIS, Device, and Driver folders to a new folder at src\hardware\cmsemicon-CMS32L051\cpu\CMSIS and I've copied and adjusted the cmsis.cmake from the nuvoton-M051 cpu present in this repo.

However, some CMSIS drivers/files are missing. From the files included in the nuvoton-M051 cmsis.cmake file, the following files are missing in the cmsemicon-CMS32L051 CMSIS pack: timer.c, uart.c, pwm.c, FMC.c, sys.c, and _syscalls.c. I suppose I have to write them myself?

Also, the CMSIS\Include\core_cm0plus.h file from the pack tries to include cmsis_version.h and cmsis_compiler.h, but they're missing from the pack. Can I copy them from the here: ARM-software/CMSIS_5/CMSIS/Core/Include?

Your job sound really cool btw!
I really appreciate your time.

@RadioControl
Copy link

Hi,

i purchased also a B6 clone with a CMS32L051 chip. Hopefully there will be a solution for these ones too!...
344799532_618110986905210_1821455676674286902_n
344784644_207949732025637_8957669123632886284_n

@RadioControl
Copy link

Hi Silvio,

were you able to move forward with this CMS32L051 project?...

@silvio2402
Copy link

Hi @RadioControl,
Unfortunately, I wasn’t.
@diggit are you still interested in helping? If not, that’s completely fine and I understand if it’s just not worth your time.

@diggit
Copy link
Collaborator

diggit commented May 8, 2023

Yeah I can help. I just was not able to persuate myself to buy another B6 clone, so I don't have hw.
Keep in mind, that I am not that deeply familiar with cheali internals. I know cmake, C++ and I do embedded FW development (even from scratch), but I will have to look up most of the cheali related stuff may be asking. Anyway, I'll do my best to help.

@RadioControl
Copy link

I think a lot of CMS32L051 owner would appreciate that they could use Cheali on their charger. If You were here in the near i would offer mine for the the project. The charger cost about 20 euros, but if someone claim a refund like i did due to misleading description (see pic), it cost just the half...
H30994b9e657c459bbf6be48852ebc8561

@diggit
Copy link
Collaborator

diggit commented May 14, 2023

@RadioControl where did you get yours?

@RadioControl
Copy link

RadioControl commented May 14, 2023

@diggit from here

@RadioControl
Copy link

Received my new clone with a nice Atmega32A inside...
20230531_105609
20230531_110012

@silvio2402
Copy link

Cool! Do you mind sharing the purchase link?
Btw I haven’t had the time to develop it further for the other chip.

@RadioControl
Copy link

Just click on "clone" ;) ...Diggit found out that the CMS ones have not the best hw #340. I charged some 3 cell lipos with mine CMS clone in balance mode. I think it's not that bad. Other modes i didn't try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants