I built a hydraulic pump Small engine dyno for kart engines, using a load cell to read load and rotary encoder to read rpm. im using a 1:2 ratio with sprockets to slow the pump shaft to a safer speed. I have a sketch to read those inputs and calculate HP but i want it to do more than what it currently has coded to do (i.e stepper motor to open or close the valve to raise pressure, read Temp, and output data to a graph.) Also currently the arduino/software is reading close to accurate rpm up to 3900rpm. after that it starts jumping up in rpm way more than the actual rpm. So much the at full throttle the engine turns 4250 actual rpm, but the encoder/ arduino is seeing almost 8800rpm. I'm willing to pay a little bit for some help or someone to write what i want it to do. I want to control a stepper motor to open or close a valve to get the engine to a desired rpm and also I want to add a input for temperature reading.
Mod edit: email address removed.
Edit to add current sketch
`// BE SURE TO DOWNLOAD THE APPROPRIATE LIBRARIES FOR YOUR SENSORS, MOST SENSORS COME WITH TUTORIALS ON HOW TO DO THIS
#include <HX711.h>
const int DOUT = 4;
const int SCKPIN = 5;
float reading;
HX711 scale;
//GENERAL SETUP
volatile unsigned long pCount = 0;
unsigned long start;
const int samplerate = 10; //THIS IS THE SAMPLE RATE IN SAMPLES PER SECOND
int duration = 1000/ samplerate; //DURATION IS THE TIME IN WHICH THE DATA IS COLLECTED, DURATION HERE IS 100 MILLISECONDS
int rpm;
int engine_rpm;
const float math = 0.1 * samplerate; //ROTARY ENCODER INFO
//SETTING UP PINS AND INERRUPTS
void setup() {
Serial.begin(19200); //MAKE SURE THAT YOUR SERIAL MONITOR RATE MATCHES THIS 19200, OTHERWISE IT WILL NOT WORK
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
attachInterrupt(0, interrupt0, RISING);
scale.begin(DOUT, SCKPIN);
}
void loop() {
scale.set_scale(44366.37); //THIS VALUE COMES FROM CALIBRATING THE LOAD CELL, FROM THE LOAD CELL INSTRUCTIONS
//MILLIS IS A RUNNING TIME VALUE IN ARDUINO
if(millis() - start > duration) //COMPARES TIME BETWEEN DATA SAMPLES, IF IT IS GREATER THAN DURATION, DATA SET IS RECORDED
{
start = millis(); //RESETTING START TO CURRENT TIME STAMP TO PREP FOR NEXT DATA SET
rpm = pCount * math; //RPM COUNTS AND COMBINES LOAD CELL LIBRARY INFO (AT 10 SAMPLES PER SECOND MATH IS 1)
engine_rpm = rpm * 2; //SPROCKET RATIO TO CONVERT PUMP SHAFT RPM TO ENGINE RPM
reading = scale.get_units() + 0.08 - 0; //ZERO LOAD CELL BY REPLACING 0's WITH NEEDED OFFSET
pCount = 0; //RESET PULSE COUNTS PER DATA SAMPLE
//PRINT THE OUTPUT VALUES AND CALCULATE HP
Serial.print(engine_rpm);
Serial.print(',');
Serial.print(rpm);
Serial.print(',');
Serial.print(reading);
Serial.print(',');
Serial.print(rpm*reading/5252);
Serial.println();
}
}
//WHEN A PULSE IS DEDECTED INCREMENTALLY COUNT
void interrupt0(){
pCount++;
}`
i would prefer help in the direction to learn myself but i am willing to pay someone something for their time helping me. However this is not a project i am willing to spend a ton of money on.
I'm sorry. you are right, i don't understand much of this yet but i will eventually learn more. maybe i should have stated all of the part numbers for the arduino, load cell and driver, and the encoder were provided my someone who has already built one of these dyno's. i consulted him and he said what i have looks correct to what he wrote but that he was not a coder just learned on him own also.
Every now and then, we get a newbie posting on this forum who's communication just isn't communication.
Think about it. We're sitting here staring at our screens, and all we know about your project is contained within the posts you make. Nothing more, nothing less.
So, sit back and describe the project in detail. We're not going to sit here and extract the details one at a time with question-answer back and forth.
Sorry, reality sux.
There's your problem. one of two styles must be adhered to:
make a new post with the updated information (much preferred)
edit the original post, AND MAKE A NEW POST to tell us you've done so. The edit trail can be reviewed by posters to see what you've added/changed, but it is a real mess to do so, and most won't make the effort.
The latter will generate some snark, but at least we all know the OP is being updated. If you don't tell us immediately when you modify it, no one knows to go back and re-read it.
The problem with edits to the original post is, it leaves us with the opportunity to revise our posts along the way, making the whole thread a complete jumble. Not nice.
Far better to make a new post within the thread, presenting the updated 'picture' you want us to help you with.