Arduino development board

This is a place for us to share progress on and upgrades to our vw diesels.

Moderator: Fatmobile

Post Reply
Fatmobile
Global Moderator
Posts: 7564
Joined: Wed Oct 30, 2002 10:28 pm
Location: north central Iowa

Arduino development board

Post by Fatmobile »

Most of us drive these old diesels because they don't require any electronics hooked up to make them run.
But there are times when it would be nice to hook up to an engine analyser or computer and see how everything is running.
I've started playing with the Arduino stuff last winter, didn't do much with it over the summer, tried to understand how to program it.

I see there is a guy over on the GTD forum that is working on an Arduino VNT turbo controller.
http://dmn.kuulalaakeri.org/vnt-lda/
A little over my head so I'll learn alot from it.

I'd like to build a diesel engine analyser, using an injector pulse detector and a refelctive sensor on the flywheel.

These boards are getting more popular with people who like to build things themselves.

I'm wondering how many people on here have experience with the Arduino.

I really don't know what I'm doing but this is the sketch (program) I'm working on:
/*
* Finds time from TDC1, TDC2 and Peaktime and calculates BTDC.
* First it looks for a LOW on the pulse detector to trigger a start. It starts counting and looks for a LOW on the TDC sensor. TDC1 stores the timing of the event.
* Then it looks for the second TDC LOW which gets stored in TDC4.
* The pulse comes before TDC1.
*/

long btdcCalc (int a);
int tdcCalc (int a);
const int pulsePin = 1; // digital pin 2, referred to as interupt pin 0, connected to the injector line pulse detector
const int tdcPin = 3; // digital pin 3, referred to as interupt pin 1 connected to flywheel TDC sensor
int a; //for loop variable
long pulseStart; //holds the time the flywheel sensor goes low.
long microsecrotate; //used to calculate RPM
unsigned long TDC4; //TDC on cyl 4, 1 on flywheel sensor, 0 on sprocket sensor
unsigned long TDC1; //TDC on cyl 1, 1 on flywheel sensor, 1 on flywheel sensor, both HIGH

int rpmX; //The X axis on the graph
int tdcY; //The Y axis on the graph

void setup()
{
Serial.begin(9600);
pinMode(pulsePin, INPUT);
pinMode(tdcPin, INPUT);
attachInterrupt(0, btdcCalc, FALLING); //interrupt connected to pin2 injector line pulse detector
void btdcCalc(){
pulseStart = micros ();
}
attachInterrupt(1, tdcCalc, FALLING) //interupt attached to pin3 flywheel laser sensor
void tdcCalc(){
if (TDC1 == 0 && pulseStart != 0) // if the flywheel triggers was it cylinder 1 or 4
{TDC1 = micros} // 1 triggers right after the pulse
else if (TDC1 != 0 && pulseStart != 0)
{TDC4 = micros}
}
}

void loop()

{
if (pulseStart != 0 && TDC1 != 0 && TDC4 != 0) //if all the sensors have stored data in the variables start the math process
{
(TDC1 - TDC4) = microsecrotate // Subtracts the starting event TDC4, from the final event TDC1, finding the microsecs per revolution
rpmX = (60000000 / microsecrotate) //60 million micro seconds divided by the total time between events gives us the RPM

tdcY = ((TDC1 - pulseStart) / ((TDC1-TDC4) / 360)) // The timing pulse happens how many degrees before TDC1? BTDC
}
pulseStart = 0 //clear these variable so we know if they have been triggered
TDC1 = 0
TDC4 = 0
}
Any tips would surely be appreciated.
'91 Golf gasser converted to a 12mm pump, M-TDI.
'84 1.6TD Rabbit with a VNT-15 turbo, still setup to run on vegetable oil.
'84 GTI with 1.7TD pistons and intercooled.
2003 TDI wagon
2000 TDI Jetta.
surfcam
Turbo Charger
Posts: 1482
Joined: Tue Sep 28, 2004 8:43 pm
Location: Canada Southern Alberta
Contact:

Re: Arduino development board

Post by surfcam »

I also see the poteinal of some computer controls. I though a diesel timing light would be niece that didn't cost $300. Their is a big Arduino user group and I did come across a knock sensor hooked to a Arduino.
http://arduino.cc/en/Tutorial/KnockSensor
My problem is to hook this to a timing light. I did see one hooked up to a gas engine knock sensor. I posted this on this forum about 3 years ago. I did get some interest from Vince and others. Who said," they would look at it went they have time." Well I really can't blame anybody for not looking into my priorities when they have all their priorities of their own, family, work, etc.
So since I was starting from zero. I desided to buy the A+ certification manual. It's certification for computer repair. The computer I'm typing this reply on was a throw away that I fixed for free. It's a dual core 2.6Gigs that's fit's my needs. It would be niece to get some help with programing but their's probably way more of it going on at other forums that cater to that. There's also alot of training for free on the net. I'm thinking Linx would be a good place to start.
99 TDI Jetta (Z1 engine code)
94 Grand Caravan
89 Dodge Gold Stream B class
http://www.antiquedollhouseofpatterns.ca/
Fatmobile
Global Moderator
Posts: 7564
Joined: Wed Oct 30, 2002 10:28 pm
Location: north central Iowa

Re: Arduino development board

Post by Fatmobile »

I really need to learn how to run my laptop on linux too. XP won't last much longer.
The local phone company just tried using a sudden policy change to burn me for a $35 reconnect fee.
They didn't get away with it but I'll need to teach them a lesson. I'm on dialup and it's time to get rid of the phone co.
So many communication changes/upgrades scheduled for me soon.
That's another project.

I have a pulse detector that I took apart. I takes the pulse from the piezo pulse detector and runs it through a PIC chip.
Those chips can be programmed so many ways, you really don't know what each pin is being used for.
But I did find the pin that triggers the transister that fires the coil that is used to pulse the timing light.
The Arduino might be able to read a pulse from the actual injector line sensor much like a knock sensor, both piezo.
So there are many upgrade steps that can be made in the future, that will make it smaller.
It should provide a good clear signal change for the Arduino.

I also found a laser tach and took it apart. Found the signal that goes to the interupt pin. Signaling that a reflective surface has been detected. It works when used with an LED/resistor.
I'll use these for inputs.
What I want to see when done is a graph of the timing curve.
Hopefully be able to plot other curves too.

I know there are better sites to learn arduino but doing it here might help others on here learn how.
We have the build it yourself mentality, bound to be someone else who is working with them,.. and others on here who would like a simple explanation and example to get them started on something they had never thought of trying before.
'91 Golf gasser converted to a 12mm pump, M-TDI.
'84 1.6TD Rabbit with a VNT-15 turbo, still setup to run on vegetable oil.
'84 GTI with 1.7TD pistons and intercooled.
2003 TDI wagon
2000 TDI Jetta.
surfcam
Turbo Charger
Posts: 1482
Joined: Tue Sep 28, 2004 8:43 pm
Location: Canada Southern Alberta
Contact:

Re: Arduino development board

Post by surfcam »

I've installed linx on three computers so far. I can't write any code so I would think just about anybody can do it. You first have to go into your computer change it so it will boot from a usb. Then you load the a boot program and linx program you want to run. Mint is the more like Windows that any of the operating systems. I tryed Ubunta on my latest PC. It's supported longer with patches. There's lot of instructions on this to be had on linx forums. You can even just load the program on a stick and try the program out. The problem that you can run into some times is to load some program requires using the terminal and putting some code in. It would be best if a person had two computers so you could go on line if you have any trouble. There's an office program and a lot of other programs as well in the user group.
99 TDI Jetta (Z1 engine code)
94 Grand Caravan
89 Dodge Gold Stream B class
http://www.antiquedollhouseofpatterns.ca/
Post Reply