News:


  • June 01, 2024, 05:29:41 AM

Login with username, password and session length

Author Topic: Question for Robert-Jan  (Read 588 times)

Offline Howard Rush

  • 22 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 7818
Question for Robert-Jan
« on: November 08, 2010, 06:11:29 PM »
Or for anybody.  What is a good way to record engine or motor RPM with the Sparkfun Logomatic V2?
The Jive Combat Team
Making combat and stunt great again

Offline Robert-Jan

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 93
Re: Question for Robert-Jan
« Reply #1 on: November 10, 2010, 02:27:17 PM »
Howard,

You can do it the easy way by reading out the CC ICE.
I have not done it but I would try doing the following.
Connect a hall sensor to an input.
And use a counter and interrupt stuff to measure the frequency.

How far are you with programming?
I can use it as a timer. The motor power and running time are in the TXT file.
The logging starts and stops with the running of the motor.
At this moment I log the current voltage 3 G axes and the rudder deflection.

Because of the weather the project is moving slowly at the moment.
The idea is to regulate the motor some how.

By the way I found that the input and RPM are not linear in governor mode.

Greeting Robert-Jan

Offline Howard Rush

  • 22 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 7818
Re: Question for Robert-Jan
« Reply #2 on: November 10, 2010, 04:10:52 PM »
Thank you.  I do not plan to use a Castle speed control.  I want to log some analog signals with the Logomatic in addition to RPM.  It would be nice to be able to log RPM digitally while I log the others with the Logomatic's ADCs, but it appears that one must either have all digital inputs or all analog inputs.  Alternatively, what is a good way to convert an RPM signal to analog?  Filtering the sinusoidal motor input and using a frequency-to-voltage converter seems crude.
The Jive Combat Team
Making combat and stunt great again

Offline Robert-Jan

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 93
Re: Question for Robert-Jan
« Reply #3 on: November 11, 2010, 04:03:49 AM »
Howard,

For the analog option maybe this can help you.
http://www.national.com/mpf/LM/LM2917.html#Overview
I cannot find what the minimal VCC is, in a diagram they show 6 V.


If you go the digital way there are 2 options.
1 Measure the time between 2 pulses
2 measure the number of pulses in a fixed time.

You can give al pins their own unique function. I use one for the PWM output and the others for analog inputs.
This is done with PINSEL0 and PINSEL1

I would go for option 2 because the frequency is rather high.
Means that the difference between 9000 and 9001 is just a to small time
You must start a counter and after some fixed time read the value of the counter
As interrupt you can use EINT0 ,1,2, or 3 these correspond to pin’s on the chip.
Under interrupt you count the pulses. After a fixed time look how many counts you have. This is linear related to the frequency.

This is useful links
http://www.embeddedrelated.com/groups/lpc2000/show/35363.php
http://forum.sparkfun.com/viewtopic.php?p=79337&sid=1a3189bca9b1efc9077b4dbd3fb75adc
http://winarm.scienceprog.com/arm-mcu-types/interrupt-system-of-arm-lpc2000-microcontrollers.html


Greetings Robert-Jan

Offline Howard Rush

  • 22 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 7818
Re: Question for Robert-Jan
« Reply #4 on: November 12, 2010, 01:29:31 AM »
Thanks, R-J.  I have an LM2917 that Dr. Briggs brought over awhile back and forgot about.  I couldn't find min. VCC on the data sheet either, but it will work with the propulsion battery on an electric stunter.

I don't understand the Logomatic programming.  If Sparkfun writes documentation for the Logomatic before I want to use it to record RPM, I may record it digitally.  Otherwise I'll probably use the frequency-to-voltage converter. 
The Jive Combat Team
Making combat and stunt great again

Offline Robert-Jan

  • Trade Count: (0)
  • Lieutenant
  • ***
  • Posts: 93
Re: Question for Robert-Jan
« Reply #5 on: November 12, 2010, 02:07:32 AM »
Howard,

Don't expect a manual from spark fun.
The only manual they have is how to configure the C++ compiler.

For me it was also a puzzle. (and still is)
The language C++ is completely new.
If you need help don't hesitate to contact me. (or some one else with questions)
It took me some time to find things out but I will me more than happy to share my knowledge to the control line community. We can talk each other via Skype.

My goal is to make a timer/logger/controller.
The first 2 parts are working more or less.

For people who are new I will give a (very) small explanation on what I did.
First instal winarm on you computer (it does not compile on vista, It works the best under XP)
Now try to put in the original file.
If this is working you can start programming.
The first thing I did was programming the PWM output to control a ESC.
This took me a lot of time because I had no debug possibilities.
After this was working I found that you can sent messages and variables by the RS232 port.
This is great you can print a line so you now what the program is doing. But it is not a normal RS232 port you need a convertor If you buy the logger also buy the convertor. I think this is my most useful tip.
After this I modified the TXT file so now the program reeds the time and motor settings from the TXT file.
Next thing I did was starting and stopping the logging.

What I have to do is find out why I can only store 10 samples / second.
Think how to regulate.
And find out how to modify the TXT file in the field.
Write calibrate values to the SD card.

Greetings Robert-Jan


Advertise Here
Tags:
 


Advertise Here