Hi everybody,
A few days ago, I received an ImaxB6 clone (ordered it from e-bay). I am planning to install cheali-charger firmware on it but the motherboard is different from the photos I can find related to IMAX B6 original and clone. The problem is also that the label on the micro-controller is deleted (sanded) so I do not know what the micro-controller is in the charger. According to number of pins it is not ATMega32.
Attached is a few pictures so maybe someone can help.
Does anyone recognize this micro-controller ?
Can it be programmed ?
USBASP programer ?
where is pin for ASP on this board ?
Is it possible to load "Che-charger" firmware?
If not is it possible to modify sw to support this B6 clone?
2014/1/23 sasam <sasa.mi...@gmail.com>
Hi everybody,
A few days ago, I received an ImaxB6 clone (ordered it from e-bay). I am planning to install cheali-charger firmware on it but the motherboard is different from the photos I can find related to IMAX B6 original and clone. The problem is also that the label on the micro-controller is deleted (sanded) so I do not know what the micro-controller is in the charger. According to number of pins it is not ATMega32.
Attached is a few pictures so maybe someone can help.
This is the first time I see such a charger,I have no idea what kind of processor this is,but You could check which pins are connected to:1. Vcc2. GND3. the crystal oscillatorDoes anyone recognize this micro-controller ?
Can it be programmed ?
USBASP programer ?
where is pin for ASP on this board ?
Is it possible to load "Che-charger" firmware?definitely not! the pin layout is different.
If not is it possible to modify sw to support this B6 clone?It might be possible, depends on the CPU.
If it is AVR at all, the only possibilities with 48 pins would be Atmega406, AT32UC3B164, AT32UC3B1128, AT32UC3B1256, AT32UC3B1512, AT32UC3L016, AT32UC3L032, or AT32UC3L064.
Otherwise it might be STM8 or something - maybe more likely.
The 6 pins at the bottom might be ISP or JTAG. You could try asking the CPU what its ID is, to find out what chip it is.
--
You received this message because you are subscribed to the Google Groups "cheali-charger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cheali-charge...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I really have no luck with Imax B6 clones :(
I received a second Imax B6, but it is not with ATmega32. On this charger controller label is not deleted so I finally know controller name. Same controller is on the first charger but PCB layout is different.
Micro-controllers in both charger are M0517LBN an Chinese version of ARM Cortex M0.
http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=ca35dc89-c740-421a-b13b-5a8d050315e3
2014-02-26 0:51 GMT+01:00 sasam <sasa.mi...@gmail.com>:
I really have no luck with Imax B6 clones :(
:(I received a second Imax B6, but it is not with ATmega32. On this charger controller label is not deleted so I finally know controller name. Same controller is on the first charger but PCB layout is different.
Micro-controllers in both charger are M0517LBN an Chinese version of ARM Cortex M0.
http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=ca35dc89-c740-421a-b13b-5a8d050315e3
I looked at M0516LBN datasheet (I couldn't find M0517LBN),and It doesn't look so bad:1. 64kB program memory (M0517LBN may have even more)2. 4kB RAM3. Serial wire debug interface - 2 wires ICE_DAT,ICE_CLK (pin 31, 30)4. 12bit ADC - (atmega32 has only 10bit)5. 32bit ARM Cortex M0.
If You know how to program in C, and if have some experience in embedded systems,You could try to add support for this charger,unfortunately, it will take some timeBest Regards,Paweł
According Chinese forum: http://www.nuvoton-m0.com/english/forum.php?mod=viewthread&tid=32&extra=page%3D1 M0517LBN is the special version of M0516LBN but with inaccurate internal oscillator. I hope it is only difference :)
I know how to program in C, and unfortunately I haven't experience with embedded systems. But Why not to tray with this B6 :)
Do You know where I can find compiler/development env. for this micro controller, and
what I need to flash new SW to them?
I used: eclipse, openocd, arm-none-eabi-gccbut I wouldn't say that's a recommendation ;)what I need to flash new SW to them?
Your guess is as good as mine :(
You should first test if you are able to monitor the charger with the current firmware in logView,you will probably need for that a UART->USB dongle - for example: http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-/400565980256?pt=LH_DefaultDomain_0&hash=item5d4397cc60
At the first step You will be on your own.1. You should write a simple program which will allow you to communicate with your PC,through the UART, a "hello world" program.2. after that you will have to rewrite these files:core\memory.hcore\Timer.hcore\Timer.cppcore\Serial.cppcore\Serial.hcore\LiquidCrystal.cppcore\LiquidCrystal.hhardware\imaxB6-generic\*(ALL files in hardware\imaxB6-generic)please look at them to see how much work it is.3. I will have to remove Atmega32 dependencies from all other files.The thing is that I will not change anything (3.) until you succeed with 1.
and your enthusiasm doesn't change :)what do you think?Best Regards,Paweł
You should first test if you are able to monitor the charger with the current firmware in logView,you will probably need for that a UART->USB dongle - for example: http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-/400565980256?pt=LH_DefaultDomain_0&hash=item5d4397cc60
On the previous B6 temp sensor work OK but on the last one it doesn't work. In the current FW there is no options to select serial or USB output. Also when I tray to charge NiMh or Pb batery program imidietly report broken connection. I don't know is it HW or SW problem. I will try to investigate what is the problem.
You should first test if you are able to monitor the charger with the current firmware in logView,you will probably need for that a UART->USB dongle - for example: http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-/400565980256?pt=LH_DefaultDomain_0&hash=item5d4397cc60
On the previous B6 temp sensor work OK but on the last one it doesn't work. In the current FW there is no options to select serial or USB output. Also when I tray to charge NiMh or Pb batery program imidietly report broken connection. I don't know is it HW or SW problem. I will try to investigate what is the problem.
Temp. sensor work now, probably i broke some metalized pad when I unsolderd connector. Now i solder external connector with wires.
Vout is connected to MPU pin [45]:(RXD1, AIN2, P1.2). So probably with current FW it is not possible to feed LogView over temp sensor :(
Do you suppose the reason why NiMhi, NiCd and Pb program immediately after start terminate with message "connection break"?
Best Regards,
Saša
2014-02-28 4:00 GMT+01:00 sasam <sasa.mi...@gmail.com>:
You should first test if you are able to monitor the charger with the current firmware in logView,you will probably need for that a UART->USB dongle - for example: http://www.ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module-/400565980256?pt=LH_DefaultDomain_0&hash=item5d4397cc60
On the previous B6 temp sensor work OK but on the last one it doesn't work. In the current FW there is no options to select serial or USB output. Also when I tray to charge NiMh or Pb batery program imidietly report broken connection. I don't know is it HW or SW problem. I will try to investigate what is the problem.
Temp. sensor work now, probably i broke some metalized pad when I unsolderd connector. Now i solder external connector with wires.
Vout is connected to MPU pin [45]:(RXD1, AIN2, P1.2). So probably with current FW it is not possible to feed LogView over temp sensor :(
In the atmega32 version a TXD pin is also connected to the temp. sensor connector,so you're probably right.but maybe it's not such a big problem, You have (probably) a fully functional JTAG output,so you will be able to debug your code through it.
I looked ad JTAGs dongles provided by Nuvoton:there is a "Nu-Link" or "Nu-Link-Pro" programmer,unfortunately it's not very cheap: 35$
Do you suppose the reason why NiMhi, NiCd and Pb program immediately after start terminate with message "connection break"?I can only speak for cheali-charger, it happens when the battery cables are wrong (not) connected.
Hello all,there is chipper version of Nu-Link :)
Paulius
Hi,
great work you're doing here, Pawel!
Unfortunately, I do seem to have the M0517LBNversion, too.
Now I tried to get some serial output from the 3-pin temperatue connector. No luck.
I'm using the serial connector of an Arduino mega, which works fine with other devices...
I'm not saying that it can't be my bad, but maybe they left that out in the firmware?
Btw, what voltages does the temp-sensor produce on the middle pin? I want to see if at least temperature sensing is working...
I soldered connectors to the JTAG connector, but my layout is slightly different. I have 6 pins right next to each other (see attachements). I identified Ground and Vcc as pin 5 and 6, but for the rest I need to desolder the display connections which I yet am reluctant to do.
Next problem is the how to use the JTAG. The info I found about JTAG has different pin names (TMS, TDI, TDO, TCK), so I don't know how to connect them.
With said pin names I have found an Arduino sketch to communicate via JTAG which would be a great and easy option versus a proprietary interface imho...
I hope somebody can make more sense of it than me...
Bastian
--
You received this message because you are subscribed to the Google Groups "cheali-charger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cheali-charge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2014-05-03 22:08 GMT+02:00 dfg gh <bbe...@gmail.com>:maybe, the charger should have a UART enable/disable option to be able to use the 3 pin connector for both
It does, but I couldn't get a read at all. Maybe I should try to switch between USB enable and disable while listening...
In the standard layout, I read there is a RX pin connected somewhere to the balancer pins. Where exactly?
Maybe I can talk it into talking to me^^
Good to know, I'll try feeding that in via a voltage divider, see if the temperature sensing works at least...According to:You should at least have: VCC, GND, ICE_CLK, ICE_DATplease see also:
I saw that in the previous posts, but I couldn't find any reference to ICE_CLK, ICE_DAT pins online, so I wouldn't know which equals which pin. Is ICE_DAT bidirectional?
I'll read up in the reference paper you posted :)Haha, not what I wanted to hear, but a good answer anyway :)But I must admit that I probably know less than you.
The RX input is not used on the atmega32,they had not enough pins, so they used the RX pin for balancing.
I saw that in the previous posts, but I couldn't find any reference to ICE_CLK, ICE_DAT pins online, so I wouldn't know which equals which pin. Is ICE_DAT bidirectional?Probably :)I'll read up in the reference paper you posted :)Haha, not what I wanted to hear, but a good answer anyway :)But I must admit that I probably know less than you.That's the truth :)But It's never too late to learn something ;)
Can You tell me which adruino->JTAG you meant?There is also the problem that currently cheali-charger dosn't support ARM CPUs,and to write the missing parts the JTAG should support debugging.Maybe I just buy the charger with the appropriate JTAG.Can you tell me where you bought yours?
....
I put some question on Chinese forum but didn't get answer jet.http://www.nuvoton-m0.com/english/forum.php?mod=viewthread&tid=3615&extra=page%3D1
To support ARM controller probably we must start from low level
http://www.nuvoton-m0.com/code/en/Init_M051/wiz/index.htmIn the attach is local version of this web config tool for M051x controllers.
Best regards,
Saša
Hi,Just letting you know that I have 2 M0517 boards here as well from ebay/China and waiting on my Nulink.I have some pic experience but 0 "C" or whatever derivative the current software is written in ???
There is no rs232/usb option in this firmware that I can find,The hardware on the board looks like a "100%" copy of the original at first glance.My first attempt will be a read of the original firmware, than probably blow it away add the rs232 option as I want to monitor the charging of NI-MH by computer "the reason I got this charger in the first place".I will then attempt the "hello world" challenge.Until the Nulink arrives not a lot I can do, post from china to NZ takes a long time.Paul V.
On my charger it is the same situation, temp sensor is connected to P1.2. (there are few photos for this in one old post).
Could you please send few photos of this charger (MB & HW layout)
--
Hi,
Hello all, it turns out that my B6AC+ clone from TomTop on ebay is one of the Nuvoton ARM based clones. I took it apart immediately once I got it in the mail today and have been testing it out with some nimh 5 cell packs that I've got.
I don't have any lipos to test but so far my clone is charging nimh and nicd batteries very well. It also has overvoltage protection for the DC input. I tried to plug my 19.5V volt laptop PSU into it to see what would happen (was a little afraid it would kill it) but it just made an unhappy beep at me and said "input voltage fault." For a clone it isn't so bad.My main complaint is that it doesn't have the auto amp charging that it claims... only manual settings.
Sasam, I hope that your issue with charging nimh batteries isn't a hardware problem!
Also, could you please post a picture with the programming pins labeled? I know that the one with a square is ground (right?) but that's about it.
Few days ago I start playing with CoIDE debugger connected to Bu-link only (without main power). It seems that everything work, even the LCD is usable. Is it safe to connect the main power during a debug session?
For exercise i tray to investigate detail for Texternal calibrate.
Is it posible to increase resolution AD reading for temp sensor?
So, if I'm understanding this, cheali-charger is working on ARM now?
Can you tell if it works better than the stock firmware?
.....My main complaint is that it doesn't have the auto amp charging that it claims... only manual settings.
Can you tell if it works better than the stock firmware?
Hi Pawel,In IO.h you have the same code for enableFuncADC & disableFuncADC
is it OK ?
//based on coocox DrvGPIO
inline void enableFuncADC(uint8_t adc) {
outpw(&SYS->P1_MFP, (inpw(&SYS->P1_MFP) & ~(0x1<<((adc) +8))) | (0x1<<(adc)));
}
inline void disableFuncADC(uint8_t adc) {
outpw(&SYS->P1_MFP, inpw(&SYS->P1_MFP) & ~( (0x1<<(adc+8)) | (0x1<<adc)) );
}
Last night i grab you last version and focus on temp sensor measurement.
On room temp (cca 25°C) I have:
0.270V => value fluctuation 3063-3067
when sensor took and warm (dT= cca 8°C) in fingers:
0.351V => value fluctuation 3081-3085when sensor put close to my desktop neon light
0.900V => value fluctuation 3131-3135
Last night i grab you last version and focus on temp sensor measurement.
On room temp (cca 25°C) I have:
0.270V => value fluctuation 3063-3067
when sensor took and warm (dT= cca 8°C) in fingers:
0.351V => value fluctuation 3081-3085when sensor put close to my desktop neon light
0.900V => value fluctuation 3131-3135hm.. the vales should be in the range 0-65536 it looks like the sensor in not connectedto the multiplexer, I assumed it's exactly like in this schematics (but I have not tested this):try to replace:{MADDR_T_EXTERN, MUX0_Z_D_PIN, AnalogInputs::Textern, false, false},with:{-1, UART_TX_PIN, AnalogInputs::Textern, false, false},maybe this will help,Best Regards,Paweł
last few days I study your "automagical" adc routines. Thereafter start using debugger, I discovered magic in ADC_IRQHandler. Now it is clearer to me how it works.
What are the last two parameters (false, false) in "order_analogInputs_on" config table ?
In my charger Temp sensor is connected directly to pin 45 (&P12). Unfortunately this pin can not be assign as HW uart TX.
Do you have any plan for uart?
Is it safe to set pin 45 as output pin and use it as SW UART_TX_PIN?
In my charger Temp sensor is connected directly to pin 45 (&P12). Unfortunately this pin can not be assign as HW uart TX.
Do you have any plan for uart?
Is it safe to set pin 45 as output pin and use it as SW UART_TX_PIN?Yes, I do have a plan: to wait until some implements the software UART :)(if the plan fails I will do it myself but it won't be this year)And Yes, it should be safe.
OK I will try to do it.
Good exercise for my first programming attempt on microcontroller :)
Is it safe to connect one LED to Tx and GND?
Which timer should I use for that TMR2 or TMR3 ?
0 & 1 are in use?
Do you have any suggestion how to config UART_TX_PIN?
Is it necessary to disable ADC on this pin before config it for output?
Hi I was going to use the uart1 as it is free and leave the external temp sensor so you can have both want to use logview and make sure i don't cook the battery.I now have bu link and got the first firmware upload working now need to teach my self CI understand that that is outside the main stream of this project
but would fit my need i also trying to workout the schematic around the temp pin its not like the other designs ?
getting to grips with github, C, ARM etc. I'm a pic person and started on a Motorola 6800 some 35years ago so i'm a bit slow.
hm.. I'm not sure what the Q22 does (it's probably a PNP transistor)and it is always safer to connect the LED with an resistor (maybe 1K Ohm) in series,there is also a 10K/10K (?) voltage divider, I'm not sure if it will handle a LED,but we will know when you try ;)you may also try to connect it like this (1,2,3 - pins on the plug):1. Anode2. Resistor3. GND (not connected)cathode connected to the resistor
Do you have any suggestion how to config UART_TX_PIN?if you are using the IO.h header the it should look like this:IO::pinMode(UART_TX_PIN, OUTPUT);write "1" to the pin:IO::digitalWrite(UART_TX_PIN, 1);write "0" to the pin:IO::digitalWrite(UART_TX_PIN, 0);
I got 1.648V for logical "1" (Tx vs GND), Bu-link power
Is it enough for logical "1" on 3.3V TTL serial?
pin 1. vs 3. = 4.28 V
Do you have any suggestion how to config UART_TX_PIN?if you are using the IO.h header the it should look like this:IO::pinMode(UART_TX_PIN, OUTPUT);
I got 1.648V for logical "1" (Tx vs GND), Bu-link power
Is it enough for logical "1" on 3.3V TTL serial?
pin 1. vs 3. = 4.28 V
Do you have any suggestion how to config UART_TX_PIN?if you are using the IO.h header the it should look like this:IO::pinMode(UART_TX_PIN, OUTPUT);Try to change this line to:IO::pinMode(UART_TX_PIN, GPIO_PMD_OUTPUT);you should get 2.5V at "1" state.This voltage should be enough for a cp2102 USB<->UART dongle
Ok need new glasses uart1 tx pin is in use so cant be used for logview.But I managed to get uart0 tx to work with a demo prog cant see if this pin 5 is used for anything else cant see a track but might be under the MCU ??when trying to merge it with project it broke it and even removing dint help so back to reloading original project.At least I have seen "hello world !"
Unfortunately I left my radio at the track yesterday so that's my top priority. :(
On my win7-x64 it's automatically detected as USB HID device (USB\VID_0416&PID_511B&REV_0100).Nuvoton NuMicro ICP Programming Tool 1.25 reports "Nu-Link connected (ID: 77888a01)".
I've intalled new version of ICP and upgraded Bu-link FW.No luck, situation is the same. Connected B6 just beeps and show "INPUT VOL ERROR" message.
воскресенье, 27 июля 2014 г., 6:27:10 UTC+7 пользователь sasam написал:On my win7-x64 it's automatically detected as USB HID device (USB\VID_0416&PID_511B&REV_0100).
I've intalled new version of ICP and upgraded Bu-link FW.No luck, situation is the same. Connected B6 just beeps and show "INPUT VOL ERROR" message.
You have ARM version B6?
Wiring (Bu-link <=> B6) is OK?
What happen when try to connect with ICP programing tool (select "M051 series" and press connect) ?