Lil' Blackbox

General => General Discussion => Topic started by: Chewy1576 on February 12, 2018, 07:34:30 PM

Title: Starting a new build
Post by: Chewy1576 on February 12, 2018, 07:34:30 PM
Hey guys! I've been poking around a few days while I've been waiting to pick up my HE351VE and I've decided on building my own controller instead of buying one. The turbo will be going on a 1997 Chevy K3500 with a 6.5L diesel. I've seen where others have ran this turbo with a spring actuator controlling the VGT, but I want to do it electronically, which is what brought me here. I picked up the used turbo today, off of a 2008 6.7 Cummins, but the actuator could be questionable so I want to get the Arduino built and functioning to test it. I'm looking at a DFRobot Bluno board, either an Uno or Mega equivalent, with on board Bluetooth. I'm wanting to add boost pressure and EGT sensors so the extra IO of the Mega seems appropriate, by your code is really meant for the Uno. I'm leaning toward an assembled CAN shield so I can support this project. I've got IDE installed, Common Code 2.0 open, and most of the libraries, but I can't find the CAN library. When I get the controller talking to and controlling the actuator, I'll finish out the mechanical side of the install and hopefully it runs! One big constraint is that I want to limit a max boost pressure of 12-13 PSI. My engine is stock and any more boost than that will cause problems. I'll be doing head studs and thicker head gaskets in the future to build it up and lower compression to allow for more boost.

What do you guys think? Am I out of my mind or do you think this will work well? Is my max boost limit unrealistic, or can it be kept under control?
Title: Re: Starting a new build
Post by: hakcenter on February 13, 2018, 08:18:37 AM
Max boost isn't controllable with just vane position you will need a wastegate.
Title: Re: Starting a new build
Post by: Chewy1576 on February 13, 2018, 10:24:09 AM
I was worrying about that. I wonder if I can build the T3 to T4I adapter with a wastegate port. I know that having the wastegate mounted perpendicular to the exhaust flow isn't ideal, but it may be the best I can do. I can tie the wastegate in to the crossover pipe also, but then I am only venting the exhaust pressure from 4 cylinders instead of all 8.
Title: Re: Starting a new build
Post by: hakcenter on February 13, 2018, 12:54:43 PM
Well let's see what you got ? Pictars ?
Title: Re: Starting a new build
Post by: Chewy1576 on February 13, 2018, 07:32:59 PM
I'll get some pics tomorrow in the daylight. I'm excited about putting this project together.

I've got IDE installed and running, Common Code 2.0 open, and some of the libraries. Where do you get the CAN library? I didn't see a download link like the others.
Title: Re: Starting a new build
Post by: hakcenter on February 13, 2018, 09:31:14 PM
If you looked at the first post for the libraries, I have the zips as attachments :)
Title: Re: Starting a new build
Post by: Chewy1576 on February 13, 2018, 09:44:29 PM
There they are! Probably weren't displayed because I wasn't logged in at the time.
Title: Re: Starting a new build
Post by: Chewy1576 on February 14, 2018, 04:29:40 PM
Here's what I'm working with. 6.5L with a stock Borg Warner GM-8 turbo. My thought is to build the adapter with an angle to it to move the turbo toward the intake, giving room on the air box side for the actuator. I want to either pipe the wastegate forward under the center section and compressor or out the side of the adapter, and outlet back into the downpipe. I'm thinking forward will have more room for the wastegate.
Title: Re: Starting a new build
Post by: hakcenter on February 16, 2018, 01:51:21 PM
Hard to see the manifold and flange. Is the rusted under pipe near the downpipe area the cross over from the other cylinders up to the flange ?
Title: Re: Starting a new build
Post by: Chewy1576 on February 16, 2018, 02:37:05 PM
Yes the rusted pipe is the crossover. To the left of it is the 3.5" downpipe. It will be replaced with a new 2.5" mandrel pipe at some point, more sooner than later. Here's a better pic of the exhaust flange bolted to the manifold. I think I'm leaning toward coming straight out of the adapter toward the front of the truck with the wastegate, then run the vent pipe back, next to the manifold, and into the downpipe. You can see it in the pic to the left of the manifold.
Title: Re: Starting a new build
Post by: Chewy1576 on February 17, 2018, 01:28:34 PM
Another pic I found with the turbo removed. Should be plenty of room for a wastegate up there.
Title: Re: Starting a new build
Post by: hakcenter on February 17, 2018, 10:57:02 PM
I can't see hood clearance, but if you can space a few inches in your adapter, I would just take the turbo higher, and put the wastegate towards the valve cover, looks like there will be room to pipe it back down the hot side following the down pipe.
Title: Re: Starting a new build
Post by: Chewy1576 on February 18, 2018, 07:25:59 AM
That's a good option also. The CDR (tuna can) plugs into the valve cover through that hole next to the flange so that may be in the way. I was planning on the adapter being 4" or so tall anyway to allow room for a wastegate. I'm thinking 44 mm will be a good size. I need to fab an elbow from the exhaust outlet to the downpipe too. Would there be a problem plumbing the wastegate outlet to the elbow, or is that too close to the exhaust outlet?
Title: Re: Starting a new build
Post by: hakcenter on February 18, 2018, 04:18:28 PM
Shouldn't matter that close, downstream of course would be best
Title: Re: Starting a new build
Post by: Rx7man on February 21, 2018, 10:22:59 PM
If you lack clearance on that side, you could probably put a wastegate on the drivers side manifolds.. combined with an open vane position you should be able to keep boost in check.

Bear in mind too that while more air = more pressure, more fuel = much more pressure.. without going stupid with the boost I don't think it'll be too critical.. 12-15 PSI is really low!
Title: Re: Starting a new build
Post by: Chewy1576 on February 22, 2018, 03:11:12 PM
I have considered putting the wastegate on the manifold, or even directly on the exhaust housing. I would just need to find a fabricator to be able to weld onto cast iron. I have one lined up to weld my adapter together, but he's in Washington and I'm in Utah so I was going to ship drawings and the pieces to him. I think for this first iteration, I am going to try it without a wastegate. I have also been talking with some vendors who build custom adapted HX35 and HX40 turbos for 6.5L engines, and they say a stock engine will handle 15-17 psi of boost if the drive pressure stays down. They seem to think anything is better than the stock GM-8 turbo so the HE351VE should be fine. I will just need to start ultra conservative with the vein positions and go from there.
Title: Re: Starting a new build
Post by: hakcenter on February 22, 2018, 03:13:58 PM
Is this a diesel motor ? or a Gasser ? usually diesel + boost = good thing
Title: Re: Starting a new build
Post by: Chewy1576 on February 22, 2018, 03:19:27 PM
It's a diesel. The engine GM used before the Duramax. They just run 20:1 compression ratio vs 18:1 in the Cummins, so if you push them too much they go boom.
Title: Re: Starting a new build
Post by: hakcenter on February 22, 2018, 03:42:51 PM
Are they setup with rising fuel pressure regulators or some kind of boost related fueling ? Cause you can pretty much control boost with fuel.... with a diesel :)
Title: Re: Starting a new build
Post by: Chewy1576 on February 22, 2018, 04:02:58 PM
It has electronic fuel control so I'm sure that is completely adjustable in the PCM. Unfortunately there isn't a plug in tuner for it, so I have to do it the old fashioned way and send the PCM out to be programmed.
Title: Re: Starting a new build
Post by: Rx7man on February 24, 2018, 02:24:46 AM
I'd try it without a wastegate and go from there..  If you're around 250-300 hp I don't think you'll be fuelling hard enough for the turbo to not open wide enough.
Title: Re: Starting a new build
Post by: Chewy1576 on February 24, 2018, 07:28:45 AM
Ok you've talked me out of it. I think I'm going to be around the 250 HP by the time it's done.

Now to the controller side. I want to integrate boost, fuel pressure, and EGT sensors into the Arduino and output data to 20x4 screen. Will the Uno handle the added inputs, or should I go up to the Mega? Rx7man, I saw your post about the affordable pressure sensors, and I'm going to grab a couple of 2 bar sensors. I already have a hole tapped in the intake for a boost gauge so it will be a direct swap, and tapping into the top of the fuel filter housing is easy. I'll track down the thermocouple amplifier board and an EGT probe too.
Title: Re: Starting a new build
Post by: Rx7man on February 25, 2018, 07:22:29 PM
you should run a length of line and a snubber on the fuel side to reduce the vibration.. they really don't like it and it's a pain to filter the signal as well, and get a few spare sensors too... they do fail once in a while, I had one on the fuel side spring a leak. cheap chinese garbage, but I had a $100 Honeywell fail on me too

For a thermocouple amp board, DO NOT GET the $2 Max 31855 boards on ebay, they're defective... I got some multichannel Max31856 boards on Ebay from the US that work well.. (I think it's Whizoo.com (http://www.whizoo.com) Edit: doesn't have a link to his ebay store) not cheap at $50 for a 4 channel, but not bad either. the cheap ebay thermocouples seem to work alright though.

There are some finicky differences between the Mega and Uno that make it so you can't just drop in the Lil'bb shield onto it, you need a board in between to shuffle some pins around.. Hakcenter should be able to tell you how many analog inputs are available, I think you should have enough to do what you need..
Title: Re: Starting a new build
Post by: Chewy1576 on February 25, 2018, 07:41:13 PM
I was planning to put both sensors directly on top of the engine, but thanks for the heads up about the vibration. I think I'll mount them to the firewall and run a length of tube to both instead. There is another supplier I see that says they are US made sensors, so I may try those.

I was looking at the Adafruit amplifier, I think they just want $15 or so. I'd like to use the Uno for ease of use with the CAN shield, but if the Mega is needed for more program memory and inputs, I can figure out how to make that work too. Would it be useful to have a prototyping shield dropped in too?
Title: Re: Starting a new build
Post by: Rx7man on February 25, 2018, 08:06:13 PM
Here's that ebay store I couldn't find before
Items in madeatrade store on eBay! (http://stores.ebay.com/madeatrade)

I was thinking that rather than having one box that does everything, having a couple in convenient locations, each with their specific duties, and they talk over CAN bus to each other.. Much less ratsnest.. you don't believe how many wires I have coming into that Mega, total cluster$#%k! And the Mega doesn't really have a whole lot of processing power either to do displays (which hold up other, more important things)...
Title: Re: Starting a new build
Post by: hakcenter on February 25, 2018, 10:30:38 PM
^^ was what I was thinking. No need to make 1 thing do everything. It'll jumble up the code etc.

If you're mostly looking for just data, and not to use it as a reference 3d map table, I would just off load all the extra thermos and boost / back pressures to a separate unit, which you'll probably want to send to a LCD screen anyways.
Title: Re: Starting a new build
Post by: Chewy1576 on February 26, 2018, 02:05:01 PM
First use would just be for gauge display, to start. I was thinking about using boost pressure or EGT monitoring more as a fail-safe. If boost pressure or EGT goes above a certain value, increase the vein position a little every second (or whatever time interval) until the value starts dropping, then decay the added position value after back under the threshold.

Edit: So I'm thinking I'll use an Arduino Uno w/ CAN shield as the master, and an Arduino Mini to drive the LCD. The Uno will take in all sensor inputs and drive the VGT actuator, and push data to the Mini for display on the LCD? Use serial or SPI for comm between the controllers?
Title: Re: Starting a new build
Post by: Rx7man on February 26, 2018, 11:49:45 PM
Why not use CAN between controllers? you can have them all on the same bus!.. Less wires, resistant to interference, etc.. CAN controllers are a couple bucks a piece, I have  a dozen of them
Title: Re: Starting a new build
Post by: Chewy1576 on February 27, 2018, 05:44:08 AM
My thought was to keep the LCD and slave module light weight and compact so I could find/build an enclosure for it. I envision mounting it to the A pillar or Dash like an Edge Insight. I guess there are small can modules, like the MP2515 that wouldn't add much bulk to it, and I would gain CAN bus transmission speeds.
Title: Re: Starting a new build
Post by: Rx7man on February 27, 2018, 04:15:09 PM
Here are some links to things I got

pressure transducers
https://www.ebay.com/sch/sis.html?_nkw=Pressure+transducer+or+sender%2Cstainless+steel%2Cfor+oil%2Cfuel%2Cair%2Cwater+Multichoice&_id=331948290965&&_trksid=p2057872.m2749.l2658

Arduino pro mini 5v.. requires FTDI adapter, but it's nice and small
Pro Mini Atmega328 5V 16M Micro-controller Board for Arduino Compatible Nano new  | eBay (http://www.ebay.com/itm/Pro-Mini-Atmega328-5V-16M-Micro-controller-Board-for-Arduino-Compatible-Nano-new-/331809989705?hash=item4d416aa449)

CAN board
Arduino MCP2515 CAN Bus Module TJA1050 Receiver SPI Module  | eBay (http://www.ebay.com/itm/Arduino-MCP2515-CAN-Bus-Module-TJA1050-Receiver-SPI-Module-/311520457612?hash=item488810f38c)

20x4 display I2C bus
Blue Serial IIC/I2C/TWI 2004 204 20X4 Character LCD Module Display For Arduino | eBay (http://www.ebay.com/sch/sis.html?_nkw=Blue+Serial+IIC%2FI2C%2FTWI+2004+204+20X4+Character+LCD+Module+Display+For+Arduino&_id=141975888833&&_trksid=p2057872.m2749.l2658)
Title: Re: Starting a new build
Post by: Chewy1576 on February 27, 2018, 05:05:07 PM
Awesome, thank you! These are the exact components I have been looking at.

What setup are you guys running? I saw a few videos on YouTube, but not sure whose they are. I want to have everything assembled, wired, and functioning off of the truck before I start taking parts off of the engine. All of the components for the swap are off the shelf parts, except for the elbow from the exhaust outlet to the existing downpipe. That can't really be fabbed until the exhaust housing is on the manifold so I can get measurements.
Title: Re: Starting a new build
Post by: Rx7man on February 28, 2018, 10:11:24 AM
My youtube username is Rx7man as well.. don't have any video of just the setup, only of it in action.  VGT turbo on the factory application has about a 45* elbow on it, if you have it it might make fabbing the downpipe a bit easier.. I didn't have it when I built mine so I used 4" mandrel bend and welded it together
Title: Re: Starting a new build
Post by: Chewy1576 on February 28, 2018, 11:34:53 AM
Unfortunately, it didn't come with the elbow. I have already sourced a V-band flange for the turbine outlet, and the ID will fit a 3.5" pipe. I also already have a 3" aftermarket downpipe and 4" exhaust in the truck with the stock turbo, so it will be measuring and fabricating the 90 degree turn for the 3.5" pipe down from the new outlet flange, then adapting that to the existing 3" pipe V-band flange.
Title: Re: Starting a new build
Post by: Rx7man on February 28, 2018, 01:15:44 PM
Something that might help you are the band clamp types of exhaust clamps.. Places like Kenworth have them and they aren't that much money.. At least for mockups, etc they can hold two butt ends together nicely..
https://www.oreillyauto.com/detail/walker-5231/exhaust-parts-16469/exhaust-clamps-17380/mega-band-clamp/33260/4786467

there are also stepped ones that go from the pipe size to the spiral flex like this
https://www.oreillyauto.com/detail/walker-5231/exhaust-parts-16469/exhaust-clamps-17380/walker-4-inch-steel-band-clamp/33969/4786501
Title: Re: Starting a new build
Post by: Chewy1576 on February 28, 2018, 04:48:31 PM
I hope everything lines up straight and after a few quick measurements and fitments it will be done. Although I'm expecting to have to angle the new elbow toward the passenger side, then bend or angle cut it and weld the flange on parallel to where the downpipe is.
Title: Re: Starting a new build
Post by: hakcenter on March 01, 2018, 07:46:22 AM
I bought an elbow, cut the flange, and welded it to my OG downpipe works great :)
Title: Re: Starting a new build
Post by: Rx7man on March 02, 2018, 09:55:43 AM
I just got this in my email from Sparkfun.. Not cheap, but if you're looking for a small footprint, it could be reasonable solution?
https://www.sparkfun.com/products/14483?utm_campaign=March%202%2C%202018&utm_source=hs_email&utm_medium=email&utm_content=61063346&_hsenc=p2ANqtz-8vxCTu6rxgPlG0kveNQOJJoNkq5Aq37TztMP2RpEamxKx8aBZrhdQiColYaRqc0Q6Qz4taziyeKEtfIZ88E_EHxn4yGw&_hsmi=61063089
Title: Re: Starting a new build
Post by: Chewy1576 on March 02, 2018, 11:24:37 AM
Well that's a pretty cool little module! I'm not opposed to a little more cost for an all-in-one solution. I still need to either add and FTDI board for programming, or establish a UART connection with the Uno too. I wonder if I can incorporate an RJ45 plug on both ends and use a Cat5e cable for the interconnect? 8 wires, use 1 pair for 5V VCC and a ground to power the board, 2 wires (1 pair) for the UART, 2 wires (1 pair) for the CAN high and low. Will the same 5v be enough to power the LCD as well? Or should I pass another power and ground up for that? The I2C bus between the LCD and Mini will be internal to that device.
Title: Re: Starting a new build
Post by: Rx7man on March 02, 2018, 02:29:58 PM
I think cat5 cable should handle a amp or so per pair with ease, don't see it drawing much more than that.. LCD's are usually about 200ma or so max IIRC... Might want to look into a somewhat custom power supply if one supply will power all devices.. I think the part number for a high current 3 pin voltage regulator is the LM1084T-5  which should be able to supply lots and lots of stuff with a good heat sink.
For programming I'd just get an FTDI chip. again, they're so darned cheap, you can solder it with ribbon cable right to your device.. some have 3.3 and 5v options, as well as RS485, RS232, etc all onboard
Here's one
https://www.ebay.com/sch/sis.html?_nkw=FT232RL+FTDI+Serials+Adapter+Module+Mini+Port+f.+Arduino+USB+to+TTL+3.3V+5.5V&_id=201543906640&&_trksid=p2057872.m2749.l2658

another
FTDI FT232RL USB to TTL Serial Converter Adapter Module 5V 3.3V For Arduino WA | eBay (http://www.ebay.com/sch/sis.html?_nkw=FTDI+FT232RL+USB+to+TTL+Serial+Converter+Adapter+Module+5V+3.3V+For+Arduino+WA&_id=252673464306&&_trksid=p2057872.m2749.l2658)

And if you're going to do soldering, I HIGHLY recommend a good iron.. I got this one, and for the price I'm pretty happy with it.. heats up fast, digital temp control, and readily available tips (900M style)
60W LCD Digital Soldering Iron Temperature Adjustable US/EU Plug & Iron Frame | eBay (http://www.ebay.com/sch/sis.html?_nkw=60W+LCD+Digital+Soldering+Iron+Temperature+Adjustable+US%2FEU+Plug+%26+Iron+Frame&_id=152628830224&&_trksid=p2057872.m2749.l2658)

Another nice thing is paste solder.. really makes life easier, dab a little onto the joint, heat and done.. a little hard to dispense, I haven't found a good way yet.. I use a wood dowel for a plunger
MECHANIC XG-Z40 10cc Syringe Solder Paste Flux Sn63/Pb37 25-45u | eBay (http://www.ebay.com/sch/sis.html?_nkw=MECHANIC+XG-Z40+10cc+Syringe+Solder+Paste+Flux+Sn63%2FPb37+25-45u&_id=311834953927&&_trksid=p2057872.m2749.l2658)
Title: Re: Starting a new build
Post by: Chewy1576 on March 02, 2018, 03:12:10 PM
I figure that we use power over Ethernet to run our office phones, it should be able to handle at least that much. The RJ45 interface would just be an easy connection and cheap cable to route. I actually have an FTDI chip that I use to talk to the PCM in my 1990 Chevy truck so I can datalog and tune the 383 in it. I do need a much better soldering iron too. The cheap Welder ones would probably nuke anything they touch.
Title: Re: Starting a new build
Post by: Rx7man on March 02, 2018, 09:03:37 PM
as with anything from China, buy it long before you need it.. shipping times can be horrid.. but when I looked for comparable soldering irons here, even made in China, I was looking at double the price to start.
Title: Re: Starting a new build
Post by: Chewy1576 on March 02, 2018, 10:17:58 PM
I've learned my lesson with items from China long ago... I look at the item origin before I bid and make sure it's a seller from the US before bidding/buying anything. I don't care if the sale price is higher, I'd rather not deal with that "slow boat from China" than pay a few more dollars.
Title: Re: Starting a new build
Post by: Rx7man on March 03, 2018, 12:09:29 AM
I'm a cheap bastard, if I don't need something in a hurry, I'll save the money

Shipping from the US to Canada alone is worth way more than what it's worth shipped from china.. nevermind the cost of the part
Title: Re: Starting a new build
Post by: Chewy1576 on March 18, 2018, 10:21:19 AM
I ordered the controller parts today, grabbed an Ard Uno, CAN shield, Thermocouple Amp, Voltage Regulator, Ard Pro Mini, and Mini CAN board from Amazon. I got a 20x4 LCD from Crystalfontz.com also. I'll get an EGT probe and boost pressure sensors later. It will be a good test for me just to get the controller talking to the actuator and the LCD.
Title: Re: Starting a new build
Post by: Rx7man on March 19, 2018, 02:37:06 PM
The 20x4 LCD can be really slow to update.. slow enough the turbo times out if you do it all at once.. I'll try and find the library I use that's much faster than a lot of the others
Title: Re: Starting a new build
Post by: Chewy1576 on March 19, 2018, 04:01:13 PM
That would be awesome. Right now, I'm planning to use the Uno for sensor signal processing (turbo shaft speed, boost pressure, and EGT) and actuator interface/control. The Pro Mini will drive the LCD over SPI. The Uno will send values for display to the Pro Mini through CAN and not do any writing to the LCD to save overhead. I may run an SPI interface between the Uno and Pro Mini also for a programming interface, so once I have the nice enclosure built for it, I don't have to open it up to update code. One USB interface with the Uno and I can communicate with both processors.
Title: Re: Starting a new build
Post by: Chewy1576 on March 20, 2018, 08:24:49 PM
Well crap... I guess I wasn't paying attention when I ordered the LCD, and I got the one with I2C interface instead of SPI. I don't think it's a dealbreaker, but not what I was expecting. Shouldn't affect LCD display rate performance should it?
Title: Re: Starting a new build
Post by: Rx7man on March 20, 2018, 09:14:46 PM
I'm not sure, I2C isn't fast.. start with it and see what you can do..   FYI, the fastest I2C clock I was able to use for my LCD was 800khz.. anything more would hang..
I haven't found that faster library yet.. haven't been on my laptop
Title: Re: Starting a new build
Post by: Chewy1576 on March 20, 2018, 09:25:29 PM
Not a problem. I appreciate any help you can provide. I may just go ahead and order the SPI screen, it's only about $20 shipped. I can use the I2C screen down the road to tinker with.
Title: Re: Starting a new build
Post by: Rx7man on March 20, 2018, 09:38:13 PM
I paid like $7 for my I2C screen.. the nice thing about I2C is it's so much less wiring to deal with, especially when you start to have many devices
Title: Re: Starting a new build
Post by: Chewy1576 on March 20, 2018, 10:00:00 PM
I am going to have a lot of devices. The Uno, CAN shield, and thermocouple amp in one enclosure. The Pro Mini, CAN adapter, and LCD in the other. Then establish the CAN bus between the two enclosures and the actuator, yikes!
Title: Re: Starting a new build
Post by: Rx7man on March 20, 2018, 11:07:48 PM
Lots of fun.. I'm working on a similar thing as well.. and then I have other projects in mind too.. I suffer from uncontrollable scope creep, and I'm a bit of a perfectionist, so I just never get anything actually done!
Title: Re: Starting a new build
Post by: Chewy1576 on March 21, 2018, 06:12:43 PM
I'm excited to learn a new platform and programming language. I work with PLCs and HMIs all day long, so I'm hoping I can get caught up quickly. I should have ordered some breadboards and jumpers while I was at it so I could start connecting components.
Title: Re: Starting a new build
Post by: Rx7man on March 22, 2018, 02:17:20 AM
I did a lot of PLC work too.. I did packaging equipment.. here's one I built 12 years ago.. I like fiddling and learning too
https://www.youtube.com/watch?v=mQukx2IyyL0
Title: Re: Starting a new build
Post by: Chewy1576 on March 22, 2018, 09:24:56 AM
That's awesome. Here's my latest and greatest. We didn't build it in-house, but I'm the project engineer over the electrical and control systems of the machine.
Title: Re: Starting a new build
Post by: Rx7man on March 22, 2018, 05:46:13 PM
Looks expensive!.. We were at one time going to build a machine all from stainless, but never did.. Anyhow, I learned PLC's by the seat of my pants.. First some prehistoric Omrons, then Allen Bradley, mostly RS Logix 500 but later on we did some 5000 stuff.. Learned to loathe the dependencies of  AB software, and licensing nightmares.. I spent days on the phone with tech support trying to get simple stuff to work
Title: Re: Starting a new build
Post by: Chewy1576 on March 22, 2018, 05:52:12 PM
Yeah it wasn't cheap. We build medical devices so it has to be stainless for the cleanrooms. I got thrown in the deep end too, but we have Siemens control systems because our machines are built in Germany. I need to learn AB though.
Title: Re: Starting a new build
Post by: Rx7man on March 22, 2018, 07:58:35 PM
I think Hakcenter here does PLC work as well IIRC.. AB is pretty easy if you know any ladder logic.. the hard part is getting RS Linx (the part of the program that actually communicates with the device) to play nice with your IDE... version conflicts, endless updates, keys in the wrong place, keys for the wrong version, etc.. all the old Microsoft jokes apply x10 to AB software
Title: Re: Starting a new build
Post by: Chewy1576 on March 22, 2018, 08:43:07 PM
I work mostly in function block with Siemens, but you can do ladder too. We have some machines with AB hardware so I've seen a little bit, but I do agree with you about RS Linx and the multiple versions of RS Logix. I've looked at Soapbox to use ladder with an Arduino, but I don't know if all of the functions for actuator communication and control needed would be available.
Title: Re: Starting a new build
Post by: Rx7man on March 22, 2018, 09:44:01 PM
Might be interested in this... my buddy who still works at that company and is doing some moonlight work seems to like them.. Velocio.net (http://velocio.net/)
Title: Re: Starting a new build
Post by: hakcenter on March 23, 2018, 10:22:51 AM
LOL Linx, what a nightmare. Never ever ever update, LOL

And keep every version of every install different, and you're pretty much good to go.

I did a lot of automation for bottling companies with a good friend of mine. Ladder logic is so simple though.

There was times, hey you know if we fix this program.. you know we own the machine at this point right? :)
Title: Re: Starting a new build
Post by: Chewy1576 on March 23, 2018, 10:26:42 AM
Yep!!! I see that day in and day out. I'm part of a group of 11 software/controls engineers, and there are a few other groups throughout the plant with the same responsibilities/access we do. So if we or they change a program, they take it over. Makes revision control a nightmare, especially for HMI's.

Anyway, I ordered a few breadboards, a bundle of jumpers, a kit of misc headers, and a TXB0104 board for the MAX31855 thermocouple amp. I've read that the MAX31855 will work with 5V, but won't last long. The TXB0104 will drop the voltage to 3.3V to get a lot more life out of it. I also ordered the 351VE connector parts from Mouser, thank you for the project list link!
Title: Re: Starting a new build
Post by: Rx7man on March 23, 2018, 01:22:23 PM
I'm not very fond of the MAX31855.. never was able to get them working right,.. maybe the chinese board they were on were bad beyond what I saw and fixed on them .... In theory they should be simpler, no initialization requirements is kinda
Title: Re: Starting a new build
Post by: Chewy1576 on March 25, 2018, 06:03:04 PM
Making some progress...

I ended up ordering another LCD with an I2C interface board already soldered on. 4 wires to the Pro Mini (VCC, GND, SDA, SCL) and it's talking. I'm using the NewLiquidCrystal lib for commands and it seems to be refreshing very smoothly. I programmed some incrementing counters for formatting and testing the display. I'll just write data that comes in over SPI from the Uno to those variables.

I believe I have the SPI interface between the Uno and Pro Mini wired, and I'm working on the coding. Maybe you guys can help - I want to build an array from a long, float, and 2 ints. My idea was to arrange the data into an array of bytes, serialize and transfer the array over SPI, then put the bytes back into the variable types on the other side. Then I'll print them to the LCD with every refresh. I'm sure I'll have to play with transfer and delay timers to make it all function smoothly.
Title: Re: Starting a new build
Post by: Rx7man on March 25, 2018, 06:31:21 PM
For your array problem, look up Unions.. they can represent any data type on its binary level and convert without any overhead

So a float is 4 bytes long, transferring the information by text would take 10 bytes for 10 digits (plus one for a decimal point).. I can't remember if my syntax is completely correct, but I'll give it a shot off the top of my head.. Only requirement is that all data types are the same length AFAIK



float f1 = 12.345f;
unsigned long int ul1 = 1392487ul;
signed long int      sl1 = -234453l;

union fourbyte{
float f;
long int l;
unsigned long int ul;
byte[4] b;
}

//to use it now
void loop{
fourbyte DataToSend;

DataToSend.f = f1;
SendToDevice(DataToSend);

DataToSend.ul = ul1;
SendToDeveice(DataToSend);

DataToSend.sl = sl1;
SendToDevice(DataToSend);
}

void SendToDevice(fourbyte data){
  for(int i = 0; i<4; i++){
    SomehowSendByte(data.b[i]);
  }
}


I just transfer EVERYTHING as a float so I don't need to keep track of what kind of data type I'm dealing with

At the other end, take your four received data bytes as an array, assign them to the byte subtype of the "fourbyte" and then use the "float" subtype to get the value


Hope that is what you were looking for
Title: Re: Starting a new build
Post by: Chewy1576 on March 25, 2018, 07:14:18 PM
Yes this does help, I will probably use a union on the master side. The only reason I have a float is so that I can report Actual Vane Position in fractions of 0.50, possibly 0.25. The data I want to send is Turbo Shaft Speed (Long, because it can get above 100k), Vane Position (float), Boost Pressure (int), and EGT (int). I should probably send one or two bytes to use as status bits for displaying things like Turbo Inactive, Actual Operating Mode (Idle, Normal, Cruise, Braking), Manual Vane Control Active, etc. So that's 14 bytes total.
Title: Re: Starting a new build
Post by: Rx7man on March 25, 2018, 09:52:19 PM
I'd send everything as a float and be done with it..

I'd bet as time goes on you're going to add a lot more stuff to display.. fuel pressure, oil pressure, turbo data feedback, etc

I'd just create a CAN address for each variable and send the data to it, the slave listens for many addresses and handles each one separately
Title: Re: Starting a new build
Post by: Chewy1576 on March 26, 2018, 05:06:47 PM
K I'll set those variables up as floats and I'll send 4 bytes worth of status bits, to make 5 floats total, 20 bytes. I probably will add fuel pressure, and possibly drive pressure in the future. Everything else I want to monitor I can get on my Scangauge.

So looking into the unique addressing for each variable, I think I can set up different ID/Masks and have individual send commands on the Master for each one. Then on the Slave side, have individual msgavailable commands looking for a data packet on the bus addressed to those ID's, grab the data when available, and write it to where I want it.

On another front, I have the thermocouple amp talking to the Uno over SPI. I don't have a thermocouple yet, so it's just reading NAN. Next will be wiring the Pro Mini and it's CAN board to get them talking, then establishing the CAN bus between them.
Title: Re: Starting a new build
Post by: Rx7man on March 26, 2018, 07:34:26 PM
there is some data you can get back from the turbo as well.. Drive rate, commanded position, actual position, and temperature.. I think there may be more but I haven't been able to access them
Title: Re: Starting a new build
Post by: Chewy1576 on March 26, 2018, 08:33:10 PM
What does the drive rate parameter mean? I'm already planning to display actual vane position. Maybe I can show actuator temperature on the same line. Here's a quick video of what I had a few days ago, it's been tweaked a little since then.
Title: Re: Starting a new build
Post by: Chewy1576 on March 26, 2018, 10:36:56 PM
Had to give this a shot before bed...

void C_CANBUS()
{

  union turbo_speed_array { // Create 4 byte array out of Turbo Speed float
    float turbo_speed;
    byte byteTS[4];
  } TS_array;

  union vane_pos_array { // Create 4 byte array out of Vane Position float
    float vane_pos;
    byte byteVP[4];
  } TP_array;
 
  unsigned long Var1_ID = 0x11E1A300; // Msg ID for Turbo Speed & Vane Position = 300000000 DEC
  byte length = 8; // Send length = 8 bytes
  byte data1[] = {TS_array.byteTS[0], TS_array.byteTS[1], TS_array.byteTS[2], TS_array.byteTS[3], TP_array.byteVP[0], TP_array.byteVP[1], TP_array.byteVP[2], TP_array.byteVP[3]}; // Combine Turbo Speed and Vane Position arrays for one send

    CAN1.send (Var1_ID, extID, length, data1);

  union boost_pressure_array { // Create 4 byte array out of Boost Pressure float
    float boost_pressure;
    byte byteBP[4];
  } BP_array;

  union egt_array { // Create 4 byte array out of EGT float
    float egt_float;
    byte byteegt[4];
  } egt_array;
 
  unsigned long Var2_ID = 0x127A3980; // Msg ID for Turbo Speed & Vane Position = 310000000 DEC
  byte data2[] = {BP_array.byteBP[0], BP_array.byteBP[1], BP_array.byteBP[2], BP_array.byteBP[3], egt_array.byteegt[0], egt_array.byteegt[1], egt_array.byteegt[2], egt_array.byteegt[3]}; // Combine Boost Pressure and EGT arrays for one send

    CAN1.send (Var2_ID, extID, length, data2);

}
Title: Re: Starting a new build
Post by: Rx7man on March 27, 2018, 12:27:40 AM
Make the 4 byte union type first, then make an instance of the type for each application of it

it's just another data type, so after making the type,...

union fourbyte{
float f;
byte b[4];
}

fourbyteunion egt;
fourbyte union boost_pressure;

//then you access the subtype you want within it.

egt.f = 1.234;
boost_pressure.f = 2.345;

Senddata(egt.b); //where Senddata expects a 4 byte array
Title: Re: Starting a new build
Post by: Rx7man on March 27, 2018, 12:30:18 AM
Oh, the drive rate is how hard the VGT actuator motor is working, it's an 8 bit signed integer.. so -128 to +127
Title: Re: Starting a new build
Post by: Chewy1576 on March 27, 2018, 06:43:44 AM
That cleans things up quite a bit...

union fourbyte {
    float f;
    byte b[4];
  };

  fourbyte turbo_speed;
  fourbyte vane_pos;
  fourbyte boost_pressure;
  fourbyte egt;
 
  unsigned long Var1_ID = 0x11E1A300; // Msg ID for Turbo Speed & Vane Position = 300000000 DEC
  byte length = 8; // Send length = 8 bytes
  byte data1[] = {turbo_speed.b[0],turbo_speed.b[1],turbo_speed.b[2],turbo_speed.b[3],vane_pos.b[0],vane_pos.b[1],vane_pos.b[2],vane_pos.b[3]}; // Combine Turbo Speed and Vane Position arrays for one send

    CAN1.send (Var1_ID, extID, length, data1);
   
  unsigned long Var2_ID = 0x127A3980; // Msg ID for Turbo Speed & Vane Position = 310000000 DEC
  byte data2[] = {boost_pressure.b[0],boost_pressure.b[1],boost_pressure.b[2],boost_pressure.b[3],egt.b[0],egt.b[1],egt.b[2],egt.b[3]}; // Combine Boost Pressure and EGT arrays for one send

    CAN1.send (Var2_ID, extID, length, data2);
Title: Re: Starting a new build
Post by: Rx7man on March 27, 2018, 01:43:11 PM
That does look much better :).. and it works, right?
Title: Re: Starting a new build
Post by: Chewy1576 on March 27, 2018, 06:26:21 PM
It compiles without errors  ;D

I haven't had a chance to wire or code the whole CAN interface yet. Hopefully in the next day or two...
Title: Re: Starting a new build
Post by: Chewy1576 on March 31, 2018, 05:15:32 PM
Well my CAN communication code doesn't seem to be working. Using the CAN initialization check from the examples, both processors seem to be activating and talking to their respective CAN boards, but the Uno side isn't sending messages out on the CAN BUS. I have the terminating resistor on the Pro Mini side jumpered on. I'm going to try breaking each float out into it's own CAN transaction.
Title: Re: Starting a new build
Post by: Rx7man on March 31, 2018, 07:21:42 PM
yeah, I think that's a good idea anyhow
Title: Re: Starting a new build
Post by: Chewy1576 on April 01, 2018, 02:16:51 PM
I think I figured out my problem...

The Pro Mini is running at 16 mhz, the CAN BUS board I have has an 8 Mhz oscillator. I didn't put in any kind of correction for the difference. I'm working on figuring out how to implement that now.
Title: Re: Starting a new build
Post by: Rx7man on April 01, 2018, 02:49:14 PM
I dont' think that's a problem, I've used them like that before... though I was talking to two units that had the same frequency oscillators.. have to read the datasheet
Title: Re: Starting a new build
Post by: Chewy1576 on April 01, 2018, 02:56:15 PM
I found another library that had a initialize parameter for an 8 MHz crystal, and it's working. Now I either redo my code for the new library, or swap out the 8 MHz crystal for a 16 MHz and use my original code.
Title: Re: Starting a new build
Post by: Rx7man on April 01, 2018, 03:04:32 PM
I'm not really finding much info on it.. here's the datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/20001801H.pdf
Title: Re: Starting a new build
Post by: Chewy1576 on April 01, 2018, 03:14:15 PM
This is where I found the idea to try 8 MHz - https://forum.arduino.cc/index.php?topic=325379.0
Title: Re: Starting a new build
Post by: Rx7man on April 01, 2018, 04:50:00 PM
Nice.. since I'm sure I'll run into that problem later, I'm glad to be aware of it now
Title: Re: Starting a new build
Post by: Chewy1576 on April 01, 2018, 06:26:27 PM
I think I'm going to change out the crystal on the CAN board. I liked programming with the other library better. It's just 2 points to solder.
Title: Re: Starting a new build
Post by: Rx7man on April 01, 2018, 10:09:49 PM
you MIGHT need to change the caps as well.. probably will work though
Title: Re: Starting a new build
Post by: Chewy1576 on April 02, 2018, 06:31:53 PM
Since I got the Send/Receive working I figured I would expand on the Send side while I had a few minutes to tinker. I'm seeing all of the messages sent on the Receive side, but they come through in groups. I'd like to get it to send one set of data before the next, so I need to track down a way to pause between sends until an acknowledgement comes, or is this how CAN is supposed to work? The Receive side will take in all messages on the bus and filter them based on Message ID?
Title: Re: Starting a new build
Post by: Rx7man on April 03, 2018, 12:26:27 AM
that's above my pay grade.. lol.. I mean you could make some generic ACK message and wait until you get an ACK before you send the next, though should anything ever happen to it it could hang...
Are you checking for a message every so often or are you using an interrupt?  I was able to send pretty darned fast when I used interrupts
Title: Re: Starting a new build
Post by: Chewy1576 on April 03, 2018, 01:16:23 AM
No just cyclically in Loop. It's almost like a full auto shotgun blasting data on the bus. I feel like it should be more structured. I'm going to try using the interrupt next. If that doesn't work, I could try some kind of send sequence with handshaking, but that seems like it would bog things down on the VGT controller side.
Title: Re: Starting a new build
Post by: Rx7man on April 03, 2018, 01:44:45 AM
What I did was send a different item every go-round, rather than everything at once.. If you have a millisecond timer going, that would be one way.. every millisecond (or whatever) you send the next packet
Title: Re: Starting a new build
Post by: Rx7man on April 03, 2018, 10:06:32 AM
another way to do it would be to imitate vehicle ECU's.. the display unit, or whatever requests a parameter and then the relevant computer responds.. I think it's explained in plain english here
https://www.youtube.com/watch?v=OhShoU_E-0g
Title: Re: Starting a new build
Post by: hakcenter on April 04, 2018, 06:06:11 PM
so simple gosh even a monkey could do it, lolol
Title: Re: Starting a new build
Post by: Chewy1576 on April 09, 2018, 08:10:53 PM
Took a long weekend to drive down to Nevada with some buddies for a golf trip. I ordered the 16 MHz crystal and some other parts before I left. They were delivered last Friday. Now that I'm back, I got the new crystal soldered in and changed the code on the LCD side to use the same lib as the VGT side and added the interrupt input and it seems to be working much better. No delay timers or anything, it just chews through them.
Title: Re: Starting a new build
Post by: Rx7man on April 10, 2018, 09:52:42 AM
I think I might take a look at the current CAN library and see what can be changed to make the frequency selectable...  Using interrupts on both sides I was able to get ping rates under 1ms, and maybe better since this was with 8mhz crystals.. I do have some 16mhz crystals spare, but I'd rather find a software solution since I have so many of these boards with 8's on them
Title: Re: Starting a new build
Post by: Chewy1576 on April 10, 2018, 10:14:39 AM
Here's the one I switched to. I like the frame formatting in this one. There was also a download link in that forum post I mentioned earlier that had a library with selectable mhz settings.
Title: Re: Starting a new build
Post by: Rx7man on April 10, 2018, 10:42:54 AM
I was thinking of modifying the existing library so it wouldn't need any other changes to code except for the initializer.. I will keep that one in mind though, since there's a good chance the units I'll build that use these 8mhz modules will have totally different code anyhow
Title: Re: Starting a new build
Post by: Chewy1576 on April 17, 2018, 07:10:24 PM
I haven't really had much time to work on this, but I've been trying to set up the message filtering on the LCD side and it's kicking my butt! It's receiving all of the messages, but I'm having trouble figuring out how to grab specific messages and copying the data into the variables for display on the LCD.
Title: Re: Starting a new build
Post by: Rx7man on April 17, 2018, 07:55:14 PM
Are you trying to do it in hardware (the MCP chip has some mailboxes, filters, etc) or in software?
Title: Re: Starting a new build
Post by: Chewy1576 on April 17, 2018, 09:58:19 PM
In the software, using if statements looking for the  specific message ID, then doing a memcpy into the fourbyte array. I started looking into masks and filters too, but haven't gotten very far.
Title: Re: Starting a new build
Post by: Rx7man on April 18, 2018, 07:33:22 AM
I'd start with setting up a bunch of #DEFINE statements that set up the messageID and what they're for, then use a CASE statement.. Can't remember the exact syntax for it, I think this is right?


#Define RPM_MID 345543 //I'm just using random numbers here
#Define EGT_MID 23432
#define TSS_MID 645555
.
.
.
.
.

void MessageHandler(CAN Message){
fourbyte value = GetFourbyteFromMessage(Message);

Select Message.ID{
   Case RPM_MID:
    RPM = value;
    break;
  Case EGT_MID;
    TSS = value;
    break;
  Case TSS_MID:
    TSS = value;
    break;
}
}

fourbyte GetFourbyteFromMessage(CAN Message){
//do your memcopy here, or just do it byte by byte
return value;
}


Title: Re: Starting a new build
Post by: Chewy1576 on April 18, 2018, 09:36:40 AM
I'll try to give it a shot tonight. Thanks!!!
Title: Re: Starting a new build
Post by: Chewy1576 on April 18, 2018, 09:15:19 PM
Here's my first attempt, no workie....

void MCP2515_ISR()
{
  data_rcvd = true;
}

void C_CANBUS()
{
  data_rcvd = false;
 
  if (CAN.available() == true)
    {
      rcv_data = CAN.read();
    };
 
  data_ready = true;
}

void copydata()
{
  data_ready = false;
  switch(rcv_data.id)
    {
      case turbo_speed_ID:
        memcpy(rcv_data.data,turbo_speed.b,4);
        break;

      case vane_pos_ID:
        memcpy(rcv_data.data,vane_pos.b,4);
        break;

      case boost_pressure_ID:
        memcpy(rcv_data.data,boost_pressure.b,4);
        break;

      case egt_ID:
        memcpy(rcv_data.data,egt.b,4);
        break;
    }
}

void loop()
{
  if (data_rcvd = true)
  {
    C_CANBUS();
  }

  if (data_ready = true)
  {
    copydata();
  }

  D_LCDWrite();

}
Title: Re: Starting a new build
Post by: Rx7man on April 18, 2018, 10:43:09 PM
I'd start tossing in some serial prints in there and see what's going on..  Also pay attention to HEX and DECimal values with your message ID's

I'd start with putting one in the interrupt, then each CASE statement.. is it actually getting in there?

Also, it would make the program flow look smoother if instead of setting a flag that the copy is done, just go right to parsing that data out.   Also, global variables tend to be frowned upon when not absolutely necessary.. Pass directly to the function..
Title: Re: Starting a new build
Post by: Chewy1576 on May 21, 2018, 09:39:03 PM
So I haven't given up... Been a busy month or so and I haven't had much time to tinker. I had some time tonight to work on moving the received data around, and figured out I had the destination and source in the MEMCPY backwards  ;D. Now it receives one message and the program seems to hang, it doesn't pull in any more messages.

void MCP2515_ISR()
{
  data_rcvd = true;
}

void C_CANBUS()
{
  data_rcvd = false;
 
  CAN_Frame rcv_data;

  if (CAN.available() == true)
    {
    rcv_data = CAN.read();
    }

  if (rcv_data.id == 300000000)
    {
    memcpy(turbo_speed.b,rcv_data.data,sizeof(rcv_data.data));
    }

  if (rcv_data.id == 305000000)
    {
    memcpy(vane_pos.b,rcv_data.data,sizeof(rcv_data.data));
    }

  if (rcv_data.id == 310000000)
    {
    memcpy(boost_pressure.b,rcv_data.data,sizeof(rcv_data.data));
    }

  if (rcv_data.id == 315000000)
    {
    memcpy(egt.b,rcv_data.data,sizeof(rcv_data.data));
    }
}

void D_LCDWrite()
{
  long disp_turbospeed = 0;
  int disp_egt = 0;

  disp_turbospeed = (long) turbo_speed.f;
  disp_egt = (int) egt.f;
 
    //lcd.setCursor(0,0);
    //lcd.("TurboSpd:          ");
   
    //lcd.setCursor(0,0);
    Serial.println(String("TurboSpd:") + String(disp_turbospeed) + String(" RPM"));
   
    //lcd.setCursor(0,1);
    //lcd.print("TurboPos:         ");
       
    //lcd.setCursor(0,1);
    Serial.println(String("VanePos:") + String(vane_pos.f,2) + String (" cm2"));

    //lcd.setCursor(0,3);
    //lcd.print("Boost:  ");
   
    //lcd.setCursor(0,3);
    Serial.println(String("Boost:") + String(boost_pressure.f,2));

    //lcd.setCursor(12,3);
    //lcd.print("EGT:    ");

    //lcd.setCursor(12,3);
    Serial.println(String("EGT:") + String(disp_egt));

    //delay(100);
}

void loop()
{
   
  if (data_rcvd = true)
  {
    C_CANBUS();
  }

  D_LCDWrite();
 
}
Title: Re: Starting a new build
Post by: Chewy1576 on May 21, 2018, 09:46:23 PM
K another dumb mistake...

As soon as I changed "sizeof(rcv_data.data))" in the MEMCPY to "rcv_data.length", it started working!
Title: Re: Starting a new build
Post by: Rx7man on May 22, 2018, 12:23:41 AM
I've made plenty of those mistakes that have cost me hours of aggravation.. glad you got it figured out
Title: Re: Starting a new build
Post by: hakcenter on May 22, 2018, 09:00:21 PM
Ya uh, I don't like using some of those identifiers, cause raisens
Title: Re: Starting a new build
Post by: Chewy1576 on May 24, 2018, 02:00:56 PM
Going to need a lot of optimization, but it works.
Title: Re: Starting a new build
Post by: Rx7man on May 24, 2018, 03:58:51 PM
as long as it's fast enough to do it, optimization can wait.. but the LCD's are really slow depending on the library you use..

Here was my thread about it on Arduino.cc.. I think a link to the library is in it
https://forum.arduino.cc/index.php?topic=470153.0
Title: Re: Starting a new build
Post by: Chewy1576 on May 24, 2018, 06:57:22 PM
I think I found a pretty good LCD library, it may be the same one you mentioned. The issue was message send/receive timing between processors. I had to add a 25 ms delay between CAN writes for the LCD processor to grab each message and update accordingly. And rather than have a separate routine for LCD writes, I put them directly into the Switch Case for sorting the messages to the corresponding fourbyte.
Title: Re: Starting a new build
Post by: Chewy1576 on July 05, 2018, 01:48:22 PM
Starting to make some progress on the mechanical side of the swap...

Ordered the exhaust manifold adapter and started figuring out what i'm going to do about oil and coolant lines. I got ambitious and took the turbine housing off of the turbo, then I saw a big issue, the VGT nozzle vanes are bent and disintegrating. My guess is that they crashed into the plate in the turbine housing and jammed the actuator, that's why the kid I bought it from pulled it. The plus side is that there is still hope for the actuator, and I have already found a replacement "good" turbo that didn't have an actuator. Already tested the VGT movement with the turbine housing, it moves freely and smooth.

I've also lined up a shop to help build a custom tube from the air filter to the compressor inlet, custom upper intake tube and custom downpipe elbow. They will tune the ECM also.

On the controller, I got the thermocouple amplifier functioning. I also ordered pressure sensors for fuel, boost, and drive pressures and the go-live EGT probe. Some relays, inline fuse holders, and wires too so I can start building harnesses and plugs. I'm hoping to have the swap completed by the end of the summer.

Title: Re: Starting a new build
Post by: Rx7man on July 06, 2018, 01:15:35 AM
Looks like a piece of foreign material went through there.. Piece of valve, piston, wrench, or something.... Don't laugh, it happens!
Title: Re: Starting a new build
Post by: hakcenter on July 06, 2018, 06:48:21 AM
Dang that's where my 7/16 wrench went!

But seriously.. everything is metric, lol WTF
Title: Re: Starting a new build
Post by: Chewy1576 on July 06, 2018, 07:49:25 AM
No doubt something went through it! He just said the VGT quit working, so he put a different turbo on. Oh well, I guess I have some spare parts in case something happens to the new one.
Title: Re: Starting a new build
Post by: Rx7man on July 06, 2018, 08:49:39 AM
Quote from: hakcenter on July 06, 2018, 06:48:21 AM
Dang that's where my 7/16 wrench went!

But seriously.. everything is metric, lol WTF
If it was his 10mm he'd have looked for it and save himself a turbo maybe :P
Title: Re: Starting a new build
Post by: Chewy1576 on August 18, 2018, 10:14:58 AM
Making slow progress, but I guess it's still progress...

Turbo install parts are still being fabricated. The manifold adapter I had purchased put the turbo in a bad spot, it would hit the air filter box. So they designed and fabricated a taller, angled adapter to move the turbo up and toward the engine. The problem with that was that the intake and downpipe tubes were now wrong, so they needed to be redone.

The last few days I updated the 2.2.0 code to work with my CAN BUS library, and added the MAX31855 and the data sends to the LCD. It complies and uploads to the Uno. Working on pulling the data to populate the fourbytes for display. I need to get wiring started to get the actuator powered up and talking to the controller.

Quick question - where do I wire the shaft speed sensor to? I looked through the FreqMeasure lib and I think it said for an Uno board to use Pin 8? I just wanted to be sure.
Title: Re: Starting a new build
Post by: Rx7man on August 18, 2018, 01:37:58 PM
yes, I think pin 8 is used for freqmeasure...

Progress is always slow on projects!
Title: Re: Starting a new build
Post by: hakcenter on August 19, 2018, 10:00:11 PM
Pin8 in freqmeasure measures pwm from a 0-5v square wave.

Don't send the vr sensor directly to that pin. You'll need max9924
Title: Re: Starting a new build
Post by: Rx7man on August 19, 2018, 10:29:54 PM
yes, VR sensors easily make 100V AC which will fry it instantly
Title: Re: Starting a new build
Post by: Chewy1576 on August 20, 2018, 09:30:18 AM
Wow... That hadn't even occurred to me... I ordered this guy for the VR conditioning - https://wtmtronics.com/product/mini-max-a2-signal-conditioner-vr/. It is based on a MAX9926, same as a MAX9924 but dual channel, so I have a spare channel if it ever stops working.
Title: Re: Starting a new build
Post by: Rx7man on August 20, 2018, 03:23:33 PM
Yep, that'll be fine.. I was thinking of getting something similar so I can read the ABS ring on the rearend for vehicle speed.
Title: Re: Starting a new build
Post by: Chewy1576 on November 16, 2018, 09:36:34 AM
Hibernating... but not giving up...

Not much work on the controller lately, life just takes over sometimes, BUT there is progress on the mechanical side. The turbo install kit is finally complete and ready to ship!!!  Really nice work, I"m pretty impressed with it. He's going to offer them as a build-to-order kit in the future so maybe more 6.5Ls will be getting the same treatment as mine.
Title: Re: Starting a new build
Post by: Rx7man on November 16, 2018, 10:04:44 AM
looks good.. are intercoolers an option you can add though?
Title: Re: Starting a new build
Post by: Chewy1576 on November 16, 2018, 10:21:15 AM
Not really. The problem with these trucks is that there is no room for an air-to-air IC in the front. Between the radiator, AC condenser, and oil/trans coolers, there's no room. A water-to-air IC is possible, but I'm not interested in that right now. If I do anything, I'll add water-meth injection, run by the controller. Also, I'm only going to allow 15-16 PSI max so an IC isn't really needed.
Title: Re: Starting a new build
Post by: hakcenter on November 17, 2018, 04:10:49 PM
mmmmmmmmmmmmmmmmmmmmm
Title: Re: Starting a new build
Post by: Chummins on January 11, 2019, 04:44:31 PM
If you get creative a little . There's room for a IC and condenser if you want.  2 Gen Cummins fits nicely around the stock GM radiator. 
Title: Re: Starting a new build
Post by: Chewy1576 on January 20, 2019, 12:44:04 PM
I'd like to maintain the AC condenser, as well as oil and trans fluid coolers. You know how these 6.5L's like to run hot.
Title: Re: Starting a new build
Post by: Rx7man on January 20, 2019, 05:53:12 PM
you could always get an aftermarket trans cooler and relocate it.. AC condenser is harder to do of course.
Title: Re: Starting a new build
Post by: Chewy1576 on January 20, 2019, 07:39:53 PM
I'm actually thinking water meth injection. A bank of relays should make it easy to do off of the main processor.

I went ahead and grabbed one of the Sparkfun Pro Mini boards with the integrated CAN. Getting ready to connect to the display and debug/load the LCD program.

I think I'm going to scale back a little to help reduce roadblocks. I'm going to hold off on drive and fuel pressure gauges for now. I'll move forward with boost and EGT though.
Title: Re: Starting a new build
Post by: Rx7man on January 20, 2019, 10:05:18 PM
as long as your board has the IO's to add it later it's easy.

for relays, I'd probably go with transistors to control them rather than relays.. way faster acting.
Title: Re: Starting a new build
Post by: Chewy1576 on January 21, 2019, 06:10:34 AM
MOSFETs seem a lot cleaner to use also, smaller footprint. I'm only planning on driving a pump and one or two solenoids. The only reason for two solenoids was so I could have variable flow control. Say I use 3 and 5 gal/hr nozzles. I could have 3, 5, or 8 gal/hr output of the system, giving a range of usable situations, not just all or nothing.
Title: Re: Starting a new build
Post by: Rx7man on January 21, 2019, 12:54:25 PM
I've thought about using pretty much exactly the same nozzle setup.
Perhaps have a relay for the pump (probably turn it on at a set boost and a bit before your nozzles), then cycle nozzles accordingly.
Title: Re: Starting a new build
Post by: Chewy1576 on January 21, 2019, 01:05:09 PM
Exactly. I was thinking about enabling the spray under high EGT conditions also.
Title: Re: Starting a new build
Post by: Rx7man on January 21, 2019, 02:02:32 PM
I haven't started on that part yet, but I'd think maybe over 20PSI boost you run the small nozzle, then cycle the big nozzle according to EGT needs..
Title: Re: Starting a new build
Post by: Rx7man on January 22, 2019, 08:31:05 PM
My buddy just tore down his 6.5.. water in the oil.. probably cracked block, apparently his year likes to crack by the #8 oil squirter jet, has an older mechanical engine he'll put in the truck
Title: Re: Starting a new build
Post by: Chewy1576 on January 22, 2019, 09:30:59 PM
These engines are notorious for block and head cracks. The metallurgy of the forgings was far too brittle. Some versions were better than others. What year is his truck? Mine is a 1997, supposedly the worst one available. The earlier years were supposedly better. There are aftermarket long blocks with many improvements for replacement. I'm going to run this one until it gives it up, then do one of these improved long blocks or a Duramax swap.
Title: Re: Starting a new build
Post by: Rx7man on January 22, 2019, 10:23:35 PM
His is around that year or later as well
Title: Re: Starting a new build
Post by: Chewy1576 on January 22, 2019, 10:44:45 PM
Nature of the beast with these old 6.5L's unfortunately. They don't like excessive heat or boost. Several mods can be done to improve the engine and oil cooling systems to increase longevity though.
Title: Re: Starting a new build
Post by: Rx7man on January 22, 2019, 11:28:53 PM
a diesel that doesn't like boost.. sounds like a hooker that only wants to cuddle! :P
Title: Re: Starting a new build
Post by: Chewy1576 on January 23, 2019, 08:52:24 AM
More like a hooker that doesn't like it rough. The stock turbos were painfully inefficient, so the drive pressure needed to generate 18-20  psi of boost coupled with 20:1 compression would blow out head gaskets, make pistons explode, and bend rods in half.
Title: Re: Starting a new build
Post by: hakcenter on January 25, 2019, 01:13:08 PM
sounds like snake oil to me... LOL
Title: Re: Starting a new build
Post by: Chewy1576 on January 27, 2019, 11:04:42 AM
GM's early attempt. It's not even meant to be a workhorse like the Cummins and Powerstrokes, but it got better fuel economy, allegedly. Exactly why I wanted to replace the turbo with a much more efficient unit.

Well, now I gone and done it... I was trying to come up with a more permanent solution for the LCD components. I soldered the CAN485 board to a small breadboard, and didn't like the orientation of the right angle FTDI header, so i thought I would just desolder it and flip it around to the other side of the board. Well old ham hands here managed to pry a compnents off of the CAN board, I believe it's a capacitor from the Vin circuit. Think it will be ok without it? Or do i need to try to get it back in there?
Title: Re: Starting a new build
Post by: Rx7man on January 27, 2019, 11:22:27 PM
I would if you could,  if it is a Vin cap it's to filter out noise.. If you just can't get to it, do you have a pair of neighboring VIN and GND pins? just solder it across there.
Title: Re: Starting a new build
Post by: Chewy1576 on January 28, 2019, 10:19:30 AM
The board powers up and functions without it when connected to my PC through FTDI, so I guess it's okay so far. I'm going to use a voltage reg board to drop 12v down to 6-7v for system power, so maybe it won't be needed.
Title: Re: Starting a new build
Post by: hakcenter on January 28, 2019, 12:57:18 PM
If you're already filtering power somewhere else before it get's there, you're fine. But noise is bad for 5v components.