Weber and Coulomb's MX-5

Post up a thread for your EV. Progress pics, description and assorted alliteration
User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Mon, 12 Apr 2010, 14:50

EV2Go wrote: As in a 4GL?

No. As in the reverse-polish dual-stack-based threaded-interpretive-language invented by Charles Moore. Coulomb should have used a capital "F".
http://en.wikipedia.org/wiki/Forth_%28p ... anguage%29
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Weber and Coulomb's MX-5

Post by Squiggles » Mon, 12 Apr 2010, 19:38

They did it so that they would be the only ones in the known universe to be able to understand it!

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Tue, 13 Apr 2010, 05:09

Tritium_James wrote: Needs more flux! You'll be kicking yourself for how hard you've made your life up until you try it :) I'd suggest some NC254 gel flux, get it here: http://www.okay.com.au/okay2009/product ... ts_id=3433

For 200 boards you two should really consider solder paste and a reflow setup. Details here: http://www.sparkfun.com/commerce/tutori ... ials_id=58 It's about 3x faster than doing it by hand with an iron.

I don't know what made you think we were doing it with a soldering iron (except the fuse and through-hole 5 W resistors). We're applying solder paste by hand (syringe and toothpick), placing the components by hand (tweezers and toothpick), then baking them in an electric frypan with a glass lid (as you showed us). Here's a photo.

Image

What is the gel flux for? Is that to use instead of solder paste, relying on the solder that is already on the PCB?
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Tue, 13 Apr 2010, 05:30

I guess you meant the gel flux for if we were soldering them with an iron.

Yes. We will definitely use a stencil when we go to production. Thanks James, for pointing us to that fun tutorial from Sparkfun.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Weber and Coulomb's MX-5

Post by Tritium_James » Tue, 13 Apr 2010, 12:26

I thought you were using an iron, because there's a bit too much solder on a lot of the joints. But that's explained by hand-applied paste too!

Make sure you don't use that frypan for food after this :) Lead poisoning gives you dementia so that you can't tell you have lead poisoning.

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Tue, 13 Apr 2010, 14:16

I'll tell little Weber (my 16 year old son) not to use so much paste next time. We get him to do the placement because his eyesight is soooo much better than ours. He can do it without a magnifier!

Coulomb found a mistake in the design yesterday. We forgot a pullup resistor on the Reset input, which is also the JTAG data input. I assumed there was an internal pullup in the MSP430s, like there is in the AVRs.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Tue, 13 Apr 2010, 14:26

While digital debugging was going great guns at the Coulomb Castle, over at the Weber Wigwam Newton and Weber were making more mechanical manipulations.

Towards the end of our previous EV day Newton (Jeff Owen) had the idea of making a temporary plywood adapter plate to let us position the motor correctly in the vehicle to measure up and design engine mounts and mounts for the power steering pump and aircon compressor. To get the motor and gearbox at the correct spacing without having to cut the motor shaft just yet, Jeff suggested we simply pull the rotor out of the motor.

So Jeff made up this adapter plate back at the Newton ... [consults Thesaurus -- oh damn there is no synonym for house that starts with "N"] ... Nest and brought it to the Weber Wigwam this afternoon. Here are some photos showing what happened.

Newton steadies the motor and gearbox joined by his excellent 25 mm adapter plate, as we lift it for the first time. This thing's so strong it could just about be used as the real thing.

Image

Weber gets electroplated while guiding the gearbox into the tunnel.

Image

We take her rags off for some photos showing motor and gearbox in place.

Image

Image

And now for the AC controller. ... Houston, we have a problem.

Image

[Edit: Repaired image URLs broken by forum restructure]
Last edited by weber on Wed, 19 Mar 2014, 04:43, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

Tritium_James
Senior Member
Posts: 683
Joined: Wed, 04 Mar 2009, 17:15
Real Name: James Kennedy
Contact:

Weber and Coulomb's MX-5

Post by Tritium_James » Tue, 13 Apr 2010, 16:08

Man, that thing's huge. I think you'll have to put a power bulge in the bonnet - make it look hot!

And 'nest', definitely nest.

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Wed, 14 Apr 2010, 01:50

This time we thought we'd try a bit of Reverse Pole-ish Nutation. Or is that controller in the missionary position, with Coulomb and Newton as the cannibals?

Image

Putting the drive in the cabin behind the occupant's shoulders solves a number of problems. No need to cut away heatsink (as we would have under the bonnet) and no need to waterproof it. But unfortunately it wipes out the space of two layers of cells (60 of our 228 cells) which we then have to find space for under the bonnet -- a tall order.

Image

Here we see it peeking out from under a turned up corner of the tonneau cover. Looks like it was made for it.

Image
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
woody
Senior Member
Posts: 1715
Joined: Sat, 21 Jun 2008, 02:03
Real Name: Anthony Wood
Location: Mt Colah

Weber and Coulomb's MX-5

Post by woody » Wed, 14 Apr 2010, 05:56

"newton's nuthouse" more like it with you clowns :-)

time for some CAD (cardboard aided design) - can the controller and/or batteries fit where the radiator is now or under the pop-up lights? In the bumper bar? Is it time to sacrifice the glovebox or passenger seat? Extend the wheelbase?

I think polished aluminium cooling fins protruding through the bonnet would be an interesting evolution of the mailbox / bugcatcher / supercharger of the street machine crowd...
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Weber and Coulomb's MX-5

Post by Johny » Wed, 14 Apr 2010, 15:59

Sell the controller, rewind the motor again, parallel half the cells, and buy TJs controller. You will probably end up making $$$.
Just a thought...

Nevilleh
Senior Member
Posts: 773
Joined: Thu, 15 Jan 2009, 18:09
Real Name: Neville Harlick
Location: Tauranga NZ

Weber and Coulomb's MX-5

Post by Nevilleh » Wed, 14 Apr 2010, 16:19

Johny wrote: Sell the controller, rewind the motor again, parallel half the cells, and buy TJs controller. You will probably end up making $$$.
Just a thought...


Hear, Hear!

This is one of the reasons that I opted for DC. But if TJ's controller is half as good as it looks in the specs, AC here we come! (Just got to get the price down a bit Image )

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Wed, 14 Apr 2010, 20:00

Johny wrote: Sell the controller, rewind the motor again, parallel half the cells, and buy TJs controller. You will probably end up making $$$.
Just a thought...

It has been considered!

The main problem is finding a buyer for a used 75/90 kW drive, when it's a bit big for an AC conversion, and we're not into the industrial market.

The motor would only be rewound a first time (not "again"); it was manufactured to 240 delta.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
Johny
Senior Member
Posts: 3729
Joined: Mon, 23 Jun 2008, 16:26
Real Name: John Wright
Location: Melbourne
Contact:

Weber and Coulomb's MX-5

Post by Johny » Wed, 14 Apr 2010, 20:11

I would not classify it as "used" it has never been commissioned in any permanent way. Didn't you buy it new?

What I would do at this stage.
1. Stick it on eBay (made available internationally) with a starting price of what it would cost you to rewind and get TJ's controller and TJ's "bits").
If you sell it, easy, if not - keep shoehorning.

2. Ignore me.


User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sun, 18 Apr 2010, 17:15

Johny wrote: 2. Ignore me.

Is that even possible, Johny? Image

That's of course an excellent idea, but first Weber (who bankrolls this project) has to decide we would want to go that way if we can. For example, it would be great to get to Adelaide this year, mainly as a great deadline / incentive to get this project rolling, but TJ may not have the controller-as-charger software working by then.

However, if we stay with the CT controller, we probably also won't have charging working, or at best only 3-phase charging. So either way we'd probably need something temporary for charging. One possibility is a bad-boy voltage tripler with contactor cutoff when the first cell gets to overvoltage. This would have no balancing, or possibly manual balancing through a series resistor, crudely limiting the current to 0.5 to 0.9 amps depending on the pack and mains voltages. Maybe we'd go all out and get a variac as well, but high power variacs are expensive and heavy.

This possibility of a high voltage version that has been mentioned means we could possibly wait for that version.

There is also the possibility of using the existing motor as-is on a ~360 V pack, at least temporarily. It would have the same or more maximum torque, but only up to ~3000 RPM, then roughly constant power. If it is really bad, we could either get it rewound later, or upgrade to a 900 V Tritium controller if/when available.

So there are many things to think about before putting the CT controller on Ebay.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sun, 18 Apr 2010, 17:48

The Coulomb Castle is the "second unit" working on the BMS. At present, I have two BMUs arranged in a (very small) "network":

Image

