Arduino projects for auto electronics, mini ECU etc

For Automotive-related projects such as ECUs and microcontollers. For Scimitar and Sabre original equipment, please use the relevant model areas.

Moderators: scimjim, philhoward, erikscimitardemon, Roger Pennington, Lukeyboy46

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Fri May 13, 2016 10:07 pm

More notes, concerning the loom I need to make up. I want to use traditional Lucas wiring colour codes where I can, so need a shopping list. I will have to look up the colours and add them to this list.

Brake lights
Engine temperature
Gearbox temperature
Fuel pump
Fuel cutoff crash switch
Gas solenoid
Petrol solenoid
WL alternator signal
TCC lockup feed
Kickdown pull
Kickdown hold
Kickdown switch
Fuel sender to gauge
Lpg sender to gauge
Low fuel warning
Throttle position sensor
Vacuum switch

Wiring Colour Code Table

Many British designed vehicles use colour coded cables to assist in identifying the various circuits in use. This is an extract from BS-AU7a 1983 Colour Code for Vehicle Wiring, from the British Standards Institution, 2 Park St., London W1A 2BS.

(Note that these colour codes may not apply directly to older cars. For example, the wipers on cars up to 1980 (at least) are not on a separate fuse circuit, so they are not orange, but green. Check the schematic for your car to be certain. - cak)
MAIN TRACER PURPOSE
Black All earth connections
Black Brown Tachometer generator to tachometer
Black Blue Tachometer generator to tachometer
Black Red Electric or electronic speedometer to sensor
Black Purple Tempreature switch to warning light
Black Green Relay to radiator fan motor
Black Light green Vacuum brake switch or brake differential pressure valve to warning light and/or buzzer
Black White Brake fluid level warning light to switch and handbrake swith, or radio to speakers
Black yellow Electric speedometer
Black Orange Radiator fan motor to thermal switch
MAIN TRACER PURPOSE
Blue Lighting switch (head) to dip switch
Blue Brown Headlamp relay to headlamp fuse
Blue Red Dip switch to headlamp dip beam fuse
Fuse to right-hand dip headlamp
Blue Light green Headlamp wiper motor to headlamp wash pump motor
Blue White a) Dip switch to headlamp main beam fuse
b)Headlamp flasher to main beam fuse
c)Dip switch main beam warning light
d)Dip switch to long-range driving light switch
Blue Yellow Long-range driving light switch to lamp
Blue Black Fuse to right-hand main headlamp
Blue Pink Fuse to left-hand dip headlamp
Blue Slate Headlamp main beam fuse to left-hand headlamp or inboard headlamps when independently fused
Blue Orange Fushe to right-hand dip headlamp
MAIN TRACER PURPOSE
Brown Main battery lead
Brow Blue Control box (compensated voltage control only) to ignition switch and lighting switch (feed)
Brown Red Compression ignition starting aid to switch
Main battery feed to double pole ignition switch
Brown Purple Alternator regulator feed
Brown Green Dynamo 'F' to controlboxl 'F'
Alternator field 'F' to control box 'F'
Brown White Ammeter to control box
Ammeter to main alternator terminal
Brown Yellow Alternator to 'no charge' warning light
Brown Black Alternator battery sensing lead
Brown Slate Starter relay contact to starter solenoid
Brown Orange Fuel shut-off (diesel stop)
MAIN TRACER PURPOSE
Green Accessories fuesed via ignition switch
Green Brown Switch to reverse lamp
Gree Blue Water temperature gauge to temperature unit
Green Red Direction indicator switch to left-hand flasher lamps
Green Purple Stop lamp switch to stop lamps, or stop lamp switch to lamp failure unit
Green Light green Hazard flasher unit to hazard pilot lamp or lamp failure unit to stop lamp bulbs
Green White Direction indicator switch to right hand flasher lamps
Green Yellow Heater motor to switch single speed (or to 'slow' on tow- or three-speed motor)
Green Black Fuel gauge to fuel tank unit or changeover switch or voltage stabilizer to tank units
Green Pink Fuse to flasher unit
Green Slate a)Heater motor to switch ('fast' on two- or three-speed motor)
b)Coolant level unit to warning light
Green Orange Low fuel level switch to warning light
MAIN TRACER PURPOSE
Light green Instrument voltage stabilizer to instruments
Light green Brown Flasher switch to flasher unit
Light green Blue a)Flasher switch to left-hand flasher warning light
b)Coolant level sensor to control unit
c)Test switch to coolan level control unit
Light green Red Fuel tank changeover switch to right-hand tank unit or entry and exit door closed switch to door actuator
Light green Purple Flasher unit to flasher warning light
Light green Green Start inhibitor relay to change speed switch; or switch to heater blower motor second speed on three-speed unit
Light green White Low air pressure switch to buzzer and warning light
Light green Yellow Flasher switch to right-hand warning light; or differential lock switch to differential lock warning light
Light green Black Front screen jet switch to screen jet motor
Light green Slate Fuel tank changeover switch to left-hand tank unit; or entry and exit door open switch to door actuator
Light green Orange Rear window wash switch to wash pump; or cab lock-down switch to warning light
MAIN TRACER PURPOSE
Orange Wiper circuits fused via ignition switch
Orange Blue Switch to front screen wiper motor first speed timer or intermittend unit
Orange Green Switch to front screen wiper motor second speed
Orange Black Switch to front screen wiper motor parking cicuit, timer or intermittent unit
Orange Purple Timer or intermittent unit to motor parking circuit
Orange White Timer or intermittent unit to motor parking circuit
Orange Yellow Switch to headlamp or rear window wiper motor feed, timer or relay coil
Orange Light green Switch to headlamp or rear window wiper motor parking circuit timer or relay coil
Orange Pink Timer or relay to headlamp or rear window wiper motor feed
Orange Slate Timer or relay to headlamp or rear window wiper motor parking circuit
Pink white Ballast terminal to ignition distributor
MAIN TRACER PURPOSE
Purple Accessories fed direct from battery via fuse
Purple Brown Horn fuse to horn relay when horn is fused separately
Purple Blue Fuse to heated rear window relay or switch and warning light
Purple Red Switches to map light, under bonnet light, glove box light and boot lamp when fed direct from battery fuse
Purple Green Fuse to hazard flasher
Purple Light green Fuse to relay for screen demist
Purple White Interior lights to switch (subsidiary circuit door safety lights to switch)
Purple Yellow Horn to horn relay
Purple Black Horn to horn relay to horn push
Purple Pink Rear heated window to switch or relay
Purple Slate Aerial lift motor to switch up
Purple Orange Aerial lift motor to switch down
MAIN TRACER PURPOSE
Red Main feed to all circuits mastered by sidelamp switch
Red Brown Rear fog guard switch to lamps
Red Blue Front fog lamp fuse to fog lamp switch
Red Purple Switches to map light, under bonnet light, glove box light and boot lamp when sidelamp circuit fed
Red Green Bulb failure unit to right-hand-side and rear lamps
Red White a)Sidelamp fuse to right-hand side and rear lamps
b)Sidelamp fuse to panel light rheostat
c)Fuse to panel light switch or rheostat
d)Fuse to fibre optic source
Red Yellow Fog lamp switch to fog lamp or front fog fuse to fog lamps
Red Blakc Left-hand,sidelamp fuse to side and tail lamps and number plate illumination
Red Pink Sidelamp fuse to lighting relay
Red Slate Lamp failure unit to lef-hand side and tail lamps
Red Orange Fusebox to rear fog guard switch
Slate Window lift main lead
MAIN TRACER PURPOSE
White Ignition switch or starter solenoid to ballast resistor
White Brown Oil pressure switch to warning light or gauge, or starter relay to oil pressure switch
White Blue Choke switch to choke solenoid (unfused) and/or choke to switch to warning light, or electronic ignition distributor to drive resistor
White Red Starter switch to starter solenoid or inhibitor switch or starter relay or ignition (start position) to bulb failure unit
White Purple Fuel pump no 1 or right-hand to changeover switch
White Green Fuel pump no 2 or left-hand to changeover switch
White Light green Start switch to starter interlock or oil pressure switch to fuel pump or start inhibitor switch to starter relay or solenoid
White Yellow Ballast resistor to coil or starter solenoid to coil
White Black Ignition coil contact breaker to distributor contact breaker, or distributor side of coil to voltage impulse tachometer
White Pink Ignition switch to radio fuse
White Slate Current tachometer to ignition coil
White Orange Hazard warning lead to switch
Yellow a)Overdrive
b)Petrol injection
c)Door locks
d)Gear selector switch to start


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Mon Jul 04, 2016 8:09 pm

