Members | Sign In
Chippernut Forums > Shift Light v1
avatar

Arduino Shift Light Follow Up

posted Nov 29, 2014 19:29:35 by iain knight
Hi all, this a follow up from the YouTube here's my set up with 1990 300zxTT rpm meter and code which has not real changed from Chippernut code apart from INPUT to INPUT_PULLUP which input pin2 on the Arduino is pulled high and just needs to be grounded for rpm the work, also by using a optical isolator from pin2 to ground and a 1K resistor on the input side to pull down voltage down to about 3v. The car rpm meter has about 5-6v on the tach input and the ecu grounds the signal and you get a rpm reading from the ecu.


for 1k rpm it's 48Hz
2K rpm it's 94Hz
3K rpm it's 144Hz
4K rpm it's 191Hz
5K rpm it's 235Hz
6K rpm it's 282Hz
7K rpm it's 329Hz
8K rpm it's 385Hz
9K rpm it's 445Hz
The code:- "I have a 9000rpm limit but you change to lower"
/* v1.0 BETA 11/17/2013 -- Initial Release
** v1.1 03/09/2014 -
** Fixed bug with flasher that didn't correspond to brightness value
** Improved sleep function, now it shuts off after 5-seconds of engine OFF
** Other minor improvements.
**
**
*/





// declares Digital Pin 6 as the output for the NeoPixel Display
#define PIN 6

// Include these libraries
#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
#include <Adafruit_NeoPixel.h>

#include <EEPROM.h>
#include "EEPROMAnything.h"

// Create a 15 bit color value from R,G,B
unsigned int Color(byte r, byte g, byte b)
{
//Take the lowest 5 bits of each value and append them end to end
return( ((unsigned int)g & 0x1F )<<10 | ((unsigned int)b & 0x1F)<<5 | (unsigned int)r & 0x1F);
}


// configure the neopixel strip and the matrix 7-seg
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_7segment matrix = Adafruit_7segment();


//configuration for the Tachometer variables
const int sensorPin = 2;
const int ledPin = 13;
const int sensorInterrupt = 0;
const int timeoutValue = 10;
volatile unsigned long lastPulseTime = 0;
volatile unsigned long interval = 0;
volatile int timeoutCounter;

int rpm;
int rpmlast;
int rpm_interval;

int rpmled;
int activation_rpm;
int shift_rpm;
int segment_int;

int menu_enter = 0;


//These are stored memory variables for adjusting the (5) colors, activation rpm, shift rpm, brightness
//Stored in EEPROM Memory
int c1;
int c2;
int c3;
int c4;
int c5;
int r1;
int r2;
int brightval; //7-seg brightness
int sb; //strip brightness


// COLOR VARIABLES - for use w/ the strips and translated into 255 RGB colors
uint32_t color1;
uint32_t color2;
uint32_t color3;
uint32_t flclr1;
uint32_t flclr2;



// ROTARY ENCODER VARIABLES
int button_pin = 4;
int menuvar;
int val;
int rotaryval = 0;




// CONFIGURATION FOR THE ROTARY ENCODER
// Half-step mode?
//#define HALF_STEP
// Arduino pins the encoder is attached to. Attach the center to ground.
#define ROTARY_PIN1 10
#define ROTARY_PIN2 11
// define to enable weak pullups.
#define ENABLE_PULLUPS

#ifdef HALF_STEP
// Use the half-step state table (emits a code at 00 and 11)
const char ttable[6][4] = {
{0x3 , 0x2, 0x1, 0x0}, {0x83, 0x0, 0x1, 0x0},
{0x43, 0x2, 0x0, 0x0}, {0x3 , 0x5, 0x4, 0x0},
{0x3 , 0x3, 0x4, 0x40}, {0x3 , 0x5, 0x3, 0x80}
};
#else
// Use the full-step state table (emits a code at 00 only)
const char ttable[7][4] = {
{0x0, 0x2, 0x4, 0x0}, {0x3, 0x0, 0x1, 0x40},
{0x3, 0x2, 0x0, 0x0}, {0x3, 0x2, 0x1, 0x0},
{0x6, 0x0, 0x4, 0x0}, {0x6, 0x5, 0x0, 0x80},
{0x6, 0x5, 0x4, 0x0},
};
#endif
volatile char state = 0;

