LTC6802 based 12 cell slave.

Threads relating to the BMS system begun by Peter Perkins

Moderators: GregsGarage, retepsnikrep

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: LTC6802 based 12 cell slave.

Postby retepsnikrep » Tue Aug 07, 2012 9:33 am

Good jobs the pics are tough :wink: Adapter is a nice easy solition.

I think the issue with that JAL language is it's not well developed enough yet.
With a BMS program you might never know if it was your program or the compilier/langauge which was causing a bug/crash/issue. Very frustrating and difficult to debug.

With PPB it's quite well developed and most of the bugs have been ironed out.
Plus anyone who has been involved in the BMS development will be familiar with pbp syntax and can assist.
I won't be able to assist much with JAL. :?
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

mikethebike3
Posts: 27
Joined: Wed Sep 17, 2008 3:19 pm
Location: NE Norfolk, UK

Re: LTC6802 based 12 cell slave.

Postby mikethebike3 » Tue Aug 07, 2012 10:24 am

You may well be right Peter, but I remember using "that JAL language" back in (about) 2001 in a number of albeit non-critical projects very successfully as I recall, so it's actually been around for a while.

After all, it's free which might encourage others to get involved, and quite well supported so it's surely got to be worth a punt. Given that the 6802 does all the hard work, the PIC's only got to read and write registers, maybe do some bit bashing, and report upstream, but then I'm not a software pro so maybe I view it a bit simplistically.

I'd say give it a go Greg, if it goes *i*s up, you can always go back to your PBP.

Mike

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: LTC6802 based 12 cell slave.

Postby GregsGarage » Tue Aug 07, 2012 9:27 pm

Yep, them pics are tough. It got hot enough that you couldn't hold a finger on it, but once I got the adapter wired up (turns out I got ALL the pins wrong :roll: ) it worked fine. :D
bms1.jpg
Red and green leds are flashing alternately. Board is being powered from laptop usb, any 5 volt supply will do. ICSP adapter also shown.
bms1.jpg (56.89 KiB) Viewed 22590 times
I won't use this one for actual cell monitoring, but it will be fine for testing. This is the flash an led program I posted, worked first time. Next step is to simulate cell voltages and do some testing of the busses. I am going to keep the same commands, although most of the existing ones won't apply. I'll start new commands specific for this board at 20. The goal is to make this somewhat compatible with the existing master although I am probably going to give the maximite a go. Another option would be Peter's cut down 12F683 master, any progress on that Peter?

JAL vs pbp. Each has their advantages. We are familiar with pbp (Peter more than myself) and it is proven. JAL is open source so anybody can contribute without any upfront cost. I'll have to see if I run into any problems, weird bugs etc. but JAL seems to have had a lot of work put into it in the last couple of years. So far I am finding it quite easy to work with and this slave software will be more straight forward with the 6802 doing all the actual work.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
retepsnikrep
Posts: 1387
Joined: Sat May 26, 2007 4:50 pm
Location: North Yorkshire England
Contact:

Re: LTC6802 based 12 cell slave.

Postby retepsnikrep » Wed Aug 08, 2012 4:50 am

Here is the mini 12F683 Master.

It basically works but i blew my 16x2 serial lcd while fiddling with my pack and haven't done any more.

I think the charger control side was the remaining part that needed tweaking. :?
Attachments
A123 Cycle Master.zip
(8.57 KiB) Downloaded 1013 times
Regards Peter

Two MK1 Honda Insight's. One running 20ah A123 Lithium pack. One 8ah BetterBattery Nimh pack.
One HCH1 Civic Hybrid running 60ah A123 Lithium pack.

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: LTC6802-2 RevA.1

Postby GregsGarage » Sun Aug 12, 2012 1:39 pm

I'm going to redo the board. I've fixed the ICSP header and a couple of other items, but the major change is a complete redesign of the master and slave bus section. On the existing design the signal levels are 0-5 volts. A higher voltage difference should improve signalling in a noisy EV. One proven noise resistant interface is plain old RS232. Here the signal levels are -10v to +10v (approximately, actual levels can vary quite a lot). The MAX232 chip provides a simple TTL-RS232 interface and I know it works. The controller on my Matiz uses one of these to output serial data and I have never seen a glitch in the data stream. The problem is the master bus. RS232 won't work in parallel, when a slave tries to transmit data and pulls the bus positive the other slaves will still be pulling the bus negative. It all shorts out and no data received. But if we put a diode on the output then the slaves will only be able to pull the master bus positive, which gives us signal levels of 0-10v. To get the negative voltage on the bus we will use a MAX232 on the master pcb. Pin 6 on the MAX232 can provide -10v. So we connect pin 6 to the master bus with a 10k pull down resistor and we get are negative voltage required. Now the slaves can drive the bus positive and the pull down resistor on the master will drive it negative. It might just work. :shock: So here's the new schematic, I'm working on some new gerbers and will get those sent to China sometime soon, I hope.