A little progress to report.

I have had a temperature gauge running from the gearbox for 1000 miles. Maximum temperature seen was 90C but typical unstressed temperature hovers around 70C.

A temporary brake inhibit has been connected up with a relay across the brake switch contacts. With brake lights off, it earths via the bulbs and allows 12V to the TCC. Press the brake shorting out the relay makes it drop out of course.

Mercedes S class MAP sensor has arrived. Helpfully, Mercedes have had the label marked with the pinout, so that was handy. Connected it up on the bench and I see a 1V swing for various levels of suck and blow!

Decided that TCU wiring will have a base colour not currently in use, so grey, yellow or pink is then available to connect everything up.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
toomanysabres
RIP
Posts: 5381
Joined: Sun Nov 12, 2006 2:27 pm
Location: Leatherhead
Has thanked: 14 times
Been thanked: 88 times

Re: Arduino projects for auto electronics, mini ECU etc

Post by toomanysabres » Mon Jul 04, 2016 10:05 pm

Wiring colours - you should have asked me for my prettier version :D
wiring colours sorted in colour.pdf
(54.12 KiB) Downloaded 38 times
wiring colours 1.jpg
wiring colours 1.jpg (221.29 KiB) Viewed 1613 times
wiring colours 2.jpg
wiring colours 2.jpg (218.27 KiB) Viewed 1569 times


