-
Notifications
You must be signed in to change notification settings - Fork 124
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
CC Mode #1
Comments
I will probably not do the implementation myself as I did not use CC mode in the stock FW but I would welcome the addition in a PR. |
As CC has been requested and thanks to the findings in #4 might be quite easy I will try to implement it. |
CC is underway, those eager to try it out can have a look at the CC branch. Comments are welcome! A long press on the "set" key toggles between the CV and CC modes, indicated on the display. TFT inversion has been scrapped. Remote control of the CV/CC modes is still TODO. |
I'm just going to take this moment to say I really appreciate your work on this. It's been really great having these in our shop and the addition of constant current really rounds it out. |
Thanks for the kind words, appreciated! |
Remote control via UART in place:
|
For anyone testing: some runtime adjustments are needed to set the DHR12R2 register controlling CC. On one of my DPS:es, the displayed output current matches the multimeter while the other DPS has a positive ~100mA offset. The OpenDPS FW needs to set a low value and increase until the ADC tells us we are spot on. |
Great work on this project ! Was hopping someone succeed to open the way to hack those modules ! |
Thanks! If someone comes up with a good name we could have three modes, CV, CC and "the mode you describe" ;) It's a bit of an extension of CV that does not cut power on case of over current events, something I personally prefer when testing new PCBs. I am however open to renaming any..all modes if someone comes up with better naming. |
Hi :) Thanks for the software. I don't have a piece of this hardware yet but when I found it I immediately searched for a open software to replace it. I've been watching the repo for a while. Eventually I will use it. What @rletendu means is the default way a Lab power supply works. It's what "everyone" is actually expecting for a thing like this. Or I just come from a lab world... We can start a name discussion to give to the several modes, and I provide a initial suggestion:
In all modes you set a current and voltage. OVP and OCP can be used for different scenarios and actually this hardware might not be capable of doing them as they are generally expected in a lab PS. |
Thanks for the suggestions. "Fuse" sounds a lot better than CV IMHO. |
For me a key point is to really make the difference between the operating mode requested by the user and the operating status of the power supply. By default a standard lab dps is intended to be used in Force V mode and operate in CV mode when the Iload is bellow the max limit current. User may want to force voltage (ForceV mode or source V mode) :
User may want to force current (ForceI mode or source I mode) :
|
I went to check how the factory firmware works. It seems it works as any other standard lab power supply. So V and A limits always apply, and PS works in CV if A<set point or CA if A=set point. OVP and OCP provide the "Fuse" mode behaviour. So in this case there is not much to discuss about "modes". About the UI I also agree that the LCD should say if it is working on CV or CA, and OVP and OCP limits should be displayed in small font if they are enabled. Once again, as any other lab power supply does, and also as the factory firmware does. No reason to invent anything :) |
Agree think we should stay with a regular lab power supply dehavior for this feature. If one wants to implement other modes he could implements its own in another feature. |
The cc branch is currently not compilable. This is the output:
I've tried to investigate where the memory is lost but no success so far |
That's strange, 1.5kB is quite a lot. When building I end up with 5.8kB of data+bss. Could you provide some output from |
Btw thanks for a the effort you put into this project. Here is the verbose make output:
Continuing with the rom size changed to 128K results in
The resulting file is huge
compared to your precompiled file
I've attached the opendps folder with the *.o files etc. |
Very odd indeed. Looking at the output of
and mine:
so the text segment of your binary is 5.6kb larger... I tried building with gcc 5.4.1 from ARM's developer site but did not observe the difference you see. Could you try a more recent version? |
Oh... I think I can do even better than this. My arm-none-eabi-gcc-7.1.0 delivers:
With a fresh git clone on the main branch. The only change is 64K -> 128K in the ld file and removal of stm32-f7 target in libopencm3 as the assembler doesn't recognize this CPU. |
I noticed that the branch for this feature hasn't seen an update in a bit. Is it currently functional? I see there were a couple other issues open that seem daunting for this device... |
@Cabalist I haven't found the time to work on CC since end of April and have a few other things I need to finish before resuming it. |
@avion23 It seems strange you need to clean the libopencm3 build as there should be anything else than F100 stuff included in the OpenDPS build. Could you please provide the output from the failing assembler? |
Ah Sorry, I managed to compile it with the official ARM toolchain. No problem there. Crossdev and gcc-arm-none-eabi from debian stretch both fail. |
@avion23 glad you managed to sort it out. |
What is the current status of this? I see there have been no updates on this for a while, and might be willing to put some work in on it. |
@geekbozu I have been quite restricted on time and have not worked on this for a while. My next step would be to merge the CC branch to master as they have diverged a bit. |
Do you have a rough eta on when that would be? I would hate to work on new features and make the merge more complicated then it already seems to be. |
I am rather hoping to merge CC to master this month. We'll see... |
How about just changing the colour of the value that is being "constrained"? E.g. if current draw exceeds the set current - thus triggering CC mode - just change the current readout to yellow. I am mainly interested in this project because it simplifies the display and only shows information that really matters (i.e. actual voltage, actual current draw). It would be a terrible shame if it ends up being cluttered up with every additional "feature" people can think of. In my opinion it looks fabulous just the way it is. |
First : Great project, love it ! I want to use a 5015 with cc to charge my calcium batteries. When I compile master (on Raspberry Pi using arm-none-eabi) it will fit and work, but I get this message when compiling the cc tree: ****~/opendps# make -C opendps flash Any idea where I might 'find' 2288 bytes ? Thanks Henk |
Hi @snhstq , The problem is that the Debian package gcc-arm-none-eabi version 15:5.4.1+svn241155-1 that provides GCC cross compiler for ARM Cortex-A/R/M processors is to old and is not usable. (gcc version 5.4.1) Install the official toolchain from ARM and use that instead. (gcc version 7.2.1) Also se issue #22 for more info. |
any progress here? |
I am currently porting CC to master. Since the branches have diverged quite a bit it will not me a merge per-se. |
First chunk of CC code is now on master. I have only tested it on one unit and the CC is a bit off, calibration might be needed. Edit: SET + rotate changes between the CV and CC modes. Any mode can easily be added. |
Closing this one as CC is now on master. |
Any possibility of implementing Constant Current mode?
The text was updated successfully, but these errors were encountered: