Members | Sign In
Chippernut Forums > Shift Light v2.3
avatar

arduino chip usage

posted Nov 24, 2015 21:16:48 by StamatisToras
Hi from me.The shift light is great project.But i was wondering if someone
wants to keep only the leds can simply use adruino to write the code,program the chip with his own prefences lights,style etc and then to remove the chip from adruino board and plug it to a board witch will have power,gnd and rpm input.This will be easier to install on a vehicle.
page   1
5 replies
avatar
Jonduino said Nov 25, 2015 13:29:20
Hi, Thanks for stopping by and sharing your idea. This is a good plan - however, if you are going to remove the chip (AMTEL ATMega328p), then you will likely need a 16Mhz oscillating crystal to provide the clock reference as two of the primary functions (Neopixel Ws2812 communication and RPM timing/interrupt calculations) are based on this 16mhz standard. Without the oscillator, I believe the chip will run at 8Mhz. Certainly worth a try, but you are correct that the standard arduino uno is really meant for prototyping and wastes a lot of space for this application.

I'm currently working on two different variants of the shift-light that uses smaller dev boards (Arduino Micro and Teensy)

thanks again for stopping by! :)
- jon
avatar
StamatisToras said Nov 25, 2015 16:44:49
I have start the project as soon as i will complete it and test it
on different type of vehicles with different type of ecus and rpm signal
outputs i will try to constract a small preprogrammed circuit with the
amtel chip the crystal the dc voltage regulator and the leds.
avatar
Jonduino said Nov 25, 2015 17:39:32
Perfect! This will be great! Thank you
avatar
StamatisToras said Nov 25, 2015 21:44:22
shift light ready,code loaded and working.Finished with programming
led colours segmentetion etc and now.1st i want to remove the display
in order to install it 2nd every time i turn the power off and back on
i have to press the encoder in order to come alive.i want to remove the encoder too and i need the circuit to turn on every time i switch the power on.
must i do work with the code? i will check this.any suggestions?
avatar
Jonduino said Nov 30, 2015 13:10:47
The shift light should automatically start-up as soon as it detects an RPM, so this way it should work without the encoder or the display. There is a function that does this:

ORIGINAL CODE:
if (timeoutCounter > 0){
if (rpm_last > 0 ){
if(DEBUG){Serial.println(rpm); }
if (rpm > 9999){ matrix.println(rpm/10);
}else{matrix.println(rpm); }
matrix.setBrightness(brightval);
matrix.writeDisplay();
}
else{
matrix.clear();
matrix.writeDisplay();
}
rpm_last = rpm;
} else {
rpm = 0;
matrix.clear();
matrix.writeDisplay();
clearStrip();
strip.show();
}


If you're having trouble keeping it "ON", change the above code to this:


rpm_last = 1;
if (timeoutCounter > 0){
if (rpm_last > 0 ){
if(DEBUG){Serial.println(rpm); }
if (rpm > 9999){ matrix.println(rpm/10);
}else{matrix.println(rpm); }
matrix.setBrightness(brightval);
matrix.writeDisplay();
}
else{
matrix.clear();
matrix.writeDisplay();
}
rpm_last = rpm;
} else {
rpm = 0;
matrix.clear();
matrix.writeDisplay();
clearStrip();
strip.show();
}



Basically the only change is this addition at the beginning.

rpm_last = 1;


Hope this helps.
Login below to reply: