Newbie needs help

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++;
}`

@joneal251 ,

I have moved your topic to the correct category for paid jobs. Please take care when choosing a category.


empty

thanks, i was more so looking for help to learn to program the sketchs but which ever place you feel appropriate. thanks

I edited it. I need help getting my current sketch to function properly and i want to add 1 more input

You said you wanted to pay someone, is that not the case?

Depends on the cost

I suggest you indicate a budget and be clear about what you want. At the moment your request seems rather vague and ill defined.

I know that stuff ... but for 100 bucks ... :rofl: :rofl: :rofl:

This is with the engine at an actual 4250 rpm.

And below is with the engine at an actual 3800RPM

Well, there are differences. This is just for reference if somebody feels the need to take up the job without knowing what's all about :slight_smile:

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.

As best as i can tell my part numbers are the same as what he used previously

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.

I updated my original post again with as much info as i can think of. i do apologize this is my first time using forums and such to ask for help.

My post was moved here. I tried posting in the discussions thread. i thought i would get some friendly help here. have a great day.

There's your problem. one of two styles must be adhered to:

  1. make a new post with the updated information (much preferred)
  2. 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.

Good luck, I'm out.

Thank you for your suggestion. I will do that.

Your post was moved here because of this Statement i guess.

And what it means: You go to a store, pickup an item worth $1000 without seeing the price, but at the counter you say I'm willing to pay only $20.

Understanding the problem here?

It's better to shift this to an appropriate section and provide as much information as possible there for people willing to help voluntarily.

1 Like