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: 2597
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Sun, 06 Nov 2011, 21:48

All vias on those boards are GND. The side of the board we don't see in the above photo is just one big ground-plane, except where the 4 wires attach.

Of the two caps you have ovalled, only the smallest one is across the 12 V supply (after the presumed inductors). You'd think it would be 1uF, or at least 100n, wouldn't you? It's 50pF!

I've replaced it with a 1 uF 50 V ceramic in the same SMD footprint (2012 metric, 0805 imperial). That gets the 120 kHz ringing down from about 16 V pp to 2 V pp (as measured where the red and black wires join the PCB. A leaded 10 uF aluminium electrolytic gets it down to 600 mV pp (no visible ringing, just the 20 kHz PWM pulses) but it won't let the board fit back under its cover.

A 3216 (metric) tantalum will just barely fit in the space, with great care needed to avoid shorting it to nearby pads. But the best I can come up with in that footprint is 4.7 uF 25 V (or 6.8 uF if you're willing to go down to 20 V).

By going diagonally between diode and inductor we can probably fit a 3528 metric. That only gets us to 6.8 uF 25 V (only searching Element14 so far). But I guess that will be good enough.

[Edit: Oh wait! You can get a 10 uF 25 V ceramic in a 2012 metric footprint (same as original 50 pF). Or should I go for a 10 uF 50 V ceramic in a 3216 metric footprint?]
Last edited by weber on Sun, 06 Nov 2011, 11:10, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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

Weber and Coulomb's MX-5

Post by weber » Tue, 08 Nov 2011, 21:28

I left the 50 pF in place in case it is needed to filter out 800/900 MHz mobile phone frequencies or something. I added two 3216 mm 10 uF 50 V X5R ceramic caps electrically in parallel with it, but in a different location, stacked on top of each other, at an angle between a diode and an inductor, as you can see at the bottom of the photo below.

Image

This costs 67 cents, fits easily under the cover and gets the ripple down from 15 V pp to 700 mV pp, as measured where the red and black wires join the board. This is a factor of 20 improvement, which we will need since we will have 20 of these contactors in the MX-ϟ. The higher-frequency components will have been reduced more than 20-fold in amplitude.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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 » Tue, 08 Nov 2011, 21:47

I wonder why the ripple is so high with so many of these devices running what should be asynchronously. It makes me think that the PWMs are synchronising via the 12V supply to create such high ripple.

Either way it's a disappointing design flaw in not de-coupling enough from the supply. I guess they didn't want to visit pre-charge entanglements for the coil supply. On that point - take care - your 20 or so 20uF caps may cause issues with whatever is driving the EV200s "coil" (relay, FET?).

Thanks for publishing your fix weber.

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

Weber and Coulomb's MX-5

Post by weber » Tue, 08 Nov 2011, 22:31

Johny wrote: I wonder why the ripple is so high with so many of these devices running what should be asynchronously. It makes me think that the PWMs are synchronising via the 12V supply to create such high ripple.
Sorry I wasn't clear. That 15 V pp ripple is from one EV200! It's on the bench, connected by alligator clip leads to a 12 V battery made from four 40 Ah LiFePO4 cells. And I'm measuring (with DSO) at the worst place, right at the contactor's economiser board. As you get further from the contactor the ripple gets less.
I guess they didn't want to visit pre-charge entanglements for the coil supply.
It does seem such an obvious oversight that one must be on the lookout for some kind of "gotcha". Maybe that is the reason.
On that point - take care - your 20 or so 20uF caps may cause issues with whatever is driving the EV200s "coil" (relay, FET?).
In the worst case we drive 12 simultaneously (battery ELV segmentation) from an automotive relay. Or maybe we'll split that into two lots of 6 and use two relays.

That's one reason we went for an on-board modification rather than external caps. Each 20 uF is at least inboard of a pair of SMD inductors that will hopefully limit the inrush a little.

[Edit: Formatting]
Last edited by weber on Tue, 08 Nov 2011, 11:32, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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

Weber and Coulomb's MX-5

Post by weber » Sat, 12 Nov 2011, 01:35

Some cute images of MX-5s other than our own. Sorry about the poor quality -- shot opportunistically with my phone.

Seen at St Lucia, Brisbane. I love the boot-lid luggage rack, the tow bar and the special number plate. They say to me that this MX-5 is well loved and does some serious touring.

Image



Seen at MX5Plus at Aspley, Brisbane. Is it a Christmas tree or a toast rack?

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

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

Weber and Coulomb's MX-5

Post by coulomb » Sat, 12 Nov 2011, 04:04

We found considerable variation in the design of the EV200 economiser circuits. In particular, we found some with the infamous C8 (see Coil suppression diode damaging contactors?.

Well, as far as suppression of noise is concerned, these more modern economisers with C8 fitted are better; we measured just 940 mV of noise on the 12 V terminals, compared with some 15 V (p-p) from the earlier circuits. With just a single 10 uF capacitor, the noise is reduced to around the same 600 mV that we see on the older circuits with two 10 uF capacitors.

It's not hard to see why, when the circuit is considered:

Image

As you can see, C8 is where we put our capacitors, except on the other side of the Schottky diode. So on the (few) economisers we found with C8, we just added one 10 uF capacitor.

So it looks like Tyco finally recognised a problem, and did something about the noise. The contactors with C8 in them can be recognised from a number on the outside:

Image

The number at 1 is a date code, in this case the 44th week of 2009. I suspect that some time in 2009 the boards swap to the version with C8 installed. Certainly all our contactors with 2011 date codes have C8.

As a point of interest, we found out the hard way what that nipple at 2 is for. It covers a thin (~ 2.5 mm) copper tube which is pinched off. It seems that that's where they pump the vacuum in Image Weber found this by accidentally dropping one, and it happened to fall right on that nipple, damaging it. It's possible that the contactor will have survived this, but I don't know how to tell if the vacuum is still good. We've been using it for parts, for example, I managed to burn up one of the inductors (L2) on one board I was testing. Sigh.

We've modified all but 5 of our EV200s today; we ran out of capacitors (Weber bought only 30, thinking we'd use only one per contactor).

The economiser boards are all conformal coated; some of the later ones even had gold plating on the vias and pads. Apart from the inexcusable noise emission, I'm pretty impressed with the economiser boards.

Edit: oh, and we have found that all the contactors with economisers that have C8 have "Tyco Electronics" at the top of the label, at 3 on the image, like the one above, with that logo to the left of it. Older contactors have various other names and logos at the top of the label.
Last edited by coulomb on Fri, 11 Nov 2011, 17: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: 3685
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sat, 12 Nov 2011, 04:19

Here is how the economiser looks with the latest technique of stacking two capacitors on top of the existing 47 pF capacitor:

Image
Last edited by coulomb on Fri, 11 Nov 2011, 18:20, 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: 3685
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by coulomb » Sat, 12 Nov 2011, 05:51

Inside two of the contactor boxes:

Image

These are missing some cables (to get them out of the car), and aren't even complete yet (some battery boxes that connect to these contactor boxes aren't complete yet).

Some of the more difficult connections, not readily visible here, are for the contactor coils. These run in the yellow wire (actually two core mains flex, 2 x 1 mm^2 round cable). The orange cable is actually only 16 mm^2, but double insulated, so it's about 10 mm diameter (so two orange cables are difficult to squeeze into a 20 mm conduit adapter, and in some cases we have to squeeze in the yellow cable as well). When we run two orange cables in 20 mm orange conduit, we actually squash the conduit into a bit of an oval, then use silicone as a lubricant and pull the wire through (pushing just doesn't get it far enough, unless it's a very short conduit run).
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
weber
Site Admin
Posts: 2597
Joined: Fri, 23 Jan 2009, 17:27
Real Name: Dave Keenan
Location: Brisbane
Contact:

Weber and Coulomb's MX-5

Post by weber » Mon, 14 Nov 2011, 04:24

Way back near the start of this project we cut out the basin-like floor of the boot to allow for batteries to penetrate partly up into that space from below. It seemed like a good idea at the time.

Image

More photos here viewtopic.php?t=980&p=11593#p11593.

We had checked with one engineer that this would be OK.
viewtopic.php?t=980&p=11336#p11336
But the engineer we engaged has recently had other ideas, and in any case, we ended up mounting the batteries so low that the remaining interpenetration could have been taken care of with a few blows of a ball peen hammer. Image

So we need to weld something back in there to brace between the chassis rails, and we figure it might as well be an actual MX-5 boot floor. Trouble is, we cut up the old one and used it for welding practice, then sent it for recycling. Image

Well, this week I got an email from Richard Larsen telling me he had a boot floor for us, "and a bit more". It turned out to be the entire rear end of an MX-5, including body-work, chassis rails and cross member! It barely fit in the back of the Tarago.

Image

BTW, if you want to join in on a low-cost car-enthusiasts' guided-tour of Japan, including the Tokyo Motor Show, contact Richard. But you'd better be quick. See http://www.mx5plus.com.au/part_display. ... 232&cat=25

While I was at MX5 Plus I sought Richard's help with another problem.

Some time ago we swapped our 4.3 diff for a 3.636 diff, to trade some of that ridiculous 360 Nm of torque for a bit more speed, and ended up with a stronger diff as a pleasant side-effect. But there was an unpleasant side-effect whereby this would make our speedometer and odometer read low by some 15%. That's illegal and would make it unregisterable. You might think we could just get the speedo gear out of the gearbox of the MX-5 model that provided the diff, but it never had a speedo gear. It was all done electronically.

We thought we were very lucky to find this website with its table (at the end) showing which Mazda model had how many teeth on its speedo gear. It told us that ours had 20 teeth standard and so we would need a 20 * 3.636/4.3 = 17 tooth gear from an '84-85 12A RX-7. But none could be had for love nor money.

Richard instead reasoned that the rear wheel drive Mazda 626 had the same type of gearbox as our MX-5 and came standard with the same 3.636 diff ratio as the one we put in, therefore its speedo gear should be just what we need. And Richard just happened to have a RWD 626 box. This reasoning ignored the question of tyre diameter, but it turned out that the 626 tyre was only 2% smaller than the MX-5.

And it turns out that the speedo gears for Aussie Mazdas bear no resemblance to those on the above US web page. When Richard pulled them out and we counted them, the NA MX-5 had 23 teeth and the RWD 626 had 19. And 23 teeth * 3.636/4.3 = 19.45 teeth. Hoorah!

I can only guess that the discrepancy relates to the difference between mph speedos and km/h (note: not "kph") speedos.

Here's the 626 speedo gear. I've included a common everyday animal in the photo to give a sense of scale. Image

Image

Here's the original speedo gear.

Image

So I'm lying under the car thinking "As soon as I pull out the old speedo gear, oil is going to go everywhere, but I'll just whip it out and whip the new one in so fast it won't matter". Yeah, good one Weber.

The reality was like this: I whip out the old gear. I get the new gear in a short way and it stops. No matter how I jiggle it it just won't go in any further. Oil is now completely covering my arm to the elbow and heading for my sleeve. The surrounding air begins to turn blue from my cursing. Oil is going everywhere. Should I admit defeat and put the old one back in. But what if it won't go back either. Then I remember how these gears are offset in their housing, so I rotate it slowly until the mounting tab exactly aligns with the mounting hole and in it pops. Hoorah!

Now to clean up the mess. Image

[Edit: Added a few more sentences near the end.]
Last edited by weber on Sun, 13 Nov 2011, 17:37, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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 » Mon, 14 Nov 2011, 14:47

coulomb wrote:The number at 1 is a date code, in this case the 44th week of 2009. I suspect that some time in 2009 the boards swap to the version with C8 installed. Certainly all our contactors with 2011 date codes have C8.
Thanks for posting the results of your EV200 findings guys. It looks like all the EV200s I bought off eBay are 2007/2008 date codes. The PWM noise hasn't caused me any problems (yet) even though the rear contactor wiring is a reused wire from the standard loom to the back of the car (old fuel gauge wire) and runs parallel to the BMS monitoring bus cable. It's good to know what to look for if problems emerge and I'd rather be without the noise.

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

Weber and Coulomb's MX-5

Post by weber » Mon, 14 Nov 2011, 15:23

There are some good shots of the MX-ϟ showing the battery box behind the rollbar, and the one under the boot (empty), in evric's EV Festival video at 2:12 and 7:48. Thanks Eric.

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

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, 16 Nov 2011, 11:59

Hi guys, not sure if you have solved your bms interference problems yet, but I am happy to report that mine has been running in my car now for about 12 days and doesn't suffer from any interference problems at all.
I have two battery boxes in the engine compartment and one in the boot with twisted pairs running from the control unit inside the car to the first bb under the bonnet, then to the next one and then a long one all the way back to the boot running inside the car. The comms loop is completed by another fairly long pair from the boot box back to the control unit.
Edit: Change that to maybe some interference problems! I find that I can glitch the control unit now and again by accelerating at full throttle in the 70 - 90 kph speed zone. I can only put that down to motor noise interference. Also, I have deliberately not included a UART reset in the event of a glitch in the control unit. I did this on purpose so as to be able to detect interference. (The cell modules DO include such a reset).
I'll add it the controller and see if it will the recover without a power reset.
The problem has only shown up today as I haven't driven in other than a 50 kph zone until today, since installing the bms that is.
Last edited by Nevilleh on Wed, 16 Nov 2011, 05:35, edited 1 time in total.

GRMarks
Groupie
Posts: 134
Joined: Sat, 13 Feb 2010, 18:14
Real Name: Glenn Marks
Location: Dandenong,Vic

Weber and Coulomb's MX-5

Post by GRMarks » Sat, 26 Nov 2011, 15:56

I see your speedo gear teeth on the original slant like a forwards slash where as the replacement slant like a back slash, how could this fit ???

I like you video but it seems Brisbane is full of old fat people when I thought it was full of young sexy people (if you believe advertising that is - I'm from Vic.)Image
Last edited by GRMarks on Sat, 26 Nov 2011, 04:57, edited 1 time in total.
Regards

Glenn Marks

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

Weber and Coulomb's MX-5

Post by weber » Sat, 26 Nov 2011, 16:47

GRMarks wrote: I see your speedo gear teeth on the original slant like a forwards slash where as the replacement slant like a back slash, how could this fit ???

Yikes! You're so right! No one else noticed that. Thanks for alerting us. That could help explain why I had so much trouble getting it in, but it doesn't explain why it slipped in easily after I rotated it. I guess that may be because it's meshing with a fairly small diameter worm gear.

We haven't been able to try it yet. But even if it works, I can't see it lasting very long with that problem.

Graeme of Suzi Auto told us about these ratio adapters or matching boxes you can get that go between the existing speedo drive and the speedo cable, or between the cable and the speedo.

Image

There are some in the USA here
http://www.transmissioncenter.org/speed ... ousing.htm
and in Australia here
http://www.marks4wd.com/products/tyre_m ... ction.html
Last edited by weber on Sat, 26 Nov 2011, 10:36, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

T1 Terry
Senior Member
Posts: 928
Joined: Thu, 30 Sep 2010, 20:11
Real Name: Terry Covill
Location: Mannum SA

Weber and Coulomb's MX-5

Post by T1 Terry » Sat, 26 Nov 2011, 21:16

You could remove the extension housing on the gearboxes and swap over the worm drive gear on the output shaft. If you thought swapping the speedo gear mad a mess, you haven't experienced anything yet :lol: Might be a job for a workshop with a vehicle hoist.
The ratio adaptor would probably be easier, i've dealt with Mark's 4wd adaptors many moons ago and they were good to deal with.

T1 Terry
Green but want to learn

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

Weber and Coulomb's MX-5

Post by woody » Mon, 28 Nov 2011, 04:40

weber or coulomb wrote: Speedo
universal electric to mechanical speedo converter is something that has been used in a moke conversion here in Sydney and I am considering for the cortina since I won't have a gearbox and therefore no speedo drive. (Alternatives being SOBOG - Sawn Off Back of Gearbox or putting electronic speedo mechanism inside a Cortina speedo)

You could put a magnet on the tail shaft or something to get a pulse...
Planned EV: '63 Cortina using AC and LiFePO4 Battery Pack

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

Weber and Coulomb's MX-5

Post by weber » Wed, 30 Nov 2011, 04:16

I just came across this brilliant video on YouTube. It's a sort of ad for a fictitious product, an EV Miata (MX-5), made by three students in the Netherlands. To apprecaite it you need to view it in full screen mode and not move your cursor, so that the video controls go away and you can read the small (English) captions at the bottom of the screen.

They begin, "A civil war has been fought. A fight for the last drops of oil."

A sort of Dutch Mad Max, with the last of the V8 interceptors. Wait a minute. Coulomb has Dutch heritage. "Mad Michiel (mi-KHIL) and the first of the IM interceptors"?

YouTube: EV Miata - An Electric (R)evolution?
Last edited by weber on Tue, 29 Nov 2011, 18:07, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

User avatar
coulomb
Site Admin
Posts: 3685
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, 02 Dec 2011, 23:57

The JTAG Tiny hack.

Annoyingly, our replacement JTAG programmer (for the Driver Controls Unit, we have a $7 programmer for the BMUs, Neville) had not arrived for EV day. We did however have the replacement CP2102 USB-to-UART chip, which was obviously fried. I arrived late, and Weber had valiantly soldered in the 28 pin replacement chip.

Image

We didn't think that just replacing the chip would work, but for $3 and a bit of fiddling, we thought it would be worth a try. Well' it didn't work, the programming software said it could not connect.

Something prompted me to check the Device Manager; sure enough, there was an unfamiliar new device with the yellow warning triangle. I tried to reinstall the driver, but Windows said it could not find the driver. I recall we had a lot of trouble installing the driver last time.

Weber recalled that he thought it was odd that there were so few pins of the chip that seemed to connect anywhere, so let's check the datasheet. Right away he notices something I had missed: the chip contains an EEPROM for storing the VID (Vendor ID), PID (Product ID), and device identifier that you will want to customise for your driver. Of course! Every USB device should respond with these unique IDs, so Windows knows what software to use to drive it. "We're screwed" was approximately his comment. (You can see the EEPROM at the bottom of the above block diagram; I somehow missed this on first seeing the datasheet.)

[ Edit: the unused pins were normal. About 12 pins are simply unused, and half a dozen were to support unneeded RS232 functions, such as Data Terminal Ready. ]

I must say I was inclined to agree that we're screwed. However, I still saw a faint hope.

The chip that had the original data from that EEPROM is long fried, and is in any case desoldered. But I reasoned that the magic numbers (VID, PID, etc) had to be in the Windows registry somewhere; after all, that's where Windows looks for device driver information when a new USB device is plugged in. So on the kitchen table I fired up trusty old regedit (a registry editor that comes with Windows), and did a search on "Olimex" (the JTAG programmer manufacturer). Sure enough, we must have used the JTAG Tiny with this machine, as I soon found a string with "USB\Vid_15ba&Pid_0002&Rev_0100" and another with a LocationInformation set to "OLIMEX MSP430 JTAG TINY". But how to get this data into the EEPROM on the chip?

I read in the datasheet that manufacturers can download from Silicon Labs a "stand alone utility" that would program this EEPROM. This sounded hopeful, and I soon found the tools page on the silabs.com website. There were a dozen or so downloads: some starting with AN which I took to be application notes, drivers for Linux, Mac, and Windows. I downloaded the most promising looking ones, especially the two with version numbers, but while some looked promising (e.g. a wizard of some sort), none seemed to be the utility to program the EEPROM. Oh well, I guess if you are a real manufacturer, you'll know who to talk to and will get access through some sort of technical grape vine. I'd about given up at this point.

However, Weber spotted a clue in the datasheet that the programming tool was in application note AN144; it seems that the files in the tools section starting with AN weren't the actual application notes; these were in the document section. When we looked inside AN144sw.zip (duh, the sw might stand for SoftWare), we found an executable program. Soon, we had up a big dialog box that asked us for VID, PID, and device description.

We plugged the values from the registry into the programmer form, decided that the power capabilities and a few other things could stay at default values, and decided we had nothing to lose from pressing the "Update device" button.

We did this, and a second later Windows popped up a window complaining that it didn't know how to deal with the new hardware. Hmmm... that didn't sound good. Though it was hopeful in a way, since Windows seemed to be aware of new hardware, which means that surely the device actually did get programmed (over its own USB port... USB is kind of nifty that way). So just maybe, if we plugged the JTAG programmer into the netbook in the car that we were using for actual programming, it might just work.

Ok, down to the car, we plug everything in, and attempt to verify the DCU software with the latest binary image we had compiled.... success! It verified true! Immediately Weber had ideas of cancelling the order of the new JTAG programmer... clearly we didn't need to buy a new one after all! I cautioned that we hadn't attempted to actually program with the repaired programmer, or indeed use it for debugging yet.

So I reconfigured for debugging, pressed the "debug without downloading" button and... "cannot access the device" (or similar). Damn! To have come so far! There was an error message about not being able to access the VCP (Virtual Communications Port). I hunted for the VCP port setting, and suddenly realised that I had unplugged the USB cable for some reason... D'Oh! Image I plugged it back in, and it was working as normal. I was able to download and flash a newly compiled image as well.

Wow, what a hack. At about this point, Weber felt the urge to check the letterbox to see if maybe there was a card waiting there saying that there was a missed delivery and perhaps we could have picked up the unit by now anyway! Well, there was no card. Instead, the actual programmer had arrived, presumably some time while we were mucking about with the replacement chip or attempting to program it.

Heh. Image Now we have a spare JTAG programmer. It's marked "V2", so maybe it will have some amazing new features. I guess we'll find out some day if we actually plug it in and use it.

For what it's worth, I felt that our "communications glitches" are looking more and more like they might be straight errors in the DCU code (the parts we've modified for talking to the BMUs). The last thing we discovered before I had to rush off to a Christmas dinner was that we are transmitting a bunch of nulls after our voltage command. (This is after a few rearrangements of the code). Or at the very least, these bugs are another thing we have to fix before we can use the DCU code to provoke the real communications glitches, if they actually exist.

However, Weber pointed out to me that this can't be the case; we had everything working reliably on the bench. It's just that we rewrote the interrupt routines to use proper circular buffers and separate copies of these buffers in the mainline code, and are merely seeing the effects of all the new bugs that this major change brought with it.

[ Edit: moved the discovery of magic numbers from registry earlier to reflect the true order of events. ]
Last edited by coulomb on Mon, 27 Mar 2017, 14: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.

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

Weber and Coulomb's MX-5

Post by weber » Sat, 03 Dec 2011, 00:35

Last week on Nevilleh's Low cost BMS thread Coulomb reported that some smoke had got out of our $100 Olimex JTAG-TINY MSP430 programmer and put an end to that EV-day's debugging activities.

Here are some photos of the fried USB-to-UART chip from the programmer. As you can see, we did a good job on it.

Image

Image

Now I know what you're thinking. You're thinking, "Now I can fake Weber's fingerprint to gain access to Coulomb and Weber's secret underground lab", but it won't work because ... Oh never mind.

We think the smoke got out because we were charging the netbook from the car's cigarette lighter socket while programming the DCU (Modified Tritium Driver Controls Unit which also functions as our BMS master) which is also powered from the car, and there is some voltage offset between the netbook's battery charging negative input and its USB ground.

It may also have had to do with the fact that we were charging the car's 12 V accessory battery from a 240 Vac charger that Coulomb calls "the electroconvulsive device" because we get (non-lethal but very uncomfortable) shocks between either output terminal and ground. Some capacitive coupling of its PWM spikes apparently. Needless to say we will always ensure the netbook is isolated from the car before programming the DCU in future.

Last edited by weber on Sat, 03 Dec 2011, 07:23, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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 » Sat, 03 Dec 2011, 13:34

(for the Driver Controls Unit, we have a $7 programmer for the BMUs, Neville)

OK, OK, I have a programmer for AVR chips that I made from bits in the junk box! All that cost me was some time.

I admire your persistence in fixing your old one though, great work! Its a real PITA when you have to spend time making the gear work before you can get on with the actual job though.

Did I tell you my BMS is now working 100%?

[For what it's worth, our "communications glitches" are looking more and more like they might be straight errors in the DCU code (the parts we've modified for talking to the BMUs). The last thing we discovered before I had to rush off to a Christmas dinner was that we are transmitting a bunch of nulls after our voltage command. (This is after a few rearrangements of the code). Or at the very least, these bugs are another thing we have to fix before we can use the DCU code to provoke the real communications glitches, if they actually exist.]

That turned out to be my problem too ie s/w bugs. I won't bore you with what they were as not relevant to your design and it would only show up my poor programming skills. Which are getting better!

I still get the odd bad byte, but not very often and when one does arrive, it doesn't cause any harm. I'm going to set up a video camera so I can record a session and then have a look at it at my leisure to see how many bad bytes appear.



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

Weber and Coulomb's MX-5

Post by weber » Sun, 04 Dec 2011, 03:40

For those who rely on email notifications (which don't get sent for edits of posts), Coulomb has now finished writing the story of our repairs to our fried JTAG-device/programmer.
See viewtopic.php?t=980&p=35228#p35228
And I've added some photos of the fried chip, to the post that follows it.

For anyone who isn't following Nevilleh's "Low Cost BMS" thread, I note that I gave there a description of how our BMS communication works, split over two posts.

In the following photo, who is winning?

Image
No snails were harmed in the making of this photograph. --->

The race was entirely the snail's idea. We just happened to notice what was going on. We relocated the snail to a more snail-friendly environment as soon as it was clear who'd won. To be fair to the MX-ϟ, it was up on stands at the time. Image

One-upmanship extraordinaire:
Coulomb wrote:...one of the chips on our Driver Controls programmer let some smoke out. Another $100+ and another week delay while we get a replacement. Sigh.
Nevilleh wrote:Sorry to hear your programmer went up in smoke. I can merely sympathise and secretly chuckle that my PickIt 3 programmer for the PIC chips only cost $30.......
Coulomb wrote:[That was] for [Tritium's] Driver Controls Unit, we have a $7 programmer for [our] BMUs, Neville
Nevilleh wrote:OK, OK, I have a programmer for AVR chips that I made from bits in the junk box! All that cost me was some time.
Hi Neville, I'm sorry, but I have to tell you that I probably designed that AVR programmer you made from bits in your junk box! I published such a design on the web 13 years ago. See http://dkeenan.com/AVR/ Image
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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 » Sun, 04 Dec 2011, 12:52

weber wrote:
Hi Neville, I'm sorry, but I have to tell you that I probably designed that AVR programmer you made from bits in your junk box! I published such a design on the web 13 years ago. See http://dkeenan.com/AVR/ Image


No, I hadn't seen your design before. Mine was much simpler, it comprised a MAX232 and a few resistors and was driven by PonyProg2000. You could burn the "fuse" bits with it too. A bit of a side issue, but I still really like the AVR chips!
The only reason I changed to Microchip for the BMS was that I couldn't find an AVR with the combination of UART and ADCs that PIC offered. Oh, and I also wanted to see why the world raves about PIC things, never having used them before. Still can't understand that one though.
I considered your ARM chip except I had no support tools for it at all.

I hope you didn't spend $8000 relocating that snail - the amount reportedly spent (per snail!) by a mining company over here who discovered a colony of rare snails (about 100 of them) on a bit of land they wanted to lay waste to. The Greenies "made them do it"!

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

Weber and Coulomb's MX-5

Post by weber » Sun, 04 Dec 2011, 18:50

Nevilleh wrote:No, I hadn't seen your design before. Mine was much simpler, it comprised a MAX232 and a few resistors and was driven by PonyProg2000.
Ah well, it was worth a try to keep the series of one-ups going for one more step. But you win. Image
... I also wanted to see why the world raves about PIC things, never having used them before. Still can't understand that one though.
Glad to hear it. I think it's a hideous architecture and if that wasn't enough, the association with BASIC put me off as well. The only reasons I can see for its popularity are low cost, and aggressive promotion to young enthusiasts and trainee engineers who don't know any better, who then naturally want to stay with what's familiar.
I considered your ARM chip except I had no support tools for it at all.
We don't use ARM chips. Our schematics show, and the boards we sent you contained, Texas Instruments MSP430 chips. The ReadMe.txt file with our source code says, "To build them you will need to install the free IAR Embedded Workbench Kickstart.
See http://focus.ti.com/docs/toolsw/folders ... start.html". This does C (up to 4k out) as well as assembler (unlimited).
I hope you didn't spend $8000 relocating that snail ...
No, we used bits from our junk box to relocate it. Image

[Edit: Spelling]
Last edited by weber on Sun, 04 Dec 2011, 08:05, edited 1 time in total.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

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 » Sun, 04 Dec 2011, 19:04

weber wrote: The only reasons I can see for its popularity are low cost, and aggressive promotion to young enthusuasts and trainee engineers who don't know any better, who then naturally want to stay with what's familiar.

Totally agree. The architecture is truly awful! I wouldn't try to write assembler for it, but C insulates me fairly well. I guess they do the job and are comparatively cheap with a good range of peripheral features.

Sorry about your chip, don't know what I was thinking of, of course its the TI one. An ARMless mistake Image I looked at an ARM eval kit about the same time and my tiny brain got itself confused. Prob'ly the winetasting last week.

I do hope that snail is alive and well!

I'm sure you'll be pleased to know the bms is working really well, with no real problems now and the comms error rate seems to be very small. Over the last 100kms it logged a couple of framing errors is all. I expect yours to be even better with differential drive - when you get your software debugged. Image

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

Weber and Coulomb's MX-5

Post by weber » Sun, 04 Dec 2011, 20:31

Nevilleh wrote:An ARMless mistake. ... Prob'ly the winetasting last week.
Image
I do hope that snail is alive and well!
You mean Speedy? Yes. In fact he told us we were a refreshing change from most of the humans who photograph him racing cars. All they want to do, he says, is paint an "S" on his shell so they can use the caption, "Look at the S-car go". I don't get it.
I'm sure you'll be pleased to know the bms is working really well, with no real problems now and the comms error rate seems to be very small. Over the last 100kms it logged a couple of framing errors is all. I expect yours to be even better with differential drive - when you get your software debugged. Image

Yes. That is good news. If no more test equipment decides to break down we might get somewhere.

We repaired the lab power supply last EV day too, and I just tested all that additional filtering on the comms and it works fine on the bench, all the way down to 1.53 volts, as before. That is using a TCMT1106 optocoupler with no limiting resistors between the differential MSP430 outputs and its LED, 120 nF across the LED, 390 R pullup on the PT, 27 nF across the PT (actually at the micro input), 9600 b/s.

This was just auto-repeating "U"s at one BMU, from TeraTerm on the netbook, with that BMU passing it on to another via the new comms arrangement, and the second BMU passing what it read back to the netbook. So our buggy DCU software was not involved.
One of the fathers of MeXy the electric MX-5, along with Coulomb and Newton (Jeff Owen).

Post Reply