Discussion of Mark's firmware

Forum for announcements and discussion of beta firmware.
Mark
Site Admin
Posts: 415
Joined: Sun Jul 28, 2013 6:47 am
Location: Brisbane, Australia

Re: Discussion of Mark's firmware

Postby Mark » Sun Dec 15, 2013 10:04 pm

Tcepsa wrote:I think I might have figured it out. I took the reading off of pins 1 and 3 on the FTDI connector as you suggested and it was the expected 3.3 V, so my 3.3 V supply regulator is still good. However, in order to get the temperature (and other value) readings, I have been leaving my FTDI cable connected to that header so that I can get the serial values in the terminal. Then I remembered that some FTDI cables are 5V rather than 3.3V, so I also measured pins 1 and 3 of my FTDI cable and sure enough it's a 5V cable. So whenever I have the FTDI cable plugged in, it is getting 5V. I'm counting myself lucky that I have not burned out any of the components!

Should the board maybe be redesigned so that the power pins from the FTDI cable are also on the 5V side of the 3.3V regulator, just in case?


I don't think Paul is planning to make any more of the non LCD chargers, and the LCD chargers won't be using an FTDI board. Also, connecting the FTDI board to the 5V side of the regulator might cause 3.3V boards to be fried anyway.

If it's just a matter of getting incorrect temperature readings if you have a 5V cable connected, then it's maybe not worth it. But if there's other damage that I (and other unsuspecting users) might be doing, then it's probably worth at least considering, or putting a warning or something (and if there was an "only use 3.3V FTDI cables" warning somewhere and I just missed it then that's on me--ideally such warnings wouldn't be necessary, but it sounds like it is late enough in the design process, at least for the 2-cell model, that making that change would probably be overly onerous).


I don't think it would actually damage the board as such - the 328P MCU can be run off of 5V and I'm pretty sure that the 18 bit ADC is also OK with 5V. I can't think of anything else that would be damaged by 5V.

In the meantime, I'll try adding two 1N2004 diodes between pin 3 of my FTDI cable and pin 3 of the FTDI connector on the board and seeing whether my temperature readings get a little more realistic.


I wouldn't do that - you don't want to run the controller off of a lower voltage than you're feeding into any of the input pins (e.g. transmit, DTR on the FTDI board) otherwise you may end up frying those pins. You're better off using dupont male to female cables to only connect ground and receive on the FTDI cable - i.e. pins 1 and 5 on the charger. That way, you're not sending 5V into the controller when it's running at 3.3V. In the longer term, I think that you should just buy a 3.3V FTDI cable since that would be a lot safer. They're less than $8 off Ebay as long as you don't mind waiting for them to come from Hong Kong!

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

Re: Discussion of Mark's firmware

Postby Paul.Allen » Mon Dec 16, 2013 8:09 am

I should make it more clear on my website to use 3.3V only. Also if you are going to monitor it live, you should really have the charger running off a powered USB hub that the FDTI cable is also connected to. This will avoid GND loop issues. On my website In the battery charger section under updating the firmware I show a picture of a through hole female header, if you get one of those you can bend/cut the pin for power and that should allow you to monitor real time and not throw off the temperature readings. In the end you are right, I probably should have buffered it or something but I figured it would mostly only be used for programing, in which case the 5V should realalistically be fine.

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

Re: Discussion of Mark's firmware

Postby Paul.Allen » Fri Dec 20, 2013 6:01 pm

Mark, I was playing more with Version 0.522 and had the the thought, we should change the message "Waiting for Cell to be Removed" so that when cells are already detected it says "Waiting for button to be pressed" and when no cells are detected it says "Waiting for cells to be inserted"

I think there are only 4 chargers in existence that don't have a button, so it is not worth supporting them anymore with new code.

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

Re: Discussion of Mark's firmware

Postby Mark » Fri Dec 20, 2013 11:40 pm

Paul.Allen wrote:Mark, I was playing more with Version 0.522 and had the the thought, we should change the message "Waiting for Cell to be Removed" so that when cells are already detected it says "Waiting for button to be pressed" and when no cells are detected it says "Waiting for cells to be inserted"


That sounds like a reasonable idea - it will require a bit of a change to the code though.

I think there are only 4 chargers in existence that don't have a button, so it is not worth supporting them anymore with new code.


Fair enough - I think it makes sense to remove support for them while I'm adding in support for the LCD version.

How soon do you think you'll have the first prototype LCD version ready for testing? The first stage that I'm planning is to get the existing code working the same on the new board - i.e. one of the buttons would act the same as the button on the non LCD version. There shouldn't be too much work required, but it will still take some time to do, so it'll be useful to know how soon you need the code.

The next stage is to add some basic LCD support so that it's showing stats as it's charging, etc. After that, I'll get to work on adding in the menu.

BTW, what revision number are you planning to start with for the LCD version? Since it's such a major redesign, I think you should start on a new series. That way, if you ever do decide to go back and make some more of the non LCD boards with a modified design, the revision numbers will still make sense.

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

Re: Discussion of Mark's firmware

Postby Paul.Allen » Sat Dec 21, 2013 4:56 am

I get the boards back Monday and if all goes well, late Monday night I hope to power one on. That being said I wouldn't be surprised if all did not go well, but I still hope.

As far as Rev number.... 1 seems logical? : )

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

Re: Discussion of Mark's firmware

Postby Mark » Sat Dec 21, 2013 5:24 am

Paul.Allen wrote:I get the boards back Monday and if all goes well, late Monday night I hope to power one on. That being said I wouldn't be surprised if all did not go well, but I still hope.

As far as Rev number.... 1 seems logical? : )


Sounds good!

I'm not sure if I'll have it ready by then, but I'll try!

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

Re: Discussion of Mark's firmware

Postby Paul.Allen » Sat Dec 21, 2013 6:42 am

Don't worry about pushing it on the test software, I can write enough to do basic test (which is all I really need to decide if this is going to work). If the test go well, I will move forward with buying all the microcontrollers and the rest of the parts in bulk.

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

Re: Discussion of Mark's firmware

Postby Mark » Sat Dec 21, 2013 1:44 pm

Paul.Allen wrote:Don't worry about pushing it on the test software, I can write enough to do basic test (which is all I really need to decide if this is going to work). If the test go well, I will move forward with buying all the microcontrollers and the rest of the parts in bulk.


I've just sent you an email with the files required to modify the Arduino IDE. Let me know if you don't get it!

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

Re: Discussion of Mark's firmware

Postby Paul.Allen » Sun Dec 22, 2013 5:51 am

"Added option to do top off charge on last charge - default is now off."

How do you access this? Is it one of the button presses or in the code?

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

Re: Discussion of Mark's firmware

Postby Mark » Sun Dec 22, 2013 8:41 am

At the moment, that can only be done by changing one of the values stored in the EEPROM.

With the LCD charger, it will be a menu option to enable or disable it.


Return to “Beta Testers”

Who is online

Users browsing this forum: No registered users and 1 guest