MickTheMechanic / Shiftlight

An opensource shiftlight project using Arduino and Neopixel products
27 stars 16 forks source link

Trying to run on a 6 cylinder #3

Open cpatersontn opened 3 years ago

cpatersontn commented 3 years ago

Mick, Thanks for posting this project. We're looking forward to getting this running on our race car. We have a 1991 BMW 325i running the 6 cylinder engine. We've built the board as you specified and uploaded a modified version of your code. We are pulling the tach signal from the ECU wire that feeds the factory in-dash tach. The factory tach is working fine so we know it's getting good signal. The engine is firing 3X per revolution so we are assuming the frequency (at a given rpm) is (RPM/60)*3. We are testing at lower RPMs (don't want to upset the neighbors with rev'ing it to redline :)) so we calculated the lower RPMs between 1500 and 3100 (75Hz-155Hz). It idles at 800 RPM.

Once we start the car, the start-up sequence works and they flash one by one and then go off. However, regardless of how high we rev it, nothing else lights up. It's like it does the start-up sequence then somewhere it gets hung-up on lighting the LEDs (0,0,0). Stumped.

Here's the modified code:

//Shift Light V1.5

include

define PIN 6 //LED Data Pin

define NUMPIXELS 16 //number of leds connected

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

//Calculate the frequency of the tacho signal you are using and adjust the following values accordingly //example: for a standard tacho signal on a 4 cylinder engine the frequeny is equal to the RPM divided by 30 const unsigned int onFrequency = 20; //startup sequence, value represents engine speed higher than cranking and lower than idle const unsigned int minFrequency = 75; // minimum frequency to begin turning on LEDs const unsigned int maxFrequency = 155; // maximum frequency in normal range, after this value shift flash will occur const unsigned int shiftFrequency = 165; // frequency range from max to shift when shifting should happen, after this value overrev flash will occur

//Set the color for each LED in the neo pixel strip //Colors are set using an RGB value ranging from (0,0,0) to (255,255,255) const uint32_t tachColor[NUMPIXELS] = { Adafruit_NeoPixel::Color(0, 120, 0),//green Adafruit_NeoPixel::Color(0, 120, 0), Adafruit_NeoPixel::Color(0, 120, 0), Adafruit_NeoPixel::Color(15, 105, 0), Adafruit_NeoPixel::Color(30, 90, 0), Adafruit_NeoPixel::Color(45, 75, 0), Adafruit_NeoPixel::Color(60, 60, 0),//orange Adafruit_NeoPixel::Color(75, 45, 0), Adafruit_NeoPixel::Color(90, 30, 0), Adafruit_NeoPixel::Color(105, 15, 0), Adafruit_NeoPixel::Color(120, 0, 0),//red Adafruit_NeoPixel::Color(0, 0, 120),//blue Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), };

//Set the frequency when each LED should turn on //First LED turns on at minFrequency const unsigned int lightShiftFreq[NUMPIXELS] = { minFrequency, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, };

bool hasStartupSequenceRun = false; // only run startup sequence one time const byte tachPin = 2; unsigned long igfreq;

void setup() { pixels.begin(); // This initializes the NeoPixel library. }

void loop() {

float ighigh, iglow; unsigned long igcal1, igcal2;

//measure period of tach signal ighigh = pulseIn(tachPin, HIGH); iglow = pulseIn(tachPin, LOW);

igcal1 = 1000 / ((ighigh / 1000) + (iglow / 1000));

//do it again ighigh = pulseIn(tachPin, HIGH); iglow = pulseIn(tachPin, LOW);

igcal2 = 1000 / ((ighigh / 1000) + (iglow / 1000));

//to filter out some noise, we only consider our measurement valid if they are similar in value, we accept the average. if ((igcal1 - igcal2) < 8) { igfreq = (igcal1 + igcal2) / 2; }

if (hasStartupSequenceRun == false) { if (igfreq > onFrequency) { //run start sequence //LEDs will light up, flash and light out upon starting the engine. for ( int i = 0; i < NUMPIXELS; ++i) { pixels.setPixelColor(i, tachColor[i]); pixels.show(); delay(50); } for(int a=0; a<10; a++) { pixels.fill(pixels.Color(0, 0, 120)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); } for ( int i = 0; i < NUMPIXELS; ++i) { pixels.setPixelColor(i, tachColor[i]); pixels.show(); } for ( int i = NUMPIXELS-1; i >= 0; --i) { pixels.setPixelColor(i, pixels.Color(0, 0, 0)); pixels.show(); delay(50); } hasStartupSequenceRun = true; pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); } if (igfreq < onFrequency) { //resets hasStartupSequenceRun to false if engine stops but Arduino remains powered, //startupsequence will rerun upon restarting the engine hasStartupSequenceRun = false; } }

if (igfreq < maxFrequency) {

// normal operating range
for ( int i = 0; i < NUMPIXELS; ++i) {
  if (igfreq > lightShiftFreq[i]) {
    pixels.setPixelColor(i, tachColor[i]);
  }
  else {
    pixels.setPixelColor(i, pixels.Color(0, 0, 0));
  }
}
pixels.show();

} else if (igfreq >= maxFrequency && igfreq < shiftFrequency) { //shift flash //default color=blue //to change shift flash color, edit RGB value in following line pixels.fill(pixels.Color(0, 0, 120)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); }

else if (igfreq >= shiftFrequency) { //overrev flash //default color=red //to change overrev flash color, edit RGB value in following line pixels.fill(pixels.Color(120, 0, 0)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); } }

MickTheMechanic commented 3 years ago

If you have an ocsilloscope please check your Signal wire and confirm you have a 12v square wave (I am not familiar with BMW Tacho Signal, it’s possible it’s a 5v Signal).

Does your car have a single coil with a distributor? If so, please try using coil negative.

Report back with results.

cpatersontn commented 3 years ago

We don't have an ocsilloscope. If it's a 5V signal, then what do we need to modify (hardware and software)?

Yes, single coil with distributor. We tried the coil negative and it was very noisy.... LEDs jumped all over the place.

MickTheMechanic commented 3 years ago

If its a 5v signal then you can feed it directly into the arduino, bypassing the transistor. But if its not 5v and you do that, you'll fry your arduino.

Do you maybe have a video showing what it looks like when using coil negative?

MickTheMechanic commented 3 years ago

You could even check with a multimeter, if its a 12v signal you should read about 6v on the signal wire with engine running. If its a 5v signal you should read about 2-3v

cpatersontn commented 3 years ago

Tach signal from ECU is 7.9V (set to DC on multimeter).

Here's the shift light attached to the negative on the coil. It always goes through the start-up sequence then just flashes red at idle as if it's over-reving. Our shiftFrequency is set to 165Hz just for testing but that should equate to 3300rpm if our equation is correct for this 6-cylinder (RPM/60)*3)

Link to video: https://www.facebook.com/chris.paterson.399/videos/10219498587075256/

MickTheMechanic commented 3 years ago

Link doesnt work.

Are you able to test on another car? Perhaps there is a problem with the circuit.

Have you tried using the original code, unchanged?

MickTheMechanic commented 3 years ago

Tach signal should be fine. Can you upload photos of your circuit?

cpatersontn commented 3 years ago

Try copying and pasting the linked address instead of clicking on it

Ok on tach signal

We reloaded the original code and it just blinks all red. Unplug the USB from the computer but leave it plugged in to the USB-B port on the PCB. Does that matter?

Can't try it on any other vehicle at this time

Here's pics of the PCB and LED. My first ones I've ever built so definitely can use any pointers or corrections if something doesn't look right

shift light PCB and LED boards 120820 (4) shift light PCB and LED boards 120820 (5) shift light PCB and LED boards 120820 (6) shift light PCB and LED boards 120820 (1) shift light PCB and LED boards 120820 (2) shift light PCB and LED boards 120820 (3)

MickTheMechanic commented 3 years ago

I just had a look at the video, the red flashing appears to be the overrev flash.

It would suggest that the frequency’s in the code are set far too low, the frequency at idle is higher than the programmed shift frequency.

To confirm, change the shiftfrequency to something like 1000 and see if anything changes.

Do you only have this problem when using coil negative, or also with the Tacho Signal wire from the dash?

The USB cable doesn’t matter if you have it connected to the car via the 5v reg.

I will take a closer look at the pics tomorrow and see if I can spot anything in regards to the circuitry.

cpatersontn commented 3 years ago

When we run the unmodified program, we have red blinking lights on the negative coil and tach signal

MickTheMechanic commented 3 years ago

I just updated my previous comment

cpatersontn commented 3 years ago

Thanks. We'll try a few experiments and see if changing values higher gives a different response.

In this section of the program, it looks like it is measuring the tach period and then doing some function to scale that number. Why is it dividing everything by 1,000?

//measure period of tach signal ighigh = pulseIn(tachPin, HIGH); iglow = pulseIn(tachPin, LOW);

igcal1 = 1000 / ((ighigh / 1000) + (iglow / 1000));

MickTheMechanic commented 3 years ago

Because the pulseIn() doesnt read Hz, rather it measures how many microseconds between pulses. From this we have to calculate Hz. This code is run twice, both values are compared, and if similar the average of both values is used (helps cut down unwanted noise).

MickTheMechanic commented 3 years ago

Also had a closer look at your board, the circuitry look ok, seems everything is connected in the right spot. Also confirmed by the fact that the start up sequence runs.

cpatersontn commented 3 years ago

Ok, thanks on explaining the pulseIn() code. Would you expect a magnitude difference between different makes/models/# cylinders on the actual time between pulses which would affect the calculated Hz? For instance, your original code has 123Hz @ 3700 RPMs.... would it be unexpected if the Hz calculation for our BMW 6-cylinder is a magnitude different? e.g. 2000 Hz (or higher) @ 3700 RPMs ?

MickTheMechanic commented 3 years ago

The time between pulses and the frquency are directly related to one another. the time between one pulse and the next is called a period and the frequency (hz) is periods per second.

I believe the code to be in order, as other members from the Livetodai.com forum have used this design/code with success.

I expect the frequency of your tacho signal should be as you described, RPM/60=revolutions per second, multiplied by how many times the coil fires per revolution (6 cylinder should fire 3 times per rotation).

Unfortunately Im not quite sure how your signal looks (it would take 5 min with an occilloscope to check)

If you do not have these resources available (e.g ocsilloscope) then you will have to do some trial and error to find out which frequencies correspond to which RPM's.

I can suggest using your device to measure the frequency

Simply add the following line to void loop()

Serial.println (igfreq);

then open the arduino IDE serial plotter (Tools -> Serial plotter), while connected to the arduino with the engine running, and your arduino will basically function like a make shift oscilloscope, giving you a live readout of the tacho signal frequency.

Hope this helps.

cpatersontn commented 3 years ago

Mick, Still no luck with the board. I tried a few things:

  1. Updated your original code by adding Serial.println (igfreq); directly after the void loop() line. Opened the Serial Plotter and the screen was just blank. Tried to mess with the baud rate and menu options on the lower right but the screen never showed anything.

  2. I connected the tach signal from the negative coil and then tried the ECU tach signal line in to see if it made a differernce. Changed the ShiftFrequency to 1000+ which then stopped it blinking red but then the LEDs wouldn't light or would light erratically regardless of what I changed the values to. Just no pattern that I could discern.

  3. As long as OnFrequency was below 30 then the start-up sequence always started.

MickTheMechanic commented 3 years ago

Sorry, I did not explain myself properly last time. download a fresh copy of shiftlight.ino

Add the following line to void startup:


Serial.begin(9600);

Add the following line to void loop, directly after igfreq = (igcal1 + igcal2) / 2; }

Serial.println (igfreq);

Open serial plotter, make sure baud rate is set to 9600

Start the engine and take note of the frequency.

report back with results.

cpatersontn commented 3 years ago

Here's the modified code that we tried today and the screen shot of the Serial Plotter. We have this connected to the tach-in signal from the ECU that is also connected to the factory (which is working correctly). Serial Plotter now shows up but no signal shown. The blinking start-up signal works everytime we start the car but no other LEDs after that regardless of RPM. We disconnected the board from the ECU wire just to see what would happen and there was no start-up sequence as expected. Just verifying that it wouldn't go through that sequence without a signal. Weird that it gets that signal to start-up but then nothing after that.

Modified Code:

//Shift Light V1.5

include

define PIN 6 //LED Data Pin

define NUMPIXELS 16 //number of leds connected

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

//Calculate the frequency of the tacho signal you are using and adjust the following values accordingly //example: for a standard tacho signal on a 4 cylinder engine the frequeny is equal to the RPM divided by 30 const unsigned int onFrequency = 20; //startup sequence, value represents engine speed higher than cranking and lower than idle const unsigned int minFrequency = 123; // minimum frequency to begin turning on LEDs const unsigned int maxFrequency = 235; // maximum frequency in normal range, after this value shift flash will occur const unsigned int shiftFrequency = 250; // frequency range from max to shift when shifting should happen, after this value overrev flash will occur

//Set the color for each LED in the neo pixel strip //Colors are set using an RGB value ranging from (0,0,0) to (255,255,255) const uint32_t tachColor[NUMPIXELS] = { Adafruit_NeoPixel::Color(0, 120, 0),//green Adafruit_NeoPixel::Color(0, 120, 0), Adafruit_NeoPixel::Color(0, 120, 0), Adafruit_NeoPixel::Color(15, 105, 0), Adafruit_NeoPixel::Color(30, 90, 0), Adafruit_NeoPixel::Color(45, 75, 0), Adafruit_NeoPixel::Color(60, 60, 0),//orange Adafruit_NeoPixel::Color(75, 45, 0), Adafruit_NeoPixel::Color(90, 30, 0), Adafruit_NeoPixel::Color(105, 15, 0), Adafruit_NeoPixel::Color(120, 0, 0),//red Adafruit_NeoPixel::Color(0, 0, 120),//blue Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), Adafruit_NeoPixel::Color(0, 0, 120), };

//Set the frequency when each LED should turn on //First LED turns on at minFrequency const unsigned int lightShiftFreq[NUMPIXELS] = { minFrequency, 130, 137, 144, 151, 158, 165, 172, 179, 186, 193, 200, 207, 214, 221, 228, };

bool hasStartupSequenceRun = false; // only run startup sequence one time const byte tachPin = 2; unsigned long igfreq;

void setup() { pixels.begin(); // This initializes the NeoPixel library. }

void loop() {

Serial.begin(9600);

float ighigh, iglow; unsigned long igcal1, igcal2;

//measure period of tach signal ighigh = pulseIn(tachPin, HIGH); iglow = pulseIn(tachPin, LOW);

igcal1 = 1000 / ((ighigh / 1000) + (iglow / 1000));

//do it again ighigh = pulseIn(tachPin, HIGH); iglow = pulseIn(tachPin, LOW);

igcal2 = 1000 / ((ighigh / 1000) + (iglow / 1000));

//to filter out some noise, we only consider our measurement valid if they are similar in value, we accept the average. if ((igcal1 - igcal2) < 8) { igfreq = (igcal1 + igcal2) / 2; Serial.println (igfreq); }

if (hasStartupSequenceRun == false) { if (igfreq > onFrequency) { //run start sequence //LEDs will light up, flash and light out upon starting the engine. for ( int i = 0; i < NUMPIXELS; ++i) { pixels.setPixelColor(i, tachColor[i]); pixels.show(); delay(50); } for(int a=0; a<10; a++) { pixels.fill(pixels.Color(0, 0, 120)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); } for ( int i = 0; i < NUMPIXELS; ++i) { pixels.setPixelColor(i, tachColor[i]); pixels.show(); } for ( int i = NUMPIXELS-1; i >= 0; --i) { pixels.setPixelColor(i, pixels.Color(0, 0, 0)); pixels.show(); delay(50); } hasStartupSequenceRun = true; pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); } if (igfreq < onFrequency) { //resets hasStartupSequenceRun to false if engine stops but Arduino remains powered, //startupsequence will rerun upon restarting the engine hasStartupSequenceRun = false; } }

if (igfreq < maxFrequency) {

// normal operating range
for ( int i = 0; i < NUMPIXELS; ++i) {
  if (igfreq > lightShiftFreq[i]) {
    pixels.setPixelColor(i, tachColor[i]);
  }
  else {
    pixels.setPixelColor(i, pixels.Color(0, 0, 0));
  }
}
pixels.show();

} else if (igfreq >= maxFrequency && igfreq < shiftFrequency) { //shift flash //default color=blue //to change shift flash color, edit RGB value in following line pixels.fill(pixels.Color(0, 0, 120)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); }

else if (igfreq >= shiftFrequency) { //overrev flash //default color=red //to change overrev flash color, edit RGB value in following line pixels.fill(pixels.Color(120, 0, 0)); pixels.show(); delay(20); pixels.fill(pixels.Color(0, 0, 0)); pixels.show(); delay(20); } } no signal 121320

MickTheMechanic commented 3 years ago

Here is what you have;


igfreq = (igcal1 + igcal2) / 2;
Serial.println (igfreq);
}

Try this:


igfreq = (igcal1 + igcal2) / 2;
}
Serial.println (igfreq);
MickTheMechanic commented 3 years ago

Please upload your code, you can drag and drop the .ino file into the comment box.

MickTheMechanic commented 3 years ago

You also have Serial.begin inside void loop, it must be inside void setup!

cpatersontn commented 3 years ago

So for Serial.begin, should it look like this in this seciton of the program?

bool hasStartupSequenceRun = false; // only run startup sequence one time const byte tachPin = 2; unsigned long igfreq;

void setup() { Serial.begin(9600); pixels.begin(); // This initializes the NeoPixel library. }

void loop() {

float ighigh, iglow; unsigned long igcal1, igcal2;

MickTheMechanic commented 3 years ago

Yes exactly!

Here, stripped down the code to a very basic tester for checking the frequency.

Upload this to your Arduino, open serial plotter, start engine.

Report back with results.

(And please upload the your code directly. Send to a .zip folder and drag and drop to the comment box. I want to check it, some characters are displayed differently when you just copy paste the text!)

Test_Frequency.zip

cpatersontn commented 3 years ago

test_light1.zip

MickTheMechanic commented 3 years ago

https://www.tinkercad.com/things/7d5KEDsRvIV-shiftlight-code/editel?sharecode=V9_L_blID8e-IG5Z-QfdU7xAY3IYFB3_7xq6teOL588

Here is the design on tinkercad. A signal generator provides the tacho signal. You can see what happens to the LEDs when you change the frequency on the signal generator, and you can take a look at the serial monitor and see the frequency being displayed.

Play around with it.

Here is a copy of the code I used in Tinkercad. Its the one you uploaded, I only changed the 2 things I mentioned above (Serial.begin in void startup, and Serial.print outside of the bracket.)

Code works, 100% (as confirmed by simulation in tinkercad). You just gotta find the right frequencies (or maybe your tacho signal is not compatible, but I doubt it).

test_light1.1.zip

cpatersontn commented 3 years ago

Thanks, will give this new code a try this week

cpatersontn commented 3 years ago

New experiment this weekend:

  1. First connected signal wire to coil (negative) and ran the testlight1 program. Received data which was great. Interesting that the signal bounces high/low. Pics and videos attached. shift light from coil 121920

https://user-images.githubusercontent.com/75594078/102696412-acfc3400-41f3-11eb-9240-888e8be12097.MOV

https://user-images.githubusercontent.com/75594078/102696413-ad94ca80-41f3-11eb-82f6-466197f2913a.MOV

cpatersontn commented 3 years ago

Next we ran the signal wire to the ECU. We confirmed that the signal is good as this is the same wire to the factory tach which was reading correctly. Intersting that we got zero data. Just a thin line at 0.00. Why would we get no data from the ECU signal? We've confirmed that the voltage is ~7.9VDC. Any ideas based on these experiments what could be going on with the coil and ECU signals? shift light from ECU 121920

MickTheMechanic commented 3 years ago

Did you have the Arduino grounded to the car? You must have one of the gnd Pins on the Arduino connected to the car chassis. Normally this is the case if you are powering the Arduino from 12v via the LM7805, but i am guessing you just had it plugged into the laptop? That’s the only thing I can think of at the moment.

please Check/confirm and report back with results

cpatersontn commented 3 years ago

Ground- yes, I have both GND pins on both sides of the Arduino chip wired to ground on the board which is wired to the chassis.

Wiring is positive (red) 12VDC from ignition. Goes through the LM7805 and confirmed 5VDC output from the LM7805. Ground (black...same side as the red positive wire) to the car chassis. Confirmed ground continuity to both GND pins and to board to chassis. Signal wire either from the ECO (tach) wire or directly from the coil negative.

Why would the coil give a signal through the Serial Plotter function but nothing when connected to the ECU?

Also, it looks like the signal from the coil is pretty erratic. Big highs and lows. Does that look normal and is it usable from the coil?

MickTheMechanic commented 3 years ago

Its reading about 40kHz, but the signal should only be 100-200 Hz. There is some kind of interferance there somewhere.

-Double check your circuit, there is possibly something amiss there thats allowing interferance to be read as pulses.

-Check the routing of the signal wire, it should not be run along side any kind of signal wires for valves that are powered by PWM (things like idle control valve, AGR and so on)

-If you have the posibilitiy, perform a test without the alternator connected, its possible the alternator voltage is producing a ripple that is being picked up by the arduino.

It seems very strange that the arduino is reading such a high frequency, and not reading anything on the tacho signal. Perhaps the arduino has been damaged in some way, possibly by a voltage surge from the coil (induction voltage when the points/coil driver opens)

I have attached some extra photos so you can check your circuit. It is also important that you are using the same kind of transistor (PNP, not NPN)

72bc0fe16fb227eac94da071f4eaca564dbe03f3 11d49773a0d339e9f4266164638830ce2456e2fe

MickTheMechanic commented 3 years ago

Please provide accurate information about your car, make model, build date, engine, ECU. I will take a look at work on monday and see if I can find a wiring diagram/somewhere where you can pick up a signal

cpatersontn commented 3 years ago

Thanks Mick. Will check those this weekend.

Car is a 1991 BMW 325i, 6 cylinder. Stock ECU.

Here's my part list: 330k ohm 5W resistor 10k ohm 5W resistor 47k ohm 3W resistor PNP Transistor ON Semi Bipolar Transistors Heat sink 5 volt regulator 1000uF 20% 16V Vishay Aluminum Electrolytic Capacitor Arduino Nano Adafruit LEDs

MickTheMechanic commented 3 years ago

If you have the 20 pin style BMW diagnostic port, try Pin 1 (listed as Drehzahl in below picture)

D40DC0A3-B18F-4848-A7B8-666438ABCF82

MickTheMechanic commented 3 years ago

Does your car have one ignition coil, or 6? please provide a picture of how you have connected to the ignition coil.

cpatersontn commented 3 years ago

Our car has one standard cylindrical coil. Here is the attachment point to the negative side (red wire). I ran it directly to the Arduino without any other wires around it. coil tach attachment point

MickTheMechanic commented 3 years ago

Did you get it working?

cpatersontn commented 3 years ago

Unfortunately, no. The issue was either I got zero signal from the factory tach wire from the ECU or the signal from the coil was too noisy and just bounced around the signal. Thanks for your help and understanding the code and circuit. May just need to build another one from scratch to see if it was a hardware issue.

Sent from my iPhone

On Feb 24, 2021, at 3:55 PM, MickTheMechanic notifications@github.com wrote:

 Did you get it working?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MickTheMechanic commented 3 years ago

Hi,

I was working on a project recently which reminded me of your problem.

The project used some transistors, and I came to learn the hard way that not all transistors have the same pinout. E,C, and B pins vary from manufacturer to manufacturer. I even had two 2N2222A transistors with different pin layout, the only difference was a prefix printed on the housing.

I thought maybe this could be the problem. If you are still interested in getting this project up and running it might be a good place to start with the troubleshooting. You would need to download the datasheet for the particular transistor you have (should be available from the seller website) and confirm the pin layout matches how you have it connected.

cpatersontn commented 3 years ago

Interesting..... will need to check

Would a higher resistor value cause issues with this circuit?

Sent from my iPhone

On Apr 6, 2021, at 2:52 PM, MickTheMechanic @.***> wrote:

 Hi,

I was working on a project recently which reminded me of your problem.

The project used some transistors, and I came to learn the hard way that not all transistors have the same pinout. E,C, and B pins vary from manufacturer to manufacturer. I even had two 2N2222A transistors with different pin layout, the only difference was a prefix printed on the housing.

I thought maybe this could be the problem. If you are still interested in getting this project up and running it might be a good place to start with the troubleshooting. You would need to download the datasheet for the particular transistor you have (should be available from the seller website) and confirm the pin layout matches how you have it connected.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MickTheMechanic commented 3 years ago

Yes it could have an influence. Transistors are not actually switched by the amount of voltage, but rather by the amount of current that runs through the base. This current is limited by the resistor connected to the base, so a different value resistor could have a negative effect.

also Different transistors have Different characteristics regarding switching speed, switching current, and so on.

I would first of all check the datasheet and make sure you have the pins connected correctly (in my last project I was pulling my hair out trying to find the problem, turns out the transistor I used that had „similar properties“ also had a different pin layout!). If that doesn’t work I would swap it out with one that has the same part number as listed in the parts list, as the resistors have been sized to suit this one.

just some things for you to consider if your interest in the project is reignited sometime.

cpatersontn commented 3 years ago

Ok,I’ll need to double check the resistors too as I think one or two are close tot the right values but not exactly to the spec of your original design. I’ve got a few of the transistors too that I swap out. We really want to get this working this summer so we’ll be trying a few things to see

Sent from my iPhone

On Apr 6, 2021, at 3:49 PM, MickTheMechanic @.***> wrote:

 Yes it could have an influence. Transistors are not actually switched by the amount of voltage, but rather by the amount of current that runs through the base. This current is limited by the resistor connected to the base, so a different value resistor could have a negative effect.

also Different transistors have Different characteristics regarding switching speed, switching current, and so on.

I would first of all check the datasheet and make sure you have the pins connected correctly (in my last project I was pulling my hair out trying to find the problem, turns out the transistor I used that had „similar properties“ also had a different pin layout!). If that doesn’t work I would swap it out with one that has the same part number as listed in the parts list, as the resistors have been sized to suit this one.

just some things for you to consider if your interest in the project is reignited sometime.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MickTheMechanic commented 3 years ago

The big 3watt resistors are not necessary, you can also use normal 0.6w or 0.25w resistors without any problems.

MickTheMechanic commented 3 years ago

I found the solution to your problem, it’s documented in #4 .

if you have time you should check it out

cpatersontn commented 3 years ago

Thanks Mick. Will take a look

Sent from my iPhone

On Jun 5, 2021, at 9:08 AM, MickTheMechanic @.***> wrote:

 I found the solution to your problem, it’s documented in #4 .

if you have time you should check it out

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

cpatersontn commented 2 years ago

Hi Mick,

Not sure how I missed this email but glad I now saw it. I’m going to check my original circuit to see where it needs to be modified to this new one your drew. Do you have a complete circuit draw with your new modification like the original one you posted?

From: MickTheMechanic @.> Sent: Saturday, June 5, 2021 9:09 AM To: MickTheMechanic/Shiftlight @.> Cc: cpatersontn @.>; Author @.> Subject: Re: [MickTheMechanic/Shiftlight] Trying to run on a 6 cylinder (#3)

I found the solution to your problem, it’s documented in #4 https://github.com/MickTheMechanic/Shiftlight/issues/4 .

if you have time you should check it out

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MickTheMechanic/Shiftlight/issues/3#issuecomment-855245550 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ASAXSXTOVVBKPTEUFWPZ7TDTRIVXPANCNFSM4UPZLYRA .

-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

cpatersontn commented 2 years ago

Mick, We’re bench testing the modified board. Should the LED start up sequence happen every time we plug in the USB cable to the board and computer?

On Jun 5, 2021, at 9:08 AM, MickTheMechanic @.***> wrote:

 I found the solution to your problem, it’s documented in #4 .

if you have time you should check it out

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MickTheMechanic commented 2 years ago

yes the startup sequence should run under the following conditions:

  1. the device is switched on/the engine is started
  2. the device is already on, if the engine stalls, and is restarted
cpatersontn commented 2 years ago

Ok…. Working on a few tweaks. Interesting LED behavior. LEDs on on one pixel board stay lit but the other board goes through the start-up sequence… but not every time when connected to the laptop. Any idea what would cause this strange LED behavior?

On Jan 29, 2022, at 5:20 PM, MickTheMechanic @.***> wrote:

 yes the startup sequence should run under the following conditions:

the device is switched on/the engine is started the device is already on, if the engine stalls, and is restarted — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.