Note the wire between the top and bottom boards; when the boards are "right way up" (with the components down and the bypass resistors up), these links will be next to each other, so the wires can be a bit shorter. (Not too short, perhaps, or it's too hard to work on them).

[Edit: the 1/4 watt resistors are 75k pullups (here 68K) on the reset line. We assumed the processor would have these internally, but no. It was frustrating debugging this problem, since the processor would reset any time I wasn't debugging (the JTAG interface has a pullup on it). Pullups are squeezed onto the latest PCB layout.]

[Edit: the RS232 interface, and Jaycar USB to RS232 dongle, can be seen fuzzily at the right of the photo.]

The "end of row only" circuitry (top of the bottom board in the photo) has only just been completed, and hasn't been tested just yet. It will allow both the BMUs to be fully floating. Note that Farnell were out of stock of the SMD 3.3 V regulators, so we bought a TO-92 version instead. It looks rather huge on there.

There is a tiny dual inverter chip hidden by this regulator. I had 25 x 15 mil pads there, as suggested by a datasheet somewhere. But that just barely covers the lead footprint, and it was a pig to solder by hand, so I've extended the pads to 35 x 15 mils. Still tiny, but hopefully more manageable.

The software for in-place updating of the firmware works fine with two boards. I've implemented software to give each board a unique ID. In theory, this will only take about 350 ms for 228 cells.

[Edit: the software for updating IDs is a bit tricky, because each BMU echoes everything it receives immediately to all upstream neighbours.]
It probes the serial line for a start bit; if found within 1.5 byte transmit times, it reads and echoes that byte, which will be the ID for one of the upstream BMUs, [edit: and one less than the tentative ID for this cell]. Each BMU sees that byte after only 1/2 a byte time, since they are 1 byte time delayed compared to their immediate up-stream neighbour. If the time expires (it's just a busy wait loop), the current tentative ID is accepted as permanent, it is sent to the downstream neighbours, and written to info-flash. (Info-flash is separate from the main flash, and doesn't get overwritten when the main firmware is updated).

I've also gotten the beginnings of voltage measurement working. I get the hardware to do 6 successive reads, and busy wait for the results (about 30 μS). I find two outliers (minimum and maximum), and zero these. I add the remaining four samples, to get a 12-bit result that is the measurement in millivolts (0 to 4095 mV).

We have hardware on the BMUs (two resistors) to expand the scale to read 2.048 to 4.095 volts with 2 mV resolution. If that works, I'll shift the result (sum of 4 samples) right 1 bit and add 2^11, so again the result will be readable in millivolts.

I still need to implement a "comment to end of line" character, so the results can be sent upstream without all the upstream BMUs wasting power pushing and dropping values from the operand stack.

After that: temperature measurement, and some sort of "check status" command that checks for bad voltage or temperature, and turns on or off the bypass resistors based on a voltage threshold.

Edit: "extended to 35" was to 25 (no change)
Edit: byte times -> byte transmit times
Last edited by coulomb on Sun, 18 Apr 2010, 11:39, edited 1 time in total.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Weber and Coulomb's MX-5

Post by Squiggles » Sun, 18 Apr 2010, 18:03

"I find two outliers (minimum and maximum), and zero these."

Why do you do this? Would they not tend to cancel each other out if added and averaged?

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sun, 18 Apr 2010, 18:09

Squiggles wrote: Why do you do this? Would they not tend to cancel each other out if added and averaged?

Yes, if there are two of them about equally distant from the mean. I do it mainly because Acmotor suggested it in another thread, and the idea struck me as being a good one. [Thanks, Acmotor!] I'm assuming that there could be random glitches here and there that produce bad readings, and these would usually be extra-high or extra-low.

There is the potential for error, of course. Consider a quickly rising voltage, as when a cell is fully charged. If there are no glitches, I'll always be throwing away the highest, most important reading. However, there is only about 5μS between samples, so hopefully it's not significant.

Edit: that post was probably this one, from Home Grown BMS ideas:
viewtopic.php?t=900&p=21055#p21055
Last edited by coulomb on Sun, 18 Apr 2010, 08:17, edited 1 time in total.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sun, 18 Apr 2010, 19:41

Finally, the battery in my slightly-less-worse-for-closeups camera charged, and I can show tiny IC4:

Image

It's just to the right of the purple horseshoe, which represents a routing that doesn't get done for the prototype boards.

The gunk on the microcontroller is just a bit of excess silicone; it's not visible with the naked eye. The resistor hanging in space under the LED (right hand side, with a green band designating the cathode end) is because I kept a little too much of the analogue circuitry when starting the digital version; I've changed it so that a one at the I/O port means LED on (was 1=off).

The opto looks a bit messy because we forgot to change the pads for the opto we bought, which has 50 mil spacing (the opto-relay from the analogue circuit had 100 mil spacing).
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Weber and Coulomb's MX-5

Post by Squiggles » Sun, 18 Apr 2010, 21:18

So really what you want to do is eliminate all samples that are outside the range of say two standard deviations, rather then arbitrarily wasting the high and low values....

User avatar
weber
Site Admin
Posts: 2621
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Sun, 18 Apr 2010, 21:46

I think you're right squiggles. I think throwing away the max and min values is completely unjustified. There is the concept of "discarding outliers", but merely being the max or min does not make something an outlier.

And the complexity of code to determine if a sample is an outlier is unwarranted here. Here's how:
http://www.wikihow.com/Reject-Outliers-in-Data
Not to mention that the standard deviation of 6 samples would be fairly meaningless anyway.

In any case, the above article also contains a warning: "It is not considered good statistical practice to discard outliers without strong cause."

I say just take 4 samples and average them (i.e. sum them and take the fixed-point as having moved two binary places, as Coulomb has been doing).

[Edit: "as you have been doing" -> "as Coulomb has been doing"]
Last edited by weber on Sun, 18 Apr 2010, 14:38, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

Squiggles
Senior Member
Posts: 742
Joined: Wed, 22 Apr 2009, 03:19
Real Name: Neil
Location: Newcastle NSW

Weber and Coulomb's MX-5

Post by Squiggles » Sun, 18 Apr 2010, 21:52

or add eight samples and shift right thrice.

edit: I should read before I post!!
Last edited by Squiggles on Sun, 18 Apr 2010, 11:53, edited 1 time in total.

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Fri, 30 Apr 2010, 05:11

Squiggles wrote: "I find two outliers (minimum and maximum), and zero these."

Why do you do this?

Well, Weber stomped on that one; we don't do it any more (code is commented out).

We'll see how things go in a noisier environment.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
coulomb
Site Admin
Posts: 3762
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Fri, 30 Apr 2010, 05:31

We finally have some formatted voltage and temperature measurements working:

Image

That's a clip from Hyper Terminal.

The slosh at the start is to make it a comment to the upstream BMUs.
The next 3 digits are the cell IDs, in decimal.
The 3 or 4 digits after that are the measurement, in millivolts or degrees centigrade.
The V or degree symbol is to tell you what sort of measurement it is.

We might encode the result in binary or something later. For now, it's convenient to read.

It's also convenient to send commands, now that we have hex and decimal input. To see cell 75's voltage, I just send "75v*" (the star is a placemarker for a CRC character; CRC checking is disabled at present for convenience).
A more complex example: "0h1234 4m*" says non-hex mode (the 0 pushes the constant 0 to the stack, h consumes it and sets the input mode to decimal (1h or 99h sets it to hex). "1234 4" push 1234 then 4 to the stack. [Edit: the space separates the numbers, like an "enter" button on an RPN calculator.] "m" consumes these two numbers; one to print the value of, and the other specifies the number of digits. The whole command outputs "1234". You have to be careful with results like that, since it pushes 1234 to the stack of all of the upstream BMUs. "v" (voltage) and "t" (temperature) are safe, as they emit the slosh at the start of their output.

Also, with "v" and "t", only the "addressed" BMU responds. The others ignore the command (other than removing their argument). With other commands, all the BMUs talk at once, but amazingly it hasn't been a big problem to date. I guess it also helps that I only have the two BMUs at the moment.

The next big issue is calibration. They both should read the same voltage (they are in parallel), and about the same temperature (basically room temperature). The MSP manual does warn that the offset on the temperature measurement is large, and needs calibration. BMU 0 seems to read pretty consistently 4°C low, compared to an infrared non contact thermometer. I'm hoping that after getting one calibration for voltage, the scale can be used for temperature, so we can make one (offset) calibration for temperature, and be close enough. At present, I'm using the slope and offset from the datasheet, which are only typical values.

Edit: clarity; explain the space
Last edited by coulomb on Thu, 29 Apr 2010, 19:34, edited 1 time in total.
Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
1.4 kW solar with 1.2 kW Latronics inverter and FIT.
160 W solar, 2.5 kWh 24 V battery for lights.
Patching PIP-4048/5048 inverter-chargers.

User avatar
EV2Go
Senior Member
Posts: 2059
Joined: Wed, 16 Jul 2008, 00:21
Real Name: Paul
Location: Brisbane 1963

Weber and Coulomb's MX-5

Post by EV2Go » Fri, 30 Apr 2010, 06:38

Is that a back slosh or a forward slosh Image

Post Reply