Notices
Drivetrain Gearbox, Diffs & Driveshafts etc

DIY EBC for £10 up and running successfully - circuit and code here

Thread Tools
 
Search this Thread
 
Old 20 January 2002, 09:19 AM
  #1  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Please see the end of the thread for up to date circuit and code.

http://www.i-club.com/forums/showthr...hreadid=137309

There is also some discussion of this on I-club - please have a read here also.

[Edited by john banks - 1/28/2002 5:54:23 PM]
Old 20 January 2002, 11:02 AM
  #2  
James_PowerMad
Scooby Regular
 
James_PowerMad's Avatar
 
Join Date: Dec 2001
Posts: 89
Likes: 0
Received 0 Likes on 0 Posts
Post


Good one John,

So, is there any way you can publish a response curve? :-)

I guess that it takes about 1 sec (possibly less) to spool from 0 psi to 18 psi. This is a change in the sampled pressure value of about 205-116 = 89. Which equates to a change of about 6, for each time that a new sample is taken.

This is quite low on the scale for the derivative calculation... Would you consider trying X(n) - X(n-2) type of thing to magnify this difference (current value - value before last)?

This may make the control more accurate in terms of resolution, but will increase the loop delay very slightly.

Possibly worth a try, but if its working well as it is, then maybe best to leave it be.

Also, this max duty-cycle thing... Is this to stop trying to turn the solenoid off for a very small period? If so, then can't you just set a rule to leave the solenoid fully on in this case (possibly faster spoolup)?

Anyways, I am certainly going to try making one of these myself, although I may try to use a more generic microcontroller, and stick to my native language!

Old 20 January 2002, 04:55 PM
  #3  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

I may try n-2 derivatives.

No way to publish a curve yet unless I get a laptop. I may borrow one at some point.

Max duty cycle of about 95% in case the solenoid doesn't like a duty cycle of 100% - some apparently overheat. Does anyone know?
Old 21 January 2002, 01:07 PM
  #4  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Back to the top in case you haven't seen it over the weekend.

Can the solenoid handle 100% duty cycle without overheating?

Is it safe to run maximum duty cycle on a TD04L at the top end if the resulting boost is OK? Is there any harm done by having the wastegate closed - ie max duty cycle?

Could my actuator be making my boost drop more than other similar cars at the top end - I am below 1.2bar even at 4000rpm, but some cars hold this until 5000rpm with similar exhausts?
Old 22 January 2002, 10:23 PM
  #5  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Cool

Back to the top.

Anyone else got any ideas? There must be some more process control or electronic engineers out there who could chip in with a thought or two?

Also see parallel thread on I-club. http://www.i-club.com/forums/showthr...hreadid=137309
Old 22 January 2002, 11:33 PM
  #6  
Cosie Convert
Scooby Regular
 
Cosie Convert's Avatar
 
Join Date: Nov 2001
Posts: 836
Likes: 0
Received 0 Likes on 0 Posts
Post

John

I have laid my hands on a portable scope if there is anything you would like to monitor whilst the car is under load.
From one of the i-club threads I noticed someone had found solenoid duty cycles lower than expected.
Personally, I'm going to check my injector duty cycle as I adjust the boost pressure.
Do you know the output from the air flow meter ? Is it just a voltage ?
I'll have the use of the scope for a few weeks, any use, let me know.

Andy
Old 23 January 2002, 08:52 AM
  #7  
EMS
Scooby Regular
 
EMS's Avatar
 
Join Date: Jan 2002
Posts: 500
Likes: 0
Received 0 Likes on 0 Posts
Post

It´s not necessary to check the injector DC on MY99 and MY00 models. These are able to "give" enough fuel for 300+ BHP. The TD04L though is not able to supply enough air. (I run at 85% DC at 7.000 rpm with std. injectors, with uprated fuel pump and producing 310 - 320 BHP)

The MAF is sending out a voltage.

Mark Verhoeven.

[Edited by EMS - 1/23/2002 8:53:29 AM]

[Edited by EMS - 1/23/2002 2:30:42 PM]
Old 23 January 2002, 11:11 AM
  #8  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

CC's car is a MY95 R or RA though Mark , so he has a small intercooler, TD05, >17 PSI high up and possibly smaller injectors.

For solenoid duty cycles, on I-club they are about 65% and do not go higher during spool up. No wonder it is slow out the box combined with a floppy actuator!

My fuel injector duty cycle will be fine as you say.
Old 23 January 2002, 02:31 PM
  #9  
EMS
Scooby Regular
 
EMS's Avatar
 
Join Date: Jan 2002
Posts: 500
Likes: 0
Received 0 Likes on 0 Posts
Post

Sorry John,

I forget to mention the MY. (I editted my previous post)

Mark Verhoeven.
Old 23 January 2002, 03:03 PM
  #10  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Mark when the weather and I are better I am going to tweak my actuator and try and achieve the boost values you recommended.
Old 23 January 2002, 05:13 PM
  #11  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

http://www.i-club.com/forums/attachm...postid=1401668

Now with full PID control.

Only RPM and boost map to add now.

Comments/criticisms as always welcome.
Old 25 January 2002, 07:54 PM
  #12  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

There is a chap on I-club who is talking about knocking these up with surface mount technology on a board smaller than a credit card with an RS232 interface and software on a Palmtop to program the thing, from which you would be able to toggle self learn mode, change duty cycles and Kp Ki and Kd. We might put in a MAP modifier too

Think I'm going to go for a Maxim 4427CPA as the solenoid driver for safety and ease of use.

http://www.i-club.com/forums/showthr...9&pagenumber=3

see here for more.

I expect it would be pretty inexpensive. You will certainly not be paying for the concept or the code, just the bits and overheads.

It would be a self configure thing and there would be no warranty

[Edited by john banks - 1/25/2002 7:57:23 PM]
Old 28 January 2002, 04:57 PM
  #13  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Question

John,

I have to say a very large well done on what you have achieved so far.

Are you still going to leave your original design and code in the public domain if this commercial venture goes ahead?

Andrew...
Old 28 January 2002, 05:18 PM
  #14  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

It is not going commercial. It may go onto surface mount at cost, but given the amount of time I personally have (not) don't hold your breath, and other things have resulted in some delay, but there is discussion aplenty on the I-club thread with the latest and possibly the last circuit posted yesterday (unless you want an RS232 interface) which I am soon to post. I am not very good at physically producing things to production standard, but I can make a working circuit and code. Main things to add are self learning and EEPROM programming as well as calibrating it more on the car when I get a new chip.

http://www.i-club.com/forums/showthr...9&pagenumber=3

Previous circuit image replaced as below with RS232.

[Edited by john banks - 1/28/2002 5:46:12 PM]
Old 28 January 2002, 05:45 PM
  #15  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Now with RS232 port - working circuit - apart from software not yet written to use RS232 port and RPM input - COMING SOON.



Latest code

http://www.i-club.com/forums/attachm...postid=1401668

[Edited by john banks - 1/28/2002 5:52:58 PM]
Old 29 January 2002, 11:07 AM
  #16  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Post

John,

I have been following this and the I-Club thread with great interest and am thinking of having ago myself (I have a DT006 in the post), I have been tinkering with PICs for a few months and have to admit that the AVR stuff looks a lot simpler for amateurs (especially with the DT boards and BASCOM-AVR).

Do you think that there is enough memory/time left to add the code to drive an LCD display? This is what I was going to look into once I've got the basic system working, if not then an I2C or SPI connection to a second uP should be fairly straightforward.

Is it your intention to try and keep the code down to the maximum size support by the demo version of Bascom-AVR

Andrew...

PS. Have you seen your name in lights on the Dontronics site
Old 29 January 2002, 11:16 AM
  #17  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

LCDs are VERY easy- few lines of code and PRINT statements - it is unbelievably easy. Sending data to RS232 is just PRINT statements - set up you baud rates from pull down menus at compile time!

I tried to get an LCD and keypad to fiddle but Maplin did not have any.

Come to think of it the full version of BASCOM is only $49 - what £30! I might get it and convert to a 40pin posher chip with an extra port or two.
Old 29 January 2002, 02:56 PM
  #18  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Post

John,

I thought it was AUD135 ~ GBP50, still, very reasonable.

The adavantage of sticking with the demo version is that your project will be attractive to many more people given the minimal startup costs.

The RS232 stuff will be useful to me as I have an old laptop in the car already (used as a MP3 player).

Andrew...
Old 29 January 2002, 03:08 PM
  #19  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

yeah my mistake - converted it from USD to GBP thinking it was A$ or something.

I will try and keep it within the confines of the demo version. A guy on I-club is converting it to PIC 16F877 IIRC.
Old 29 January 2002, 05:32 PM
  #20  
Scott.T
Scooby Regular
iTrader: (2)
 
Scott.T's Avatar
 
Join Date: Feb 2000
Location: East Sussex
Posts: 6,181
Likes: 0
Received 1 Like on 1 Post
Post

John,

Got totally confused by all the posts relating to this EBD for a tenner subject.

So John, what do I really need to build up one of these EBC's for an MY94 and does it really only cost £10 ?
Old 29 January 2002, 06:15 PM
  #21  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Yes it could cost £10 but if you want flasher features maybe £20. Give us some time yet.... still being developed!
Old 29 January 2002, 07:56 PM
  #22  
Scott.T
Scooby Regular
iTrader: (2)
 
Scott.T's Avatar
 
Join Date: Feb 2000
Location: East Sussex
Posts: 6,181
Likes: 0
Received 1 Like on 1 Post
Post

O.K John, mail me when nearer completion.

Cheers...
Old 31 January 2002, 10:25 PM
  #23  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Right guys. Need your help understanding MOSFETS.

I want to cut the ECU solenoid supply wire and ground it via a 10K. That bit is fine.

Then I want to make a circuit that sources 12V when I feed it 5V logic input active HIGH.

So NPN doesn't work as it sinks current and would switch the ground. PNP doesn't work as it is active high.

What sort of MOSFET do I need - is it P-channel and can I get it to switch the positive supply of the solenoid?

Thanks very much!

It looks like we will be able to do away with both the 4427 solenoid driver chip if we do this, and also might not need the RS232 driver as Wac says that modern RS232 works on 5V/0V rather than +12V/-12V. So hopefully we will be just the microcontroller 28pin chip with a few resistors and capacitors here and there and two 8 pin headers for interfacing to the outside world - on the combined programming port for the code and RS232 and the other for the ECU signals, solenoid output and 5 and 12V supplies and ground.
Old 31 January 2002, 11:46 PM
  #24  
paulwadams_my99
Scooby Regular
 
paulwadams_my99's Avatar
 
Join Date: May 2001
Posts: 488
Likes: 0
Received 0 Likes on 0 Posts
Post

r u sure u r a doctor of medicine ???
Old 02 February 2002, 10:59 AM
  #25  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Post

John,

Why not use a purpose made solenoid driver? There is some info about driving solenoids here.

I'm don' know a lot about electronics, I just fumble around using examples, but, I though you needed a voltage higher than that which you were switching to switch a mosfet which is why mosfet drivers such as the MAX4227 were used, in this case were not switching a great deal of power so the driver is all we need?

I think I have probably missed something so I'll get my coat.

Andrew...
Old 02 February 2002, 11:10 AM
  #26  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Thanks for the link - it is one I had ploughed through previously. In fact the solenoid as wired in the car is switching the ground wire and the +12V is always connected so I was mistaken. It will work fine with an NPN darlington transisitor as originally configured or a P-channel MOSFET. I can easily change whether it is active low or high in software.

Don't want to use a 4427 or big transistor long term as we are trying to get it onto surface mount boards smaller than a credit card.

[Edited by john banks - 2/2/2002 11:14:03 AM]
Old 04 February 2002, 03:14 PM
  #27  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

Now running low side drive on the solenoid as the ECU does it with a TIP127 transistor. Code is running full PID control very succesfully with the best boost control I have ever witnessed although I say so myself - I got some good settings yesterday and it flies up to 18PSI and just sits there until it tapers.

Need to read RPM signal now!
Old 20 February 2002, 03:20 PM
  #28  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Post

John,

How are you getting on with the RPM code?

Last I heard you were going to try using the ACI and Timer0 is this still the plan?

Andrew...
Old 20 February 2002, 05:47 PM
  #29  
john banks
Scooby Regular
Thread Starter
 
john banks's Avatar
 
Join Date: Nov 2000
Location: 32 cylinders and many cats
Posts: 18,658
Likes: 0
Received 1 Like on 1 Post
Post

I've not had time, but I will need to use the first timer (8 bit) with an interrupt on overflow and a wraparound counter to make it say software 16 bit.

Also thinking of a system of running at say 50,60,70,80% duty cycles across the range and storing the boost achieved - these will then be useful for targetting boost and keeping the user interface simple.
Old 20 February 2002, 11:42 PM
  #30  
AndrewC
Scooby Regular
 
AndrewC's Avatar
 
Join Date: Jul 2000
Location: Lancashire
Posts: 2,209
Likes: 0
Received 0 Likes on 0 Posts
Post

John,

Using timer0 with prescaler of 64 should give enough resolution to capture 500-8000RPM @ 8Mhz, I don't see the need to use the overflow interrupt and code a counter? (unless you're externally clocking the timer to capture the RPM pulse, in which case you can't use the prescaler.)

I have written some code using the ACI and timer0 and will try it in the car this weekend hopefully, with an LCD attached it is simply a digital Boost and RPM gauge.


Quick Reply: DIY EBC for £10 up and running successfully - circuit and code here



All times are GMT +1. The time now is 06:04 PM.