www.gt4dc.co.uk
Maintain, Modify and DRIVE your GT-Four


It is currently Sat Apr 27, 2024 8:56 pm




Post new topic Reply to topic  [ 116 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject:
PostPosted: Sat Dec 08, 2012 11:33 pm 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
Another circuit update.

Added trigger input circuits. Threshold voltage set from D-A driven via I2C to allow variable threshold from RPM. Small amount of hysteresis to remove noise. Decided to ignore G2 as it's not needed. It's also reverse polarity so more difficult to sense. This frees up PA4 as a knock window output to new knock circuit (if I go that way)

Added power supply section. Power for signal section fed via chokes to reduce spikes / interference.

Re-jigged I/O for I2C as a bit of cross checking shows this is not programmable on the dspic and is on different pins to the PIC32. This means I can't use the PIC32 in this design unless I live with software I2C and software timers for injector pulses. Not a huge problem as 28 pin PIC32 doesn't support CAN and I want to go this way, possibly as the means of communicating with PC. (standard OBD 2 + enhancements for map download)


http://www.cdd.co.uk/stuff/ECU_schC.pdf

Still to do on circuit:

Sort out connector(s)
Re-jig knock sensor interface (maybe)
CAN circuitry.
USB interface. (I have sample module now. need to test)
Final check over.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 09, 2012 12:05 am 
Offline
Group N
User avatar

Joined: Fri Mar 30, 2012 8:31 am
Posts: 332
Location: Wiltshire
Car Model: ST205
I am sure this is / or will be covered, but what about ECU / or ECU input failure protection?
For example, what happens when an input fails, or indeed the ECU itself fails, what safeguards are there to protect the engine from a catastrophic Oops?

What would make this a "must have" is an early warning system detecting abnormal conditions. I do not know enough to comment on the details, but seems the way forward????

_________________
[color=#000080]ST205 WRC 1994
Hybrid turbo
Apexi AVC-R
Apexi Power FC (Not being used ATM)
Apexi Power commander (Not being used ATM)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 09, 2012 12:40 am 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
A very good point Phil, and one that is often forgotten.

There are various levels of failsafe implemented, varying from 'tough *bleep*' at the bottom end up to multi-systems with majority voting as used in the aerospace industry. Obviously there is a trade off between cost and reliability.

For 'commercial applications' where no lives are at stake, it is normal to produce equipment varying from 'tough *bleep*' (usually the old fashioned analogue / dedicated logic) up to a reasonable level of cross-checking and fault detection in software with appropriate diagnostic information available and 'fallback modes' to allow reduced but safe operation.

For example, the standard ECU will cross check that it sees roughly the right level of noise above 3K RPM from the knock sensor. If it doesn't, it flags the fault and alerts the user by lighting the engine light, and then drops into a 'safe mode' which retards the timing to a safe margin and cuts boost to minimum.

There are some things that can't be checked without building in extra sensors or even backup / cross checking systems. For example, if the distributer comes loose and turns, retarding the trigger signals to the ECU, it will have no way of knowing. The engine will then go very sluggish and run very hot, especially the turbo.
As regards ECU failure, depends which bit. Failure of an input would just appear to the software as a sensor fault would. Failure of an output would cause an item not to work or run constantly. These are unlikely to cause massive damage without the user noticing a problem. e.g. fan not working leading to overheating, intercooler pump not coming in leading to high charge temps.
Failure of the processor itself is likely to lead to the engine just stopping fairly instantly. As regards software crash, the processors have 'watchdogs' built in. Basically, it's a timer which the software regularly 'resets' with a special command. If the timer runs out, the processor is reset. Careful software writing and placements of the 'kick' command ensure that any software crash results in a reset within a second.

The aftermarket ECU's I've encountered (not many) do very little in terms of fallback / limp home / safe modes. I'm planning to do as much as possible, more than the standard ECU in fact.

The checks I'm particularly planning for safety (there will be many more):

Missing a trigger signal - There are 2 trigger signals to cross check against each other and also against an expected time based on current RPM. A discrepancy will be noted and ignition will be cut until re-synchronised (2 revolutions max.) to provent potential large timing error.

Checking wideband against expected AFR and warning / cutting back if it goes weak on boost.

Checking coolant and intake temps and warning / cutting back if they get too hot.

Checking MAP sensor against TPS and flag if a discrepancy (e.g. Boost with closed throttle or no boost with big throttle).

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 09, 2012 2:41 am 
Offline
Club Staff
User avatar

Joined: Thu Jul 14, 2005 12:44 pm
Posts: 4067
Location: drinking devil fuel
Car Model: ST205
If you have rtc functionality then you could sanity across temp sensors. Eg engine off for 2 hours expect air and water temps to be consistent


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 14, 2012 1:17 pm 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
It's starting to look like ongoing supply of the original ECU plugs is far from certain, even if I'm able to get any. I'm starting to look at alternatives.

The first ones that spring to mind are standard 'D' plugs. Readily available from virtually any electronics shop anywhere in the world. Available as PCB mount, cable mount in solder bucket or crimp, IDC ribbon cable mount. Available with good quality thick gold plating down to cheap & nasty. The main limitation is that mostly the contacts are typically only rated to 5A each so I'd be looking at something else for injector drives & power supply.
I will also look very hard at the option of leaving holes available to fit either type of connector which strikes me as the best of both worlds.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 16, 2012 7:15 pm 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
Finally got a provisional circuit design finished ready to start PCB layout. Clocked up about 30 hrs so far, mostly researching devices I haven't used before (pic24/32 family, can bus, usb,knock chip) and searching for new devices where I think there's a hole in the market (e.g. multiple output drivers in 1 chip, self protecting with more welly than the 1/2A ULN2803/2003)

http://www.cdd.co.uk/stuff/ECU_schD.pdf

I decided to go for the dedicated knock chip, and since it has support for 2 knock sensors it seemed silly not to add the facility.

I have gone for D type connectors as I'm not happy with availability of the stock ECU type. The power earths will connect via a separate 2 pin power connector. When I lay the board out, I will add holes for the original connectors so that I have the facility on my own ones or if required for others. The 185 version will need a pew pins cutting & linking with wire inside the ECU. It seemed a good compromise as it saves me getting bogged down catering for a limited market.

I haven't added RTC functionality as this would mean splitting the supply leaving one of the processors powered up with the ignition off. Can open a whole new can of worms unless care is taken. For the marginal gain of being able to double check a few sensor values it doesn't seem worth the grief. As I've already said, I'm not looking to design the best ECU in the world.

There are a few component values which need to be finalised, mainly resistors, which don't affect the board layout.

Next step is to look for a generic box to stick it in so I can set the board size & shape. The plan is to make it so it can also fit a standard denso ECU housing.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 16, 2012 8:29 pm 
Offline
Group N

Joined: Tue Oct 04, 2011 6:40 pm
Posts: 215
Location: Axminster
Car Model: None
I'm keeping a close eye on this chis! It must have taken you ages to get this far.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 16, 2012 8:46 pm 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
supersan23 wrote:
I'm keeping a close eye on this chis! It must have taken you ages to get this far.


About 30 hours :lol:

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 17, 2012 1:11 am 
Offline
Group N
User avatar

Joined: Sat Apr 28, 2007 9:22 am
Posts: 235
Location: Central Dorset
Car Model: None
Good call on the knock sensing

_________________
--

Darryl


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 28, 2012 7:45 pm 
Offline
Junior WRC

Joined: Fri Jan 29, 2010 10:39 pm
Posts: 514
Location: Bournemouth
Car Model: ST205
Any updates?

_________________
St205 WRC - Running sweet.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 29, 2012 1:02 am 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
Spent a few hours xmas day starting the PC softwareto allow map editing & ecu interface. Will upload another day.

Spent a couple of hours today until Daryl turned up getting to work on the PCB layout.

First step is to draw PCB outline and lay the components in place, starting with the position critical ones (connectors, Power transistors for heatsinking). This is the stage where experience is critical to minimising the difficulty in routing the tracks. It's also critical to separate sensitive tracks & components from high power stuff to avoid interference.

Next is to lay in power tracks as these are large and in some cases routing is critical (power supplies to chips should be gridded or done as power planes on multilayer board).

I've started laying in some of the tracks, partly to look at the feasability of using a double sided PCB only and still managing to get some decent groundplane where needed. If it all gets a bit much I'll resort to multilayer with powerplanes in the middle. Time will tell.

In the picture, red tracks are on the component side of the board, blue is on the 'track side' White component pads are on both sides. The thin white lines show connections that have not been routed yet. These make it easier to pick positions for components to minimise track lengths and crossovers. Components will still get shuffled about as the layout continues but are in roughly the righ sort of place.

Image

_________________
If at first you don't suck seed, try drier grain.

Image


Last edited by Nibbles on Sun Dec 30, 2012 11:50 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 30, 2012 11:46 pm 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
Had a bit of spare time this afternoon. 5 hours of playing join the dots later and we have a provisional PCB layout.

Without main groundplane filled in (easier to see)

Image

With groundplane

Image


I've abandoned the idea of original Toyota connectors. It wasn't going to be possible to have 2 sets of connectors and retain the track widths I wanted for the outputs (too thin and they'll burn out) Also, the standard Toyota ECU has a few outputs at the far end of the connector which would have meant passing them through the signal area which I want to avoid so I don't get electrical noise problems. This decision allowed me to re-jig the pinout a little to make the track runs better.

To explain a little theory, it is convention to run tracks up/down on one side of the board and left/right on the other. This makes it easy to route tracks which cross over. The end result of this is usually loads of via holes (to connect tracks on top & bottom a hole is used - all holes are through plated in the PCB manufacture). I normally manage to position components so that most tracks can be routed using the component lead holes to go from one side to the other. This is preferable as it reduces board cost and increases reliability (through plating can fail).

In this case, the book went out of the window as I wanted to maximise groundplane (large area of solid copper, they act both as a 'screen' from radiated noise and also minimise voltage drops between common connections) using just 2 layers of copper (one each side of the board). This meant routing as much as possible as a 'single sided' board and then connecting up remaining parts on the other side, being careful not to block off groundplane.

Still a few more things to do, and then a careful double check of everything.

1. Sort out exact positions of fixing holes.
2. I'm not happy with the length of non-gridded power track from the voltage regulators. I will look at moving these away from the power area and closer to the devices they are driving. This applies particularly to the 3.3V regulator as this is also the reference voltage for the analogue inputs.

Once everything else is completed, the PCB package allows a 'component renumber'. These renumbers all the components starting with 1 at the top left. This makes it much quicker and easier to find the component space when building the PCB from a parts list.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2012 12:33 am 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
Just done a quick costing (1 off RS prices) and it comes out to £65 in components, excluding PCB (about £15 in small qty.) and box (about £20)

So my initial finger in air costing of below £100 in quantity seems pretty near the mark.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2012 12:49 am 
Offline
Group B
User avatar

Joined: Sat Sep 02, 2006 3:13 pm
Posts: 3679
Location: Bournemouth
Car Model: None
To recap final spec.

11x general purpose outputs.
4x injector outputs (High impedance or low inpedance with ballast)
4x ignition outputs (to drive igniter or coil on plug)

4x General purpose analogue inputs (0-5V)
4x Thermistor inputs (0-3.3V with pull-up)
6x General purpose Digital inputs (with 5V pull-up)
2x General purpose Digital inputs (with pull-down)
3x High speed analogue inputs (MAP,Throttle,AFM or wideband)
2x Knock sensor inputs.

1x CAN bus interface. Hopefully to include OBD2 functionality.
1x USB interface.

_________________
If at first you don't suck seed, try drier grain.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2012 2:40 am 
Offline
Group N
User avatar

Joined: Fri Mar 30, 2012 8:31 am
Posts: 332
Location: Wiltshire
Car Model: ST205
Looking good mate.

Just wondering how will it plug into an existing loom?

Loom adaptors maybe if the connectors are available?

Manually rewiring would be costly and not easy to remove if needed.

I may have missed that bit?

_________________
[color=#000080]ST205 WRC 1994
Hybrid turbo
Apexi AVC-R
Apexi Power FC (Not being used ATM)
Apexi Power commander (Not being used ATM)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 116 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next


Who is online

Users browsing this forum: No registered users and 120 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group