Now: '62 Sabre 4, '63 Sabre Six, '65 SE4, '00 BMW E38 740i sport.
Prev: '53 ZephyrZodiac, '64 Sabra GT, '68 Elan S3SE, Mk3 Cortina 2000GXL, Mk4 Cortina 2000 Est, 3 SE6a's, 2 SE5a, SE4a Turbo, 1800Ti.
Company: Cav SRi, Cav SRi 130, Honda Concerto 1.6 (yuk)

User avatar
toomanysabres
RIP
Posts: 5381
Joined: Sun Nov 12, 2006 2:27 pm
Location: Leatherhead
Has thanked: 14 times
Been thanked: 88 times

Re: Arduino projects for auto electronics, mini ECU etc

Post by toomanysabres » Mon Jul 04, 2016 10:15 pm

and if you dunno what's significant about the way its sorted you ain't not no electric person so keep away from dabbling jon. :mrgreen:


Now: '62 Sabre 4, '63 Sabre Six, '65 SE4, '00 BMW E38 740i sport.
Prev: '53 ZephyrZodiac, '64 Sabra GT, '68 Elan S3SE, Mk3 Cortina 2000GXL, Mk4 Cortina 2000 Est, 3 SE6a's, 2 SE5a, SE4a Turbo, 1800Ti.
Company: Cav SRi, Cav SRi 130, Honda Concerto 1.6 (yuk)

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Thu Jul 07, 2016 10:05 am

0,1,2,3,4,5,5.5,6,7,8,9,2.5


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Thu Jul 07, 2016 10:08 am

Some colour coding decided upon..

MAP sensor, kickdown switch and LPG/Petrol switch is all going to be main colour Yellow.

5V supply - Yellow Red
MAP sensor Signal - Yellow White
Ground - Black


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Thu Jul 07, 2016 2:47 pm

MAP sensor installed and plumbed.
Attachments
IMG_1828s.gif
IMG_1828s.gif (280.68 KiB) Viewed 1502 times


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Sun Jul 10, 2016 4:21 pm

I have had a meter connected to the MAP sensor for a few days now. Readings are typically .7 to .9V at idle and 1V to 1.6V during normal driving. Flooring the throttle puts it up to around 1.85V. On the overrun from 70MPH, it drops lower than idle reading to around .47V, certainly below half a Volt so it would seem that my thresholds should be .5V and 1.8V for inhibiting the clutch.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
scimjim
RSSOC Member
Posts: 35428
Joined: Sun Oct 01, 2006 10:08 pm
Location: Gloucester
Has thanked: 113 times
Been thanked: 792 times

Re: Arduino projects for auto electronics, mini ECU etc

Post by scimjim » Sun Jul 10, 2016 4:37 pm

maybe a bit lower at the top end? you don't want it locked when you need it to kick down a couple of gears.


Jim King

Current: SE5 (8Ball), TI SS1 (snotty), 1600 SS1 (G97), 1600 SS1 (C686CCR), 2.5TD SE5a (diesel 5a), 6 x random other SS1s.
Previous: SE5, 3 x SE5a, 2 x SE6a, 3 x SE6b, GTC, 2.9i GTC, 3 x 1600 SS1, 1300 SS1, Mk1 Ti Sabre, Mk1.5 CVH Sabre
Chief mechanic for: 1400 K series SS1 (Megan3), 1400 CVH EFi SS1 (Grawpy), Sabre/MX5 auto (The Flying Broomstick),
1300 SS1 (Number One) & Sarah's coupe.
CURE THE FAULT - NOT THE SYMPTOMS

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Mon Jul 18, 2016 8:07 am

Some experimentation with an original vacuum switch shows that it operates at idle only. It's quite a crude design, just a miniature Cherry microswitch operated by a piece of plastic in the vacuum chamber and restricted by a spring.