/* Call this once in setup(). */
void rotary_init() {
pinMode(ROTARY_PIN1, INPUT);
pinMode(ROTARY_PIN2, INPUT);
#ifdef ENABLE_PULLUPS
digitalWrite(ROTARY_PIN1, HIGH);
digitalWrite(ROTARY_PIN2, HIGH);
#endif
}


/* Read input pins and process for events. Call this either from a
* loop or an interrupt (eg pin change or timer).
*
* Returns 0 on no event, otherwise 0x80 or 0x40 depending on the direction.
*/
char rotary_process() {
char pinstate = (digitalRead(ROTARY_PIN2) << 1) | digitalRead(ROTARY_PIN1);
state = ttable[state][pinstate];
return (state & 0xc0);
}



//This subroutine reads the stored variables from memory
void getEEPROM(){

brightval = EEPROM.read(0);
sb = EEPROM.read(1);
c1 = EEPROM.read(2);
c2 = EEPROM.read(3);
c3 = EEPROM.read(4);
c4 = EEPROM.read(5);
c5 = EEPROM.read(6);
r1 = EEPROM.read(7);
r2 = EEPROM.read(8);

}


//This subroutine writes the stored variables to memory
void writeEEPROM(){

EEPROM.write(0, brightval);
EEPROM.write(1, sb);
EEPROM.write(2, c1);
EEPROM.write(3, c2);
EEPROM.write(4, c3);
EEPROM.write(5, c4);
EEPROM.write(6, c5);
EEPROM.write(7, r1);
EEPROM.write(8, r2);

}




//SETUP TO CONFIGURE THE ARDUINO AND GET IT READY FOR FIRST RUN
void setup() {
// Serial.begin(9600);
// Serial.println("7 Segment Backpack Test");
matrix.begin(0x70);
strip.begin();
strip.show(); // Initialize all pixels to 'off'

// config for the Tach
pinMode(sensorPin, INPUT_PULLUP);
//digitalWrite(sensorPin, HIGH); // enable internal pullup (if Hall sensor needs it)
pinMode(ledPin, OUTPUT);
attachInterrupt(sensorInterrupt, sensorIsr, FALLING);
Serial.begin(9600);//RISING
lastPulseTime = micros();
timeoutCounter = 0;

//ROTARY ENCODER
pinMode(button_pin, INPUT_PULLUP);
rotary_init();

//get stored variables
getEEPROM();

//translate the stored 255 color variables into meaningful RGB colors
color1 = load_color(c1);
delay(10);
color2 = load_color(c2);
delay(10);
color3 = load_color(c3);
delay(10);
flclr1 = load_color(c4);
delay(10);
flclr2 = load_color(c5);
delay(10);
}


//each time the interrupt receives a rising tach signal, it'll run this subroutine
void sensorIsr()
{
unsigned long now = micros();
interval = now - lastPulseTime;
lastPulseTime = now;
timeoutCounter = timeoutValue;
}


// Normal Running Operations
void loop() {

if (timeoutCounter != 0)
{
--timeoutCounter;
rpmlast = rpm;
//This calculation will need to be calibrated for each application
//float rpm = 60e6/(float)interval; // ORIGINAL
rpm = (21e6/interval); // CALIBRATED


}


//Poll the Button, if pushed, cue animation and enter menu subroutine
if (digitalRead(button_pin) == LOW){
delay(250);
clearStrip();

//Ascend strip
for (int i=0; i<9; i++){
strip.setPixelColor(i, strip.Color(0, 0, 25));
strip.setPixelColor(16-i, strip.Color(0, 0, 25));
strip.show();
delay(35);
}
// Descend Strip
for (int i=0; i<9; i++){
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.setPixelColor(16-i, strip.Color(0, 0, 0));
strip.show();
delay(35);
}

menuvar=1;
menu();
}


//Write the BarGraph Display
// Translate our stored RPM values into meaningful RPM values (incriments of 30 rpm)
activation_rpm = r1*30;
shift_rpm = r2*30;

//Let's keep this RPM value under control, between 0 and 8000
rpm = constrain (rpm, 0, 9000);

// given the nature of the RPM interrupt reader, a zero reading will produce a max result
// this fixes this quirk
if (rpm==9000){rpm=0;}



// if the engine is running, print the rpm value to the 7-seg display
//if not, shut her down

if ((micros() - lastPulseTime) < 6e6 ) {
// Serial.print(rpm);
matrix.println(rpm);
matrix.setBrightness(brightval);
matrix.writeDisplay();
delay(120);
}
else {
matrix.clear();
matrix.writeDisplay();
}





// divide the LED strip into segments based on our start-point (act rpm) and end point (shift rpm)
segment_int = (shift_rpm - activation_rpm) / 8;
// Serial.print(" RPMLED: ");
// Serial.println(segment_int);


if (rpm > activation_rpm){
strip.setPixelColor(7, color1);
strip.setPixelColor(8, color1);
}
else{
strip.setPixelColor(7, strip.Color(0, 0, 0));
strip.setPixelColor(8, strip.Color(0, 0, 0));
}



if ((rpm-activation_rpm) > (segment_int)) {
strip.setPixelColor(6, color1);
strip.setPixelColor(9, color1);
}
else {
strip.setPixelColor(6, strip.Color(0, 0, 0));
strip.setPixelColor(9, strip.Color(0, 0, 0));
}



if ((rpm-activation_rpm) > (segment_int * 2)) {
strip.setPixelColor(5, color1);
strip.setPixelColor(10, color1);
}
else {
strip.setPixelColor(5, strip.Color(0, 0, 0));
strip.setPixelColor(10, strip.Color(0, 0, 0));
}



if ((rpm-activation_rpm) > (segment_int * 3)) {
strip.setPixelColor(4, color1);
strip.setPixelColor(11, color1);
}
else {
strip.setPixelColor(4, strip.Color(0, 0, 0));
strip.setPixelColor(11, strip.Color(0, 0, 0));
}


if ((rpm-activation_rpm) > (segment_int * 4)) {
strip.setPixelColor(3, color2);
strip.setPixelColor(12, color2);
}
else {
strip.setPixelColor(3, strip.Color(0, 0, 0));
strip.setPixelColor(12, strip.Color(0, 0, 0));
}


if ((rpm-activation_rpm) > (segment_int * 5)) {
strip.setPixelColor(2, color2);
strip.setPixelColor(13, color2);
}
else {
strip.setPixelColor(2, strip.Color(0, 0, 0));
strip.setPixelColor(13, strip.Color(0, 0, 0));
}


if ((rpm-activation_rpm) > (segment_int * 6)) {
strip.setPixelColor(1, color3);
strip.setPixelColor(14, color3);
}
else {
strip.setPixelColor(1, strip.Color(0, 0, 0));
strip.setPixelColor(14, strip.Color(0, 0, 0));
}



if ((rpm-activation_rpm) > (segment_int * 7)) {
strip.setPixelColor(0, color3);
strip.setPixelColor(15, color3);
}
else {
strip.setPixelColor(0, strip.Color(0, 0, 0));
strip.setPixelColor(15, strip.Color(0, 0, 0));
}


// SHIFT!!!!! Flasher Function
if (rpm >= shift_rpm) {


for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr1);
}
strip.show();
delay(50);


for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr2);
}
strip.show();
delay(50);

}

strip.show();


}





// MENU SYSTEM
void menu(){

//this keeps us in the menu
while (menuvar == 1){


// This little bit calls the rotary encoder

int result = rotary_process();

if (result == -128){
rotaryval--;
}

if (result == 64){
rotaryval++;
}


//matrix.println(rotaryval);
//matrix.writeDisplay();

rotaryval = constrain(rotaryval, 0, 8);


switch (rotaryval){

case 0: //Menu Screen. Exiting saves variables to EEPROM
matrix.writeDigitRaw(0,0x39); //e
matrix.writeDigitRaw(1,0x9); //x
matrix.writeDigitRaw(3,0x9); //i
matrix.writeDigitRaw(4,0xF); //t

//Poll the Button to exit
if (digitalRead(button_pin) == LOW){
delay(250);
rotaryval = 0;
menuvar=0;
writeEEPROM();
getEEPROM();

//Ascend strip
for (int i=0; i<9; i++){
strip.setPixelColor(i, strip.Color(25, 25, 25));
strip.setPixelColor(16-i, strip.Color(25, 25, 25));
strip.show();
delay(35);
}

for (int i=0; i<9; i++){
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.setPixelColor(16-i, strip.Color(0, 0, 0));
strip.show();
delay(35);
}




}

break;


case 1: //Adjust the global brightness
matrix.writeDigitRaw(0,0x0); //
matrix.writeDigitRaw(1,0x7C); //b
matrix.writeDigitRaw(3,0x50); //r
matrix.writeDigitRaw(4,0x78); //t

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}


while (menu_enter == 1){

int bright = rotary_process();

if (bright == -128){
brightval--;
sb++;
}
if (bright == 64){
brightval++;
sb--;
}
brightval = constrain (brightval, 0, 15);
sb = constrain(sb, 1, 15);

color1 = load_color(c1);
color2 = load_color(c2);
color3 = load_color(c3);
flclr1 = load_color(c4);
flclr2 = load_color(c5);

matrix.setBrightness(brightval);
matrix.println(brightval);
matrix.writeDisplay();

strip.setPixelColor(0, color3);
strip.setPixelColor(1, color3);
strip.setPixelColor(2, color2);
strip.setPixelColor(3, color2);
strip.setPixelColor(4, color1);
strip.setPixelColor(5, color1);
strip.setPixelColor(6, color1);
strip.setPixelColor(7, color1);
strip.setPixelColor(8, color1);
strip.setPixelColor(9, color1);
strip.setPixelColor(10, color1);
strip.setPixelColor(11, color1);
strip.setPixelColor(12, color2);
strip.setPixelColor(13, color2);
strip.setPixelColor(14, color3);
strip.setPixelColor(15, color3);
strip.show();





if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, color1);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}


}

break;


case 2: // ACTIVATION RPM
matrix.writeDigitRaw(0,0x0); //
matrix.writeDigitRaw(1,0x77); //A
matrix.writeDigitRaw(3,0x39); //C
matrix.writeDigitRaw(4,0x78); //t

if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}


while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
r1--;
}
if (coloradjust1 == 64){
r1++;
}

r1 = constrain(r1, 0, 255);

matrix.println(r1*30);
matrix.writeDisplay();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(50, 50, 50));
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}

break;


case 3: // SHIFT RPM
matrix.writeDigitRaw(0,0x6D); //S
matrix.writeDigitRaw(1,0x76); //H
matrix.writeDigitRaw(3,0x71); //F
matrix.writeDigitRaw(4,0x78); //t


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}


while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
r2--;
}
if (coloradjust1 == 64){
r2++;
}

r2 = constrain(r2, 0, 255);

matrix.println(r2*30);
matrix.writeDisplay();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(50, 50, 50));
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}


break;



case 4: //Adjust Color #1

matrix.writeDigitRaw(0,0x39); //C
matrix.writeDigitRaw(1,0x38); //L
matrix.writeDigitRaw(3,0x33); //R
matrix.writeDigitRaw(4,0x6); //1

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}

while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
c1--;
}
if (coloradjust1 == 64){
c1++;
}

c1 = constrain(c1, 0, 255);

color1 = load_color(c1);


for(int i=4; i<12; i++) {
strip.setPixelColor(i, color1);
}

strip.show();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, color1);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}
break;




case 5: //Adjust Color #2
matrix.writeDigitRaw(0,0x39); //C
matrix.writeDigitRaw(1,0x38); //L
matrix.writeDigitRaw(3,0x33); //R
matrix.writeDigitRaw(4,0x5B); //2

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}

while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
c2--;
}
if (coloradjust1 == 64){
c2++;
}

c2 = constrain(c2, 0, 255);

color2 = load_color(c2);

strip.setPixelColor(2, color2);
strip.setPixelColor(3, color2);
strip.setPixelColor(12, color2);
strip.setPixelColor(13, color2);
strip.show();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, color2);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}


break;

case 6: //Adjust Color #3
matrix.writeDigitRaw(0,0x39); //C
matrix.writeDigitRaw(1,0x38); //L
matrix.writeDigitRaw(3,0x33); //R
matrix.writeDigitRaw(4,0x4F); //3

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}

while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
c3--;
}
if (coloradjust1 == 64){
c3++;
}

c3 = constrain(c3, 0, 255);

color3 = load_color(c3);

strip.setPixelColor(0, color3);
strip.setPixelColor(1, color3);
strip.setPixelColor(14, color3);
strip.setPixelColor(15, color3);
strip.show();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, color3);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}

break;

case 7: //Adjust Color #4
matrix.writeDigitRaw(0,0x6D); //S
matrix.writeDigitRaw(1,0x39); //C
matrix.writeDigitRaw(3,0x0); //
matrix.writeDigitRaw(4,0x6); //1

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}

while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
c4--;
}
if (coloradjust1 == 64){
c4++;
}

c4 = constrain(c4, 0, 255);

flclr1 = load_color(c4);


for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr1);
}

strip.show();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr1);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}


break;

case 8: //Adjust Color #5
matrix.writeDigitRaw(0,0x6D); //S
matrix.writeDigitRaw(1,0x39); //C
matrix.writeDigitRaw(3,0x0); //
matrix.writeDigitRaw(4,0x5B); //2

//Poll the Button to Enter
if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 1;
}

while (menu_enter == 1){

int coloradjust1 = rotary_process();

if (coloradjust1 == -128){
c5--;
}
if (coloradjust1 == 64){
c5++;
}

c5 = constrain(c5, 0, 255);

flclr2 = load_color(c5);


for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr2);
}

strip.show();


if (digitalRead(button_pin) == LOW){
delay(250);
menu_enter = 0;
clearStrip();
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, flclr2);
strip.show();
delay(15);
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}

}
}

break;



}


matrix.writeDisplay();


}


}




//This sub clears the strip to all OFF

void clearStrip() {
for( int i = 0; i<strip.numPixels(); i++){
strip.setPixelColor(i, strip.Color(0, 0, 0));
strip.show();
}
}


uint32_t load_color(int cx){

unsigned int r,g,b;

if (cx == 0){
r = 0;
g = 0;
b = 0;
}


if (cx>0 && cx<=85){
r = 255-(cx*3);
g = cx*3;
b=0;
}

if (cx>85 && cx < 170){
r = 0;
g = 255 - ((cx-85)*3);
b = (cx-85)*3;
}

if (cx >= 170 && cx<255){
r = (cx-170)*3;
g = 0;
b = 255 - ((cx-170)*3);
}

if (cx == 255){
r=255;
g=255;
b=255;
}


r = (r/sb);
g = (g/sb);
b = (b/sb);


return strip.Color(r,g,b);

}
[Last edited Feb 01, 2015 22:16:22]
page   1
13 replies
avatar
Jonduino said Dec 01, 2014 22:49:07
This is great information!! Thanks for posting! I'm glad to see you used an opto-isolator with success. :)

Post pics of the final install if you have time.

Thanks!!
- jon
avatar
ArduinoPush said Dec 11, 2014 18:53:54
Hey,

first i want to say: Thank You Chippernut for this verry nice project!
second: thank you iain for editing the code, with this code i was able to test my build of this project by using a second arduino to generate frequencies, and it worked. :-)

Now i have some questions:

How did you come to the frequencies for the specific rpms?
for example 1000rpm = 48Hz but how do you get to 48Hz for 1000rpm?

explenation: when the 4 stroke engine is rotating @ 1000rpm it is equal to 16.66 rotations per second (devided by 60).
and a 4stroke engine gets a spark every 2 revolutions so: 16.66/2 = 8.33 Hz
am i missing something?

another question for chippernut: Why do you use a 5V regulator? i used the 5V exit of the arduino (Mega)to power the display and led bar and this works perfect.

To get the RPM signal i used this: http://i150.photobucket.com/albums/s103/SherlockHolmesAlbum/rpm_input.png
(bougie kabel = spark plug cable)
but it gives wrong RPM because of the difference in Hz i think?

I'm building this for my 125cc shifter kart, when i get it to work properly i will upload pics and a tutorial.

Thank you everybody!!

GRTZ from Belgium
avatar
iain knight said Jan 27, 2015 11:16:34
Hi, with the signals from ecu's are square wave's with a 50% duty, I did play around at first to get mine working and tried to play with the duty rate and when it's 10% or 90% duty the adruino is seeing a pulse not a square wave, i have not looked into how to get a square wave wiring from a HT setup, it could be just be as simple as changing the calibration number at works for you.
Hope this some help
Iain
avatar
Jonduino said Jan 28, 2015 18:49:51
Sorry for the late response --

I used a 5V regulator "just in case" the LEDs drew too much current from the UNO's on-board regulator. Technically, they are really close to the limit at full-bright white. But if you never go that bright, you should be OK.

Iain - have you had a chance to check out the RPM bench simulator I coded? I'd be interested in knowing it if corroborates your results.

Thanks
- jon
avatar
IainKnight said Jan 30, 2015 15:27:26
Hi, Jon
I can confirm that the RPM bench simulator works with my set up both on the Arduino board and the RPM pick up wire, YouTube clip up loaded.
I'll also put up a clip with a frequency meter showing the Hz from the Arduino RPM simulator.








Thanks
Iain
[Last edited Jan 30, 2015 19:22:52]
avatar
Jonduino said Jan 30, 2015 18:37:32
Awesome!! Outstanding work, that turned out really well! I'm glad the bench generator is working.

You should post pics of your 300ZX too.. I love those cars.

I tried to embed your videos but I think you have to enable it on your end / youtube account. I posted a how-to-embed under the support section.
[Last edited Jan 30, 2015 18:42:12]
avatar
IainKnight said Jan 30, 2015 19:31:46
Hi Jon,
I have embedded the YouTube Video, also have left some information on the support section.

Thanks
Iain
avatar
iain knight said May 12, 2015 19:41:32
Hi all just a quick one of light install.


[Last edited May 12, 2015 19:51:04]
avatar
iain knight said May 12, 2015 19:53:31
avatar
Jonduino said May 12, 2015 19:57:06
SO COOL!!!!!!!!!!!!!!!!!
avatar
iain knight said May 15, 2015 19:17:54
Hi all, I've just started my car for the first time this year, I've lowered the shift start and end point to show it working, I'm also running on a Mapecu2 piggy back ecu so I have no MAF. From my studies I have found most or nearly all ecu run a grounding for all sensors, injectors, rpm ect so if some people are having some trouble with it working they may have to put a voltage divider with a diode the 330ohm from the Vin with a 220ohm from ground soldered to the other side of the 300ohm then solder that to the rpm input which will give about Vin 13v rpm 5.2v to Vin 14v rpm 5.3v and with diode in there it will not short out the Vin to the board. so when the engine not running the rpm input will be 5.2/5.3v (HIGH) and when the engine is running the car's ecu will pull the rpm (LOW).
[Last edited May 16, 2015 20:37:50]
avatar
Jonduino said Jun 11, 2015 12:15:41
that's an awesome bracket! Can you share how you made that? What are the neopixels contained in? I'm interested in your new circuitry as well, I'm going to experiment with that setup.

Thanks!!
avatar
iain knight said Jun 17, 2015 21:05:56
Hi all, the neopixels are contained in a clear acrylic Plexiglas Perspex tube which have a end stop and then heat shrink tube over the top. The two end brackets are made from aluminium which I modelled in soildworks then machined on my home made CNC milling machine which is also a engraver/ vinyl cutter and when get around to it also a 3d printer. The RPM lcd and the rotary switch are wired to a r5cat cable as I don't need it plugged in all the time. I slowly working on a new project using a arduino, 12bitADC and a Oled16x2(Red,Green,Blue) to measurer oil pressure with a 150Psi transducer, fuel pressure with a 80psi transducer, boost pressure with a 7bar transducer and exhaust temp K-type.
Iain
Login below to reply: