Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
Well poo poo, I should have expected you'd already considered that all :v: well done.

Adbot
ADBOT LOVES YOU

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.

kastein posted:

Well poo poo, I should have expected you'd already considered that all :v: well done.

It's good to know that you thought along the same lines, and that I wasn't going nuts. I asked on Stack Exchange about the resistor network and the general response that it was a workable solution, if a little long winded. Some other comedy solutions involved a stepper motor and a potentiometer.

Essentially the resistor ladder is replicating an off-the-shelf "digital potentiometer". I never saw those with wiper resistances below about 45R though, I'm not sure why. Perhaps because of concerns over heat dissipation in the smaller packed ICs. Another comedy option was to put 4x digital potentiometer units in parallel and address them all the same. Or maybe get something like the AD5254 and just parallel it with itself.

I was just going to run it through a MCP23017 (which has now become my "go-to" IO expander, those things are awesome).

I never put much thought into the speedometer (or tachometer, which is similar but needs a square wave) control side, I always figured I'd just work out the correct frequencies and then buy a chip to do it for me ;).

Pomp and Circumcized fucked around with this message at 00:00 on Jul 5, 2020

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
Oh drat that's a cool chip. I usually stick with Phillips NXP for io expanders but I'll add it to my library.

The reason is likely power dissipation like you thought. I plan on using like 1 amp mosfets and half watt resistors along with a 750mA polyfuse in series with the whole thing so that it's idiot proof, because I know the idiot who will be installing it. The only reason I'm doing it is because I like overcomplicating things, digidashes for FSJs START at 584 dollars, and I have this weird thing about wanting it to look 100% factory unless you open the hood but also don't want to hack in extra sensors, so I'm pulling the engine data from the class 2 serial data bus on the ECU just like the GM dash would, and using it to drive the factory gauges.

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
That makes sense, i sounds exactly like my original plan for driving the factory cluster. It should be relatively easy to make a small PCB to piggyback on the factory gauge cluster and handle the translation from new to old.

I had a brief look into Class 2 when I was rebuilding my Corvette, it doesn't look very inspiring. I know they went to SWCAN for the Volt (not sure how closely related these two are, I think not at all), which makes sense as it would keep everything consistent at the software level.

I have a SWCAN transceiver in my PCM for controlling the Volt heater, but that's still untested as I haven't mounted the heater itself yet!

For the MOSFETs, in my project I started using multi channel units, for example, the display backlights are driven through a IRF9956, which is a 2 channel SO-8 package. I've seen up to 12 channel FETs, I found this is great to keep costs and complexity down. I'd much rather solder a single SO-16 package than 4x SOT-23's!

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
That's for drat sure, I'll check those out. Ask me about the time I missed a line in a datasheet and put SOT23-5 footprints on a board and then the parts showed up and they were SC70-5 instead, though. That was fun, since I needed it working tomorrow.

GM Class 2 is lame and almost all the transceiver chips for it are either on the tail end of NRND or completely discontinued, which is making me cross. I don't want to have to decode that mess manually or use makerspace grade junk, I want it to be perfect and look like an OEM built it.

How is the Volt heater? I was talking to Elviscat a couple months ago while looking at his Leaf and it seems like they went from the barely adequate resistive heater to a bidirectional heatpump setup, so I am really hoping to use one of those (or whatever is like it and best bang/buck/complexity wise when I get to do one of these projects) for my next build.

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug

kastein posted:

That's for drat sure, I'll check those out. Ask me about the time I missed a line in a datasheet and put SOT23-5 footprints on a board and then the parts showed up and they were SC70-5 instead, though. That was fun, since I needed it working tomorrow.

I get wrong footprints all the time. My last set of boards ended up with a SOT23 FET fly-wired because I put a DGS footprint down when I needed GSD.

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
For GM class 2 transceivers, can you just buy any module from any old GM car and recover the transceiver?

The Eberspacher heater in the Volt is a nice unit, it has 4 elements, one is PWM controlled 0-750W, the others are fixed 750W, 1500W, and 3000W. This allows for any heat output within 0-6000W. I have not integrated it into my car yet, but from what I've heard, it's a great heater. I've got all the control code available if anyone needs. For some reason, the water temp thermistor is wired separately, and not integrated into the CAN feedback.

The unit is compact and well sized, looks to be easily placed against a firewall or frame rail. I wish the input and output hose connections were on the same side, however. Once you connect hoses to it, it becomes quite long.

I thought the Leaf used the same heater, but with a PWM interface? Or maybe I'm thinking of a different car.

Heat pump would be a more power-efficient solution, but I don't think the DIY EV community is quite there with these units yet.

I've not had many footprint issues in this build, but for the Tesla Gen3 Charger interface, I managed to mount the pin header for the modules to the wrong side of the board in CAD. Not easily noticed, as it's a 1x8 header which can mount from either side, but mounting it backwards means that the pins end up in the incorrect order. So yeah, that lovely 90 degree board-to-board header is now 8 loops of jumper wire.

Granite Octopus
Jun 24, 2008

Pomp and Circumcized posted:

Heat pump would be a more power-efficient solution, but I don't think the DIY EV community is quite there with these units yet.

Interesting... how come EVs dont have a reverse-cycle air con style system where the same system is used for both heating and cooling... Adds too much cost/complexity? Or just not commodity enough yet?

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
Out in the real world, some do, but it seems to be a recent thing.

Most older EVs which have been scrapped for parts use resistive or PTC heaters. It takes a while for second hand parts to become available cheap enough for people like me to "have a go" at reverse engineering it.

And from what I've seen with air conditioning, the cost and complexity of things such as pipework, replacing/rewelding proprietary hose connections, etc, pushes it outside the reach of the DIY community. Perhaps some of the large conversion shops can get into this.

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
The pipe work is really not as bad as people think - all the aluminum tubing is standard diameters. You could pretty easily put a system together using compression fittings or regular 45 degree flares if you don't feel like TIG welding the fittings, and could use soft copper instead of aluminum for anything you have to buy. The hardest part would be routing the lines and figuring out how much refrigerant and oil to use, honestly. I used to be terrified of it but having learned how to refill AC systems and doing a fixed HVAC system install from the install manual has taken a lot of the mystery out of it.

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
The problem I face is the connection to the components themselves, for example I'm using a Lexus RX450h AC compressor in the RX7, even second-hand AC lines for these cars are enormously expensive, especially since I will only be cutting the ends off to weld onto my own fittings.

Even flexible AC hose itself, seems to be something crazy like £20 per foot. And I've yet to find a supplier for crimp-on AC rated fittings. Maybe I won't need this as all of the components are hard-mounted. But even then, I may need to consider vibration dampening when routing the pipework.

I don't know the thread size/pitch or seat angle on the RX7 evaporator connections, likely these are some ridiculous size which can't be purchased. Prices for factory RX7 AC lines are ludicrous.

I had to cut the fittings from the condenser to have it fit between the frame rails, I will need to weld on new fittings for this.

Fill ports, receiver/drier, would need to be sourced, preferably in a usable format with straight tubes to connect onto.

Basically the whole thing is a disaster, and despite tens of hours of searching, I'm not in a position to make a connection to any of the components in the system.

Charge and oil quantities aren't really an issue, I can look up similar systems and also the oil quantities per component replaced during service. I have no issues with installing the parts, I just need to get hold of compatible fittings, without the fittings alone costing more than the motor/transmission in the car!

Pomp and Circumcized fucked around with this message at 18:59 on Jul 6, 2020

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
Well that's rather annoying. I had no idea the fitting issue existed, I'm used to models where I walk into the breakers and there are five or ten in a row so I take the parts I need with the lines still on them and they don't bother charging me for the lines at all.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
I found that 4seasons carries quite a few metric crimp on ac fittings.

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.

Sgt Fox posted:

I found that 4seasons carries quite a few metric crimp on ac fittings.

Are they US based? I found plenty of US suppliers, but the shipping costs and import taxes are prohibitive. No idea how US companies can justify $100 to ship a 2 lb package overseas, I struggled with this throughout my Corvette build.#

Generally UK junkyards do not let you walk in , for "safety". Most of them now sell the parts online, generally if its worth less than about £30 then they just bin it.

The sketchy ones that do let you in, generally don't contain luxury cars, sadly.

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
Sounds like you need to find someone over here willing to go junkyarding for you and send you gifts for every major holiday. :v:

bawfuls
Oct 28, 2009

Wow, guess I need to read AI index more because I only just now discovered this thread after you posted in mine.

You are an absolute madman for attempting to build a custom BMS, that is a non-trivial task for sure, kudos. Really impressive amount of custom electronics work in this build all around.

Is that lexus motor really 250 kW? Wikipedia seems to think it's only 150 which is why I was initially confused when you suggested it. But that much power for a grand is quite a deal.

I missed your battery solution, how are you getting an affordable, not-enormous pack up to 650V?

edit: I'm confused about the fuel gauge issue. You have real time pack voltage and current data from your custom controller right? All you need to do is log those to continuously compute Wh's consumed since last charge (and do the reverse during charging), then you can display that any number of ways with your custom cluster.

bawfuls fucked around with this message at 23:03 on Jul 7, 2020

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
It's got a combined rating of 250kW. I doubt you'll achieve that at 300-360V pack voltages. Performance appears to be excellent at 300+ V, however.

https://media.toyota.co.uk/wp-content/files_mf/1319280368tech_spec.pdf this mentions the motor (MG2) as 197bhp (146kW), don't forget that we also repurpose the generator (MG1) to act as a second motor.

The BMS was simple to design (electrically), but the code is rather complex. The "BMS" unit I am using handles many functions (I may have listed these before)

  • Monitor 2x sets of Outlander "Cell Monitoring Units" (CMU)
  • Control the Gen3 Tesla charger
  • Handle the charge port (LEDs, lock/unlock, EVSE proximity and pilot)
  • Close contactors, handle precharge. I didn't have enough pins on the external connector to add contactor position feedback (weld detection), but I have it programmed. Right now I handle weld detection by monitoring current during the contactor opening sequence.
  • Act as a "master" to the PCM and dashboard. Transmit current state (idle, precharge, drive, charge, error, etc)
  • Command the buck boost converter (my own controller) and the Volt APU (DC-DC converter).
  • Monitor battery disconnect plugs / service plugs, perform safe shutdowns, etc

I'm using Mitsubishi Outlander PHEV batteries, these are Yuasa LEV-40 cells, I'm using 160x in series.

The fuel gauge issue was an issue with retaining the factory RX7 fuel gauge, it expected a resistive sensor within the fuel tank. With the OEM cluster removed, I am indeed using the method you mentioned (coulomb counting) to display the state of charge on a LCD panel.

