Discussion of Mark's firmware

Forum for announcements and discussion of beta firmware.
Tcepsa
Posts: 46
Joined: Tue Aug 06, 2013 5:26 pm

Discussion of Mark's firmware

Postby Tcepsa » Sat Aug 17, 2013 7:16 pm

Hi Mark,

Just downloaded and extracted this, but I'm having trouble getting it to compile. I'm using Arduino IDE 1.0.1, and here's the error that I'm getting:

Code: Select all

In file included from state.h:4:0,
                 from cvm.h:5,
                 from UltraSmartCharger.cpp:5:
EEPROMEx.h:159:22: error: conflicting declaration ‘EEPROMClassEx EEPROM’
In file included from EEPROMEx.h:23:0,
                 from state.h:4,
                 from cvm.h:5,
                 from UltraSmartCharger.cpp:5:
/usr/share/arduino/libraries/EEPROM/EEPROM.h:32:20: error: ‘EEPROM’ has a previous declaration as ‘EEPROMClass EEPROM’


I was also getting errors about it not being able to find EEPROM.h until I changed it to the full path, but that doesn't seem like it should matter... any ideas on how I should go about fixing this?

Mark
Site Admin
Posts: 410
Joined: Sun Jul 28, 2013 6:47 am
Location: Brisbane, Australia

Re: Progress on Charger Firmware with Virtual Machine

Postby Mark » Sat Aug 17, 2013 7:25 pm

Try upgrading to Arduino 1.0.5 and see if that helps. I had a somewhat similar problem when I upgraded to the 1.5.2 Beta a couple of days ago that I managed to fix by adding an extra Include, so it's quite possible that the problem is being caused by using a different version of the IDE.

Tcepsa
Posts: 46
Joined: Tue Aug 06, 2013 5:26 pm

Re: Progress on Charger Firmware with Virtual Machine

Postby Tcepsa » Tue Aug 20, 2013 3:50 am

Thanks for the tip to try 1.0.5; that seems to be working better. As I am running on Linux (which is sensitive to file name capitalization) I ran into some inconsistencies between the #include directives and the actual names of the files. I got that sorted out and have attached the modified code. If you'd incorporate it into your working codebase I'd really appreciate it (it's not hard for me to fix, but it'd be nice not to have to do it every upgrade ^_^ )

I'm running a charge now (on those same Energizers from the other post) and am looking forward to seeing how they look.
Attachments
ChargerSource502_capsfix.zip
(76.94 KiB) Downloaded 455 times

Mark
Site Admin
Posts: 410
Joined: Sun Jul 28, 2013 6:47 am
Location: Brisbane, Australia

Re: Progress on Charger Firmware with Virtual Machine

Postby Mark » Tue Aug 20, 2013 4:13 am

Sorry about that - I've just gone through and updated the capitalization to that it should all be consistent now.

When you update to the next version, it would be a good idea to clear out the directory before unzipping the new version since I've changed the capitalization on some of the files. If you have any further problems, just let me know and I can fix them up for you as well!

Tcepsa
Posts: 46
Joined: Tue Aug 06, 2013 5:26 pm

Re: Progress on Charger Firmware with Virtual Machine

Postby Tcepsa » Tue Aug 20, 2013 4:21 am

Great, thanks! (And thank you for the reminder to clear out the old stuff. I'll probably rename the whole directory and keep it around, at least for a few more versions, just in case ^_^ )

Paul.Allen
Site Admin
Posts: 98
Joined: Tue Aug 06, 2013 5:33 am
Location: Utah, United States

Re: Progress on Mark's Firmware (Latest Version Attached)

Postby Paul.Allen » Wed Aug 21, 2013 8:04 am

"Let me know if you think of anything that I should add to the list above."

Add Paul's awesome intro light show! ; )

Mark
Site Admin
Posts: 410
Joined: Sun Jul 28, 2013 6:47 am
Location: Brisbane, Australia

Re: Progress on Mark's Firmware (Latest Version Attached)

Postby Mark » Wed Aug 21, 2013 8:42 am

Paul.Allen wrote:Add Paul's awesome intro light show! ; )


I'll see what I can do `8-)`

Paul.Allen
Site Admin
Posts: 98
Joined: Tue Aug 06, 2013 5:33 am
Location: Utah, United States

Re: Progress on Mark's Firmware (Latest Version Attached)

Postby Paul.Allen » Sat Aug 31, 2013 12:17 am

Is this latest version supposed to work with the newest board design that monitors current in and out? If so how does it tell the difference between which board it is loaded on?

Mark
Site Admin
Posts: 410
Joined: Sun Jul 28, 2013 6:47 am
Location: Brisbane, Australia

Re: Progress on Mark's Firmware (Latest Version Attached)

Postby Mark » Sat Aug 31, 2013 12:21 am

Yes, it should work on board revisions 4, 5 & 6 - so that includes the latest board with the current sensors.

To adjust the code to work correctly, you need to edit the charger.h file and change the line:

#define Charger_Rev5

Just adjust the last digit at the end to reflect which board you're compiling for.

Paul.Allen
Site Admin
Posts: 98
Joined: Tue Aug 06, 2013 5:33 am
Location: Utah, United States

Re: Progress on Mark's Firmware (Latest Version Attached)

Postby Paul.Allen » Mon Sep 02, 2013 7:56 am

First off Mark, I want to say your Firmware is really Awesome! I love how it really does handle the batteries independently. To test it I decided to put in 2 cells that I knew were not the same amount discharged. The file is big so I will email it to you and let you post it if you want. The following are some questions, thoughts and suggestions. Some of them I already know the answer but might as well have it documented.

Question:
*Is your code timer driven?
*Do you take any readings during charging, or only when all is quiet?
*How many bit resolution are you running the PWM in this version (508)?
*Is purple for bad battery?
*What resolution are you running the ADC at?

Thoughts:
*Could there be any adverse side effects of having one cell discharge while the other is charging or vice versa? My thought would be reading values under the noise of charging, which if you don’t read them while current is flowing, then this wouldn't be an issues. Temperature, anything else? Over all I don’t think it is bad, I think it is great, but just trying to think about it.

Suggestions:
*Is it possible to add text to the values printed out like I did in mine? Or is there a reason you would like to leave the text out, like for greater ease of reading it into a future plot program or maybe even when we have the LCD?
*For Rev 6-7 and on, let’s make the switch positions as I have printed on there, Charge, Discharge and Analyze. When set to charge, I was thinking we could have it hit the batteries with a jolt of current every few minutes or so if they are left in the charger, to counter act the 2mA drain on them (which I still haven’t figured out the exact source but am narrowing it down). Of course the LED’s wouldn't indicate this is happening, it would just take place in the background.
*Add the button start for Rev 6-7, not super critical yet but would be nice.
*Also, IMO, I think the Red LED when flashing during charging should be on for a shorter amount of time, like maybe 10ms or so. The time between flashes is fine.

Really great Mark!!


Return to “Beta Testers”

Who is online

Users browsing this forum: No registered users and 2 guests