Here's a good link on a TTL-RS232 level shifter which helped me come up with this idea.
Attachments
LTC6802-2-120812.pdf
New schematic with MAX232 added.
(109.46 KiB) Downloaded 1013 times
Last edited by GregsGarage on Sun Aug 12, 2012 2:54 pm, edited 1 time in total.
Reason: Updated error on Schematic
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: LTC6802 based 12 cell slave.

Postby GregsGarage » Sun Aug 12, 2012 11:46 pm

Gerbers done and sent to China. :D MAX232 has been added on the right. Also tidied up some other things. The prototyping are has been removed, but plenty of test points added and labeled.
LTC6802-2.jpg
LTC6802-2.jpg (62.57 KiB) Viewed 22561 times
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: LTC6802 based 12 cell slave.

Postby GregsGarage » Tue Aug 14, 2012 7:32 pm

Here's a quick schematic of the interface needed to convert the signals from the slaves back to TTL levels required for the master.
TTLinterface.jpg
TTLinterface.jpg (24.04 KiB) Viewed 22549 times

I'll breadboard it first and then get a small pcb layout done for a standalone interface board.
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

mikethebike3
Posts: 27
Joined: Wed Sep 17, 2008 3:19 pm
Location: NE Norfolk, UK

Re: LTC6802 based 12 cell slave.

Postby mikethebike3 » Tue Aug 14, 2012 9:01 pm

Greg
Just a thought - have you considered RS422 instead of 232?
It's differential and intrinsically noise-rejecting, especially if used with tight twisted-pair cable each way and correctly terminated, plus it's pretty easy to effect (Maxim have several derivatives). RS232 with its high voltage swing is way better than TTL, but was never intended for noisy environments. 422 is similar to 485 but full duplex like 232, and pretty much a replacement for 232, so software should be the same.
Datasheet MAX488 (fig. 2 in particular):
http://datasheets.maxim-ic.com/en/ds/MAX1487-MAX491.pdf
and not expensive, e.g. Ebay MAX488:
http://www.ebay.co.uk/itm/MAX488ECSA-Low-Power-RS-485-RS-422-Transceivers-SMD-MAX488-/180872028967?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item2a1cd02327

I used these when communicating with intelligent brushless servomotor controllers which sprayed EMF everywhere!

Apologies if you're aware of all this, just my 2p's worth...

Mike

GregsGarage
Posts: 870
Joined: Tue Apr 01, 2008 5:27 pm
Location: Galashiels, Scottish Borders
Contact:

Re: LTC6802 based 12 cell slave.

Postby GregsGarage » Tue Aug 14, 2012 10:11 pm

mikethebike3 wrote:Greg
Just a thought - have you considered RS422 instead of 232?...

Mike, the short answer is no. :lol: I am trying to build on what we already have. The slave bus that we send commands out on is daisy chained, think of it as Chinese whispers. RS232 works out of the box with this, only 2 nodes (master-slave and then slave-slave, etc.). The master bus sends commands back to the master, but the slaves are connected in parallel, RS232 doesn't work with multiple nodes, but I think I have found a way around this problem. As the system currently stands it works pretty good at TTL levels, just needs some improvement. I think boosting the signal levels using RS232 parts should get us to a level that is acceptable.

I think RS422 can handle multiple nodes, but you then need addressing. This adds more complexity. With the current layout, addressing is not required, just daisy chain the required number of slaves. If a slave has to be replaced, just swap it out, it shouldn't require any configuration. But keep the ideas coming, I'm always open to suggestions. :D
Greg Fordyce

Daewoo Matiz
http://www.evalbum.com/4191

User avatar
dillond666
Posts: 139
Joined: Mon May 26, 2008 7:52 pm
Location: Central Scotland

Re: LTC6802 based 12 cell slave.

Postby dillond666 » Wed Aug 15, 2012 11:23 am

The standalone interface board looks like a really handy thing to have around. Could speed up future project development.
I always meant to do a simple regulated supply board for MCU purposes, just to save breadboarding time.


Return to “BMS thread”

Who is online

Users browsing this forum: No registered users and 20 guests