Hi,
I would like to show you what I wanna do with Arduino.
for passion I've always been fascinated by how many horses did the engine of my bike, and now I'm trying to build a dyno, both to approach to electronics and to fill my free time.
I decided to use an Arduino UNO (of course ) on which to attach:
1 - A Hall effect sensor to count the number of revolutions of the roller the dyno;
2 - A circuit with an inductor for the number of revolutions of the engine;
Once deleted the problems of physical construction of the bench (easily solved), I ran into programming problems.
The problem isn't write the program itself, but is that since I'm a neophyte to arduino, I don't know all its potential and I get to find solutions that are too articulated and complicated.
Right now my main concern is this:
Can I use two sensors simultaneously on the same arduino board, or i need to buy another board?
I had it all up and running but could not get rid of some repeat dips in the readings.
Then private problems stopped me for working on the project and it was put on hold.
Now private issues are solved and got more free time and landed in the ARDUINO world.
So here the mechanical problems are also passed as you can see on the video.
The program is running as intended but the collection of correct data is still the issue with the dips.
Do not know enough of programming in Arduino.
Your major concern is to measure ONE RPM of the flywheel or rollers and calculate it to torque and power ratio.
This should be done at certain time stamps 20 ms (50Hz) is suffcient.
Let me know if I can assist in any way.
Timestamp difference to rpm difference to known inertia weigth gives torque. Power is an equation from the torque figure.
I found Sunday something nice. google @ simpledyno.......
You're using inertia rather than steady state? That's going to limit your accuracy unless you use a huge load, with all the safety implications.
In that case, have you considered using the real road as your dyno and just do an in-gear acceleration pull? You can approximate aerodynamic drag and rolling resistance if you know the mass and do a coast-down test. This has the advantage that you can use it in any location and on any vehicle as long as there is a gear that it can take full throttle over your required rev range without spinning the wheels or reaching excessive speeds. I find data logged acceleration runs a very handy way to see the effect of small tuning changes. Although it doesn't give the precision of a steady state measurement on a dyno, I'd argue that it is more realistic in practical terms since there is actually no point optimising your engine for steady state conditions since it is never actually used under those conditions.
A friend of mine had a hill/sprint car that turned out to have a blocked main jet but ran for several seasons just on the acceleration pump. It was brutally fast and went through the gears so quickly that he was never at full throttle for long enough to see the problem.
backbone:
Timestamp difference to rpm difference to known inertia weigth gives torque. Power is an equation from the torque figure.
I found Sunday something nice. google @ simpledyno.......
Paco
this is too simple
PeterH:
You're using inertia rather than steady state? That's going to limit your accuracy unless you use a huge load, with all the safety implications.
In that case, have you considered using the real road as your dyno and just do an in-gear acceleration pull? You can approximate aerodynamic drag and rolling resistance if you know the mass and do a coast-down test. This has the advantage that you can use it in any location and on any vehicle as long as there is a gear that it can take full throttle over your required rev range without spinning the wheels or reaching excessive speeds. I find data logged acceleration runs a very handy way to see the effect of small tuning changes. Although it doesn't give the precision of a steady state measurement on a dyno, I'd argue that it is more realistic in practical terms since there is actually no point optimising your engine for steady state conditions since it is never actually used under those conditions.
A friend of mine had a hill/sprint car that turned out to have a blocked main jet but ran for several seasons just on the acceleration pump. It was brutally fast and went through the gears so quickly that he was never at full throttle for long enough to see the problem.
I don't like this choise cause i need a static dyno.
however, I need your help to find a solution to that:
can I make a loop that works for some seconds, after that print to serial terminal the result and after start again?
What bike your talking about?
Motor bike?
Then your inertia should be a large steel drum that is balanced to certain numbers.
Do you have this done already?
cntntn:
I don't like this choise cause i need a static dyno.
Well then, I'd say you've got some challenges.
How accurate do you want your measurements to be? What do you propose to use as your inertial load, and how are you going to calibrate it?
I'll try to be as accurate as possible.
For inertial load I'll make a flyweel of a certain diameter, with a certain weight as much as possible concentrated towards the outside.
But now this isn't the problem, this is a subsequent phase.
What bike your talking about?
Motor bike?
Then your inertia should be a large steel drum that is balanced to certain numbers.
Do you have this done already?
Paco
Frist of all thank you for link, it's very usefull
Yes, motor bike.
My flyweel will be a large steel drum, so i don't need a very very high precision. I have not yet done. subsequent phase
Now my concern is that:
how can I Intersect the data of the two sensor?
I have think that, I'll make a loop every second and every second i'll print that on serial monitor; so i'll know the rpm of the engine and of the flyweel.
I think this is a good point to start my calculations for torque.
Can I make these loop?
What you think about that?
Do you have another way to do that?
The principal problem (for me) is how to measure the time, I don't knwo if arduino have a function to do that
cntntn:
For inertial load I'll make a flyweel of a certain diameter, with a certain weight as much as possible concentrated towards the outside.
But now this isn't the problem, this is a subsequent phase.
It's a problem if you base your solution on something that turns out not to be feasible!
Put some numbers to it - how much energy are you going to need to dump into this flywheel? You are limited in terms of the diameter, mass and maximum RPM that you can safely achieve. If your solution assumes that you can make a very heavy flywheel, or one that rotates at very high RPM, you could end up needingt something very dangerous. So put some numbers to it - how much energy, what size, what mass, what moment of inertia, what RPM. Do the numbers look safely feasible?
it's safely feasible, I'm sure.
I'm limited only in terms of diameter, I think 50-60 cm it's the most i can do.
the other thing have no limit!
mass is not a problem, I can double it just with another flywell (only for mass, without sensor) positioned on the back of the principal one (I do not know if I explained it well).
the only limt of the rpm is how much the sensor can read with a significant precision (and I think It's much more than I need).
just to give you an idea, that are about the data i think have:
max RPM of flyweel 680 /min (with a 50cm diameter flyweel)
mass is not a problem (a heavy flyweel is only more accurate, the final RPM it's the same of a light flyweel)
diameter, i said, about 50/60cm
power, i think (i hope XD), 20CV ( 15KW)
I really don't know how much torque... but not too much
at the end that are not problem now, if the flyweel is too much light i can make heavy it... I can find a solution for that problem
Now the question is that:
as I said in previous post, can i make a certai time loop, or i have to find another way??
If you have a mountain nearby with a nice long straight stretch all the same slope then you can have some seconds going up the hill to know how much power you used. With the right instruments you wouldn't even need all the same slope as long as you keep going up. You would need a scale that can weigh you and the bike with gas, etc.
GoForSmoke:
If you have a mountain nearby with a nice long straight stretch all the same slope then you can have some seconds going up the hill to know how much power you used. With the right instruments you wouldn't even need all the same slope as long as you keep going up. You would need a scale that can weigh you and the bike with gas, etc.
I know that if I make a test bench, measurements do not consider friction and other parameters. But now i need that, this is a support that i need to other things (like making exaust, timing diagram of engine, cranckcase volume). I need a static dyno tester, at the moment.
I need only to solve the problem of the time, how can I measure it? can I do as I said before?
Here is the code I use in Vb to calculate the power.
Like I said you need to make tiem stamps and compliant rpm values.
Those you put in the calculation and ready.
You have to work in these steps:
1] how to produce RPM reading to serial box with the UNO use simple electric motor with optical sensor.
2] If one RPM is OK create second.
3] create precision timestamp with the UNO.
4] create calcualtion in UNO with above data.
You said in the first post the mechanical part was ready.
What I read now it is not or I have mis read it.
Google for as much info as you can get on steeldrum dyno's.
Exmaple code I use:
'### This part calculates the torque/power/watts values
'### Formulas
'To calculate torque you need to know the inertia value (I) of the flywheel.
'you can download and inertia calculation program for free at http://www.controleng.ca/inertia-mass-calculator.htm
'example: it takes 0.12 secondes to accelerate the flywheel from 1000 to 2000 rpm
'I = inertia value (kg/m2) in this example we use 0.256044 (Kg/m2) (in our project this is 0.0035846 Kg/m2)
'T = torque (Nm)
't = time (sec)
'w = rotation speed (rad/sec/sec) = rpm /60 * 6.28
'a = dW/dt = (current rpm - previous rpm)/(current time - previous time) = (2000 - 1000)/ (0.53 - 0.41)
'T = I * a
'--------------------------------
'T = inertia * (((rpmEngine - lastrpm) / timedif) / 60) * 6.28 'Nm value
'T = 0.256044 * (((2000 - 1000) / 0,12) /60) * 6.28 = 223.67267 Nm
'Power = T * RPM / 5252
'Keep in mind that the RPM in the power formula must be the average RPM between the last two sampling periods.
'Power = 223.67267 * ((2000 + 1000)/2) / 5252 = 63.88 Hp
'Power = Format((Torque * ((lastrpm + rpmEngine) / 2) / 5252), "000.00")Â 'Hp value
'Watts = 63,88 * 746 = 47654.5 W = 47.6 KW
'Watts = Format((power * 746) , "0000.0") 'Watts value
'----------------------------------------------------------------
One thing about time on the Arduino, it's not rock-solid totally accurate. You need an RTC for that. Not so sure? People have posted here before about two Arduinos not staying in synch when running blink. With the internal oscillator calibrated you can be within 1% and with a crystal I think you can get closer but I dunno just how much -- and still the suckers won't stay in synch. When they run an interrupt, the millis() clock stops while the IRQ is processed and that does include interrupts for serial communication.
1% is only 3.6 seconds per hour after all. I guess it matters as much as you want to let it. And you can get the RTC and be clock-sure.
How to get the time? You can measure when the drum has turned and get a time-stamp with that data saved somewhere, like back on your PC. Or if you have continuous data then you can have the RTC trigger the Arduino to write time and data say 10x per second. Either way, the timing will be in your collected data.
For continuous data... if your drum has an axle shaft that you can mount a bar magnet on the end of then a linear Hall sensor placed over the center of that will give you angle data on the magnet. That's how Saitek senses joystick position on their better sticks. Not pots to gum up. Yes, you can know the drum is turning before it has turned a whole entire degree. 0~1000 (if you go to 1023 then a higher reading will still show 1023, so why not choke it a tiny bit?) for 180 degrees is better than 5:1.
When the sensor and magnet align one way, the field is high and 180 degrees later the field is low. So the data would look like a sine wave at steady speed. Your RTC would trigger the data capture and store maybe 100x a second and you have your data at known intervals, you should be all set.
If the data is going to a PC then have that do any RT processing, storage and display.
cntntn:
I need only to solve the problem of the time, how can I measure it? can I do as I said before?
I think the practical mechanical issues you're discounting may be more of a problem than you think, but there's no point repeating myself.
Setting all those aside and focussing on your question about the sketch, I suggest you start by describing exactly what you want your overall dyno to do. For example, will you be passing the measured roadspeed/rpm/time data to a PC for logging and analysis, or is the Arduino to be standalone? How do you intend to read the sensors - polling, interrupt triggering etc?
PeterH:
I think the practical mechanical issues you're discounting may be more of a problem than you think, but there's no point repeating myself.
Setting all those aside and focussing on your question about the sketch, I suggest you start by describing exactly what you want your overall dyno to do. For example, will you be passing the measured roadspeed/rpm/time data to a PC for logging and analysis, or is the Arduino to be standalone? How do you intend to read the sensors - polling, interrupt triggering etc?
Yes, I need to passing the data measured to the pc, to save and analyze it. I think i can do it with the serial monitor tool of arduino.
I need to read sensor only to measure torque.
The final output I need is torque in function of engine RPM.
GoForSmoke:
One thing about time on the Arduino, it's not rock-solid totally accurate. You need an RTC for that. Not so sure? People have posted here before about two Arduinos not staying in synch when running blink. With the internal oscillator calibrated you can be within 1% and with a crystal I think you can get closer but I dunno just how much -- and still the suckers won't stay in synch. When they run an interrupt, the millis() clock stops while the IRQ is processed and that does include interrupts for serial communication.
1% is only 3.6 seconds per hour after all. I guess it matters as much as you want to let it. And you can get the RTC and be clock-sure.
How to get the time? You can measure when the drum has turned and get a time-stamp with that data saved somewhere, like back on your PC. Or if you have continuous data then you can have the RTC trigger the Arduino to write time and data say 10x per second. Either way, the timing will be in your collected data.
For continuous data... if your drum has an axle shaft that you can mount a bar magnet on the end of then a linear Hall sensor placed over the center of that will give you angle data on the magnet. That's how Saitek senses joystick position on their better sticks. Not pots to gum up. Yes, you can know the drum is turning before it has turned a whole entire degree. 0~1000 (if you go to 1023 then a higher reading will still show 1023, so why not choke it a tiny bit?) for 180 degrees is better than 5:1.
When the sensor and magnet align one way, the field is high and 180 degrees later the field is low. So the data would look like a sine wave at steady speed. Your RTC would trigger the data capture and store maybe 100x a second and you have your data at known intervals, you should be all set.
If the data is going to a PC then have that do any RT processing, storage and display.
Tell me if I understood correctly, I can measure time only with arduino, but I have an error of 1%. If I want an accurate measuration, I need to do a module with a RTC. That's right?
cntntn:
Yes, I need to passing the data measured to the pc, to save and analyze it. I think i can do it with the serial monitor tool of arduino.
I need to read sensor only to measure torque.
The final output I need is torque in function of engine RPM.
What data will you upload to the PC? Just tuples of timestamp, rpm, roadspeed and torque? Will you be recording throttle angle or MAP? Any EGO readings? You'd really need these if you're going to tune the engine (as opposed to just recording the performance). Are you taking any environmental measurements? For example, pressure, temperature and humidity will all affect the power output and you would need to know them to make any meaningful comparison with readings taken under different conditions.
How will you be measuring torque, engine speed, road speed? I mean in terms of the inputs you're going to present to the Arduino, and what method you're going to use to read them.
@Goforsmoke- You can make the Uno clock accurate to about 1ppm by calibrating it. I did this with GPS. It's the same from day to day. I assume it's sensitive to temperature, but I have not tested this.