I am going to try a switching Voltage of about 1V initially for the lower end.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Thu Jul 21, 2016 10:50 pm

I have built a little Arduino test box and connected the MAP sensor with an original vacuum switch to compare switch points. It seems that the vacuum switch operates at .96V. So my guess at 1V was close.


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
philhoward
RSSOC Member
Posts: 23892
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 40 times
Been thanked: 510 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by philhoward » Fri Jul 22, 2016 6:12 am

Very close!


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Fri Jul 22, 2016 8:20 am

First software for the test box. This is just a temporary unit for checking the levels at which the switching happens. It's not complete yet, the kickdown switching has to be incorporated and then tested. I am hoping I can use the vacuum reading to trigger kickdown, rather than the physical switch. The query there is whether the vaccum stays at the required value during actual kickdown or not.


Code: Select all

/*
  Test box for MAP sensor and vacuum switch version 08:00 22/07/16
  Reads an analog input on pin 7 and switches D12 at threshold1.
 
Signal pin connected to A7 with ground and 5V fed from the Arduino. Expected Voltage range is .5V to 1.85V
Switching for TCC inhibit should be around 1V

At 1.85V the kickdown should trigger. Initial pull engagement for 500mS then hold output engaages for as 
long as Voltage is around 1.85V

D4 takes an input from the original vacuum switch to ground. This signals closing on the RED LED connected
to D3.


*/

// the setup routine runs once when you press reset:

// These constants won't change:
const int analogPin = A7;    // pin that the sensor is attached to
const int ledPin12 = 12;     // pin that the WHITE LED is attached to
const int ledPin3 = 3;       // pin the RED LED is connected to
const int ledPin6 = 6;       // pin the YELLOW LED is connected to
const int threshold1 = 240;   // an arbitrary threshold level that's about .96V
const int threshold2 = 378;   // an arbitrary threshold level that's about 1.85V
const int pushButton = 4;    // the number of the pushbutton pin
int buttonState = 0;         // variable for reading the pushbutton status


void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);

// make the pushbutton's pin an input with 20K pullup:
  pinMode(pushButton, INPUT_PULLUP);

// initialize digital pins as outputs.
  pinMode(12, OUTPUT);
  pinMode(3, OUTPUT); 
  pinMode(6, OUTPUT);
}


void loop() {

// read the value of the potentiometer:
  int analogValue = analogRead(analogPin);

  // if the analog value is high enough, turn on the LED:
  if (analogValue > threshold1) {
    digitalWrite(ledPin12, HIGH);
  } else {
    digitalWrite(ledPin12, LOW);
  }

  // print the analog value:
  Serial.println(analogValue);
  delay(1);        // delay in between reads for stability


   // read the state of the pushbutton value:
  buttonState = digitalRead(pushButton);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin3, LOW);
  } else {
    // turn LED off:
    digitalWrite(ledPin3, HIGH);
  }


}


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
AJL Electronics
RSSOC Member
Posts: 7382
Joined: Fri Oct 17, 2008 8:49 pm
Location: Gloucester
Has thanked: 40 times
Been thanked: 203 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by AJL Electronics » Fri Jul 22, 2016 8:46 am

Testbox.JPG
Testbox.JPG (193.01 KiB) Viewed 1320 times


Yes, we can mend your Scimitar!
Order your Scimitar parts any hour of the day at http://www.classicmicrocars.com (member's discounts).

Fancy a holiday in Gael, France? http://www.ianrhu.com

There is no point trying to teach a pig to sing. It doesn't work and it annoys the pig.

User avatar
philhoward
RSSOC Member
Posts: 23892
Joined: Tue Aug 29, 2006 5:41 pm
Location: Staffs, UK
Has thanked: 40 times
Been thanked: 510 times
Contact:

Re: Arduino projects for auto electronics, mini ECU etc

Post by philhoward » Fri Jul 22, 2016 8:55 am

I'd leave kickdown to the switch - the last thing you want is it going into kickdown if just pushing up a hill?

What you could look at is possibly invoking kickdown if the road speed is increasing yet you're at high vacuum to increase engine braking going downhill for example (assuming it doesn't do this already)? The DSG in my daily does this.


Phil Howard
Scimitarweb Forum Admin
SS1 1600 Rooster Turbo; Sabre Mk1.5, Sabre Mk2
Previous: SE5/5a/SS1 No.1/SS1 Rooster/SS1 1800Ti/SE5a 24 Valve
http://www.ss1turbo.com
Never try and argue with an idiot. They drag you down to their level, then beat you based on experience.

Post Reply

Return to “Automotive Electronics”