SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By SW
#6482
OK So I embarked on a project, and everything was going fine, until I wanted to do "more" and now need help...

I want to use the Serial Accelerometer V5 as a power meter. That is I want to measure the power in moving objects. A rollercoaster, a car, a model airplane, a horse, all over short time spans. Say 10 seconds.

I know what to do, I just don't know HOW to do it. That is, I know if I integrate the acceleration once I get velocity. And, If I multiply Velocity times Force, I get power. I get my force from F=mA. So in real-time I am looking to solve for Force and then multiply again by the integration of acceleration for Power.


Sooo...

I understand I could get velocity from the pic. That is to say the PIC will do the integration, but how would I handle the mass issue. Masses would change as the device is going to be used on several different things with different masses...

So it seems smarter to me to have the Accelerometer merely report acceleration, and do the number cruching on the receiving computer.

Which means...


I need a software program where I can enter in a mass, read the COM port, and control a logging time (start and stop) with a key stroke. The device is always "on" just only logging in real-time (Power and force) with the start keystroke. After the stop is pressed a log is kept and I can plot the power and force on a graph...

OK so now help me...please...
By SW
#6544
Anyone have any ideas/help?
By eugen
#6559
Hi,

What kind of help do you need?

I think this is very ambitious bordering on the impossible. Not due to the complexity of the project, but due to the nature of things.
Consider a car for example. The power varies over the rpms and thus, as you do not run the engine with constant rpms during acceleration, you will see constantly changing power.

Then you cannot ignore the efficiency. What losses do you have between street and tyre, in the gearbox, and so on... As I assume that you do not measure in vacuum, the air resistance will play an increasingly big role during acceleration. With a good gearbox layout you will see maximum speed of the car at maximum power of the motor. In that moment the air drag plus friction is in equilibrium with the power of the motor. So: Maximum power at zero acceleration...

With a model airplane you will see a drastic change of efficiency of the propeller with changing speed of the aircraft.

Similar limitations apply for other motors and probably even for horses.

And we haven't even considered the mass yet...
By JohnLeung
#6601
This projecy is funny for me since I have left the Physics department ten years ago. Honestly, I have forgot all equations (F=ma), but I believe there are several ways to do the same thing:

1. A hand-held device with a 9V battery power supply.
a) A 7805 voltage regulator for +5V power. If you want a higher efficiency, consider all those DC-DC converters found in Maxim.
b) A mcu like avr or PIC,....
c) A real-time clock like DS1302/7 for a time stamp with a small Lithium battery for backup.
d) An eeprom device like 24LC256, depends on how much data you want to record and the time stamp.
e) A 2x16 LCD for user interface. Only required for mass input, and some sort of information like the realtime acceleration measurement, and realtime setup.
f) five push buttons or tactile switches, SET/CONFIRM, UP, DOWN, START, and STOP. The number of button depends on how you arrange the function of each button. Say, long press the SET button for 2 sec allows input of Mass data. UP and DOWN for toggle the input number from 0-9, and then set again to confirm. All these buttons will also be useful for real time settings.
g) Max 232 chip for uploading all data to a PC for analysis.
h) Lastly, the accelerometer.



Use TMR0 for a 1 second interrupt, measure the acceleration, take a time stamp, then store all that information to the eeprom. Repeat for every second. Change the 1 second interrupt to a shorter one if you want a better resolution.
....

Actually, it is rather like a flight data logger project that you may find on www.picant.com.

2. If you want more, you may consider using a graphical LCD like 128x64 for a real-time graph plotting. However, that involves a lot more programming effort. If your budget allows, consider Amulet LCD (www.amulettechnologies.com)

3. Finally, you can refer to a book on C module for embedded programming by Jean J Labrosse. He is the author of the well known uCOS-II. It is an excellent book for embedded programming (in C).


Hope these help a bit.


John
By LopeD
#6937
i hate sites that dont give prices, or even ballpark prices. you know they are expensive as hell if they do that.