It gets a bit more technical than just pack voltage and current. Yes, you can assume 100% SoC at a set voltage (for me, it's 4063mV), and then scale the charge readout based on past current draw (at the most basic level measure the current once per second, after 3600 reads you know how many Ah you have used). However, this does not take pack degradation into account. To maintain an accurate readout, I need to monitor the pack voltage with respect to state of charge, and reference this to expected values to see if the pack is draining faster than expected. I also need to count power going into the pack during charging, to ensure that the pack has accepted the same amount of energy as was used since the last charge.

I've already done the programming for much of this, however without real road testing, I can't begin to calibrate for real use. At some point, I will have to drive the car to depletion, to verify that my readouts are correct. I don't want to short myself by 10 miles, and of course I don't want to run out of power 5 miles from home.

The car actually has 6 current sensors in total: 650V pack, 320V converter, and the standard 2x for each motor.

Pomp and Circumcized fucked around with this message at 00:53 on Jul 8, 2020

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

What are you using for current sensors?

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.

taqueso posted:

What are you using for current sensors?

I'm using the CAB300 from LEM: https://www.lem.com/en/cab-500csp5 (mine is the 300A version)

These came with the battery packs. They are great for my application, they do all the necessary processing onboard and output their mA reading via CAN.

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
That's a really cool current sensor, I'll have to add it to my list. I usually use Allegro current sensors since my wife used to work there so I could get 5 minute answers on what the best thing in the lineup was for my project, but I don't think they go over 150 or maybe 200 amps.

BTW, I think I forgot to mention but yes that's what I meant about structs and unions a page ago - every time I've created a custom canbus setup I've made a header file that all my code #includes that contains a struct/union definition for every message I use, which allows me to rebuild all my MCU firmware images off one unified set of message definitions without worrying that I forgot to update something.

I'm curious why you put your io expanders on i2c instead of SPI - avoiding overloading the spi bus since you already have a ton of bandwidth requirements from the displays? Looks like I'm likely going to end up with mcp23s18 instead of the mcp23017 you recommended because I'll be driving opto LEDs (thus open drain preferred) and hate i2c* and have plenty of space left on my spi bus.

* Long story from 2006. I2c bus can get hosed, it's a personal hate-hate relationship following months of hell from a lovely i2c bus that ruined my summer :v:

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
You're correct on the I2C vs SPI decision. The displays themselves max out the SPI bus, much of the program time is spent waiting on display updates. I get around this by streamlining the updates and staggering the displays The smaller TFTs only update once every 1000ms, and only redraw values which have changed. Inputs are checked much more frequently so I put them on I2C.

I've not had any I2C issues to date, but I am always cautious when I approach it. I have 5x I2C devices on this display controller. I was cautious with the trace routing and fortunately there haven't been any issues. I'm pretty sure I went for 10k pullups on the I2C bus, I don't remember what drove that decision.

I've not used the open-drain, or the SPI variant of the MCP expander, but I imagine they are just as robust as the 23017. The single-pin analog I2C addressing on the 23018 is something I've not seen before.

kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.
I've never had timing issues on i2c with trace routing but I had every other issue. Designer screwed the pooch choosing addressing and everything conflicted with everything with not enough address pins on any chip to make it stop? Check. Multiple voltage domains? Check. Buggy prerelease chips (early stepping of the Intel 82575EB) on the bus with no way to disconnect them that conflicted with everything for no reason? Oh yeah. A billion bus switching chips to separate sections of the net but never where you needed them? Uh huh. He even crossed clock and data in one place but luckily that was easily fixed.

It was a mess. It scarred me for life, I swear.

The 23s18 looks like it's the 23018 but with SPI instead of i2c. I hadn't seen that analog setup either actually. Kinda a cool idea.

Darchangel
Feb 12, 2009

Tell him about the blower!


I love this whole project. Still out of my budget, but some day I’d love to do basically the same thing on a first gen RX-7, since I certainly have enough non-running chassis... Costs will only come down as HEVs and EVs become more common.
Your gauge setup is nifty, too. I want something like that in my 1970 Cutlass. A configurable dash just delights me.

kastein posted:

Sounds like you need to find someone over here willing to go junkyarding for you and send you gifts for every major holiday. :v:

I literally did that for a fellow in the UK on the MegaSquirt forums. I sent him a pair of Ford EDIS-8 modules and coils. He sent me a big honking box of Jelly Babies in return :)

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.
Not dead, just busy. Anti archive bump.

Darchangel
Feb 12, 2009

Tell him about the blower!


Good to hear!
:D

ROFLBOT
Apr 1, 2005

Pomp and Circumcized posted:

My previous project thread ended up in the archives a few years ago. It mostly focussed around the horror of attempting to maintain a number of Toyota Soarer UZZ32's. I still have a couple of Soarers, but that's for another thread, probably in another year.


Hey mate, i read this from start to finish because im a Soarer tragic and in a completely unrelated turn of events im now attempting to save restore the 4th/5th-last UZZ32. Should we start a 32 thread? Would people want to watch masochists burn money?

Also you have excellent taste in cars :)

ROFLBOT fucked around with this message at 04:23 on Apr 26, 2022

Adbot
ADBOT LOVES YOU

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.

ROFLBOT posted:

Hey mate, i read this from start to finish because im a Soarer tragic and in a completely unrelated turn of events im now attempting to save restore the 4th/5th-last UZZ32. Should we start a 32 thread? Would people want to watch masochists burn money?

Also you have excellent taste in cars :)

Thank you!

I did have a thread on the '32s a while back, here it is:

https://forums.somethingawful.com/showthread.php?threadid=3737490&userid=0&perpage=40&pagenumber=1

Happy to do another one!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply