I've been messing around with the BMS master hardware instead of welding stuff together. I'm trying to send a CAN message and, rather than write my own library from the datasheet, I tried to use Microchip application note AN878. It was easy to adjust so it would compile with SDCC but I seem to have found a bug in the compiler.
Because the PIC is a Harvard Architecture CPU, pointers to code and pointers to data are handled differently, which SDCC implements by adding some extra bits to the pointer. Unfortunately it's possible to loose those bits while casting the address of an SFR to a pointer and assigning that to a pointer array element by index.
With the the bits cleared, the write-to-pointer-target helper will do nothing, leaving the pointer on the stack. When it returns, the rest of the code freaks out because it expects the pointer to have been popped off the stack.
The solution (apart from fixing the compiler bug) is to leave out the cast. It seems that assigning an SFR to a pointer array element doesn't actually need a cast.
After many hours of fettling and weld practice, I've managed to weld the reinforcing bars into my front subframe. The motor will hang between these bars and they also provide strength at the front of the frame for cells or other equipment.
My 175A welder took a bit of tweeking to make good welds in 3mm steel. The biggest change that made the most difference was switching from 0.6mm to 0.8mm wire. I think this could also have been achieved by turning up the wire feed on the 0.6mm wire. MIG is a little counter-intuitive, if you weld isn't penetrating and the wire is building up in a large bead on top of the work, you'd think that you have to turn down the wire speed and weld slower so the heat has more time to penetrate. Actually you want to do the opposite, as the faster you push the wire into the work, the smaller the arc, the greater the current and the deeper the penetration. Of course wire speed isn't the only parameter which affects the current.
My friend Philip & I are presenting at LCA2010 in Wellington in January. We're talking about electric cars, the Tumanako project, Phil's dreams and open source. I'm there to talk about the EVD5 battery management system. My Mini and Phil's race car will be on display at the open day on the Saturday. My car will be road legal by then (promise!) and Philip has committed to getting his car moving under it's own electric power!
The world's quickest and fastest electric vehicle on the quarter mile is coming to New Zealand in January.
My friend Philip at Greenstage has organised the KillaCycle team to come out for a tour of the North Island including a few runs at Meremere. This bike is seriously fast, it does 0-100km/h in less than 1 second! It holds the world electric drag record, covering 1/4 mile from a standing start in 7.864 seconds and doing 169 MPH at the end. That's 272km/h.
The confirmed events are thus:
Thur 21st - Sun 24th Jan - Wellington, show and talk at Te Papa (Bill Dube, the KillaCycle owner, will be speaking 6:30pm Thursday and 1pm Sunday for 30-40 minutes).
Kevin at Lynx Innovation kindly organised to have my EVD5 Backplane design made. I've stuffed half the components and tested out a few channels and it looks like I didn't stuff anything up too badly. The biggest mistake I made was to specify the wrong hole size for the main header where the EVD5 board plugs in (the rows of white sockets). This is somewhat inconveniently fixed by drilling the holes bigger and then soldering the top and bottom. Drilling the holes bigger destroys the plating on the inside and disconnects the two layers, so you have to solder the top and the bottom separately.
There are a couple of places where I could move traces to increase separation (and reduce the chance of shorts) but otherwise, I'm very pleased. Now all I need to do is order the enclosures and find some elves to assemble everything.