Matlab program to montior the motor performance

Click For Summary

Discussion Overview

The discussion revolves around creating a MATLAB program to monitor the performance of a motor in a model airplane. Participants explore the necessary instruments and methods for measuring various parameters such as temperature, voltage, current, power, static thrust, and RPM, with a focus on USB connectivity for data acquisition.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant expresses concern about the potential cost of the required instruments and seeks affordable options.
  • Another participant shares their experience with a USB interface board that can handle multiple inputs and outputs, suggesting it as a viable solution.
  • Some participants propose that measuring power could be done through calculations rather than direct measurement.
  • There is a suggestion to explore used or rental equipment as a cost-saving measure, with specific brands mentioned.
  • One participant raises the issue of weight added by sensors and the need for a strain gauge to measure thrust.
  • Another participant suggests using shunt resistors for current measurement instead of a dedicated ammeter.
  • A different approach is proposed involving a Cypress EZ-USB microcontroller and analog-to-digital converters as a low-cost alternative to commercial data acquisition products.
  • One participant mentions the possibility of handwriting results for simplicity, questioning the necessity of computer interfacing.
  • Another participant shares their findings from a company, detailing specific instruments and their costs, indicating a total expenditure of around $964.

Areas of Agreement / Disagreement

Participants express a range of opinions on the best approach to take, with no clear consensus on the most cost-effective or efficient method for monitoring motor performance. Multiple competing views on instrumentation and data acquisition methods remain unresolved.

Contextual Notes

Participants mention various instruments and their specifications, but there are limitations regarding the assumptions made about the required measurements and the compatibility of suggested solutions with MATLAB.

Who May Find This Useful

This discussion may be useful for hobbyists and engineers interested in motor performance monitoring, data acquisition, and MATLAB programming, particularly in the context of model aircraft.

Cyrus
Messages
3,246
Reaction score
17
I am considering writing a MATLAB program to montior the motor performance of my model airplane. I would have to do it through USB, because I only have one 232 port, so I can't use multiple devices from that one port.

I would like to montior the temperature, voltage, current, power, static thrust and rpm.

Then I can make MATLAB plot the info.

Does anyone know where I could find some CHEAP! instruments to do this?

I think this might be too expensive to actually do though...
 
Physics news on Phys.org
I bought a USB interface not long ago, it takes analog and digital inputs. I bought it in Kit form and soldered it up myself.

http://cpc.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=HK00851&N=411

Im not sure where you could get one in your neck of the woods.

The K8055 interface board has 5 digital input channels and 8 digital output channels. There are also two analogue inputs and outputs with 8-bit resolution. The number of inputs/outputs can be further expanded by connecting up to 4 more cards to the PCs USB connectors. All communication routines are contained in a Dynamic Link Library (DLL). You can write custom Windows (98SE, 2000, ME, XP) applications in Delphi, Visual Basic, C++ Builder or any other 32-bit Windows application development tool that supports calls to a DLL.
# 5 digital inputs (0=ground, 1=open) (on board test buttons provided)
# 2 analogue inputs with attenuation and amplification option (internal test +5V provided)
# 8 digital open collector output switches (50V/100mA max.) (on board LED indication)
# 2 analogue outputs
# 0-5V, output resistance 1K5
# PWM 0-100% open collector outputs max. 100mA/40V (on board LED indication)
# General conversion time: 20ms per command
# Power supply through USB: 70mA approx
# Diagnostic software with DLL included
# Dimensions (WxHxD): 145x20x88mm
 
Last edited by a moderator:
Define cheap. DAQ would be a lot cheaper if you were just going for temp. Power would be a calculated value. You wouldn't necessarily measure it directly.
 
Under 300 bucks for the whole shibang.
 
Under $300? Snoop around the "used" and "rental" joints --- you can find some very good deals on discontinued models of what are otherwise very good instruments. Keithley, HP, Tek, Philips, the whole "high-priced" legion at nickels and dimes on the "new" dollar. Thought I still had the link handy, but McAfee's "monkey" seems to have flattened it --- google "used laboratory equipment (or instruments, or multimeter, or scanning multimeter)," you'll find some pretty shady looking hits, some people who are very proud of their inventories, and some decent deals.

KUSB 3108 goes for around $1k, lower resolution models around $500 --- you might look 'em over --- shipping time stinks, or did --- "just in time business model" far as I can tell. U. S. nationals only --- "sensitive technology" restrictions apply.
 
You could look into something like Omega's Nomad line. You don't want something with telemetry because that will cost more and add a transmitter.
http://www.omega.com/ppt/pptsc.asp?ref=OM-40&Nav=dase01

The thing I am wondering is how much weight are you going to be adding? To get thrust, you'll need at least a strain gauge which will require power and conditioning. That may hinder you.
 
This is for a trust stand. It won't be in the model. I found one place that has data logging sensors, but not what I need. I gota call for the price. Remember, I want something that has USB. I want to dump it into matlab, if possible. The problem with the Ammeter I found is that it won't do 30+ Amps that I need.

*If* I can find all the things I need, I would probably need to buy a Laptop on my workbench. Arg, I guess this is going to be about ~1k in total. I hope not, but if it is, so be it.
 
Last edited:
cyrusabdollahi said:
(snip)The problem with the Ammeter I found is that it won't do 30+ Amps that I need.
(snip)

Run down to Radio Shack, or whatever your favorite "toy store" happens to be, and pick up the appropriate shunt resistors.
 
Bystander said:
Run down to Radio Shack, or whatever your favorite "toy store" happens to be, and pick up the appropriate shunt resistors.
A few feet of copper wire can make a reasonable high current shunt.
It's cheap.
You don't have to buy an ammeter.
A volt meter will work fine here.
 
  • #10
Forget the ready-made data acquisition products -- they're going to be too expensive for your budget.

Get a Cypress EZ-USB microcontroller -- they're easy to program and cost about $7 a piece. They make interfacing with a PC via USB a snap.

Next, get some moderate-speed serial analog to digital converters, like the AD7476 from ADI. You can very easily connect these to your microcontroller, and they're only a buck or two each.

You should be able to find some basic temperature sensors, etc. from any decent distributor like DigiKey.

You're going to spend more to have a printed circuit board fabricated than you will on the components.

- Warren
 
  • #11
BTW, I have boatloads of experience with the devices I mentioned, and can give you any help you want/need with them.

- Warren
 
  • #12
Just spitballing here...

There is one other option...You could go old school and handwrite results. Are you planning on doing transient measurements or steady state? With the few measurements you're talking about, it wouldn't be that hard. You would only have to worry about displaying your instrumentation instead of also interfacing with the computer. That occurred to me yesterday as I was walking by one of our old manometer banks.

You could also see if your department has a strip chart recorder available. We have models that accept 6 inputs. They're nice for looking at transients.
 
  • #13
I just want to make a simple stand where I can hook up the motor, prop, battery and speed controlled and run it. That way I can vary the throttle setting, and have a log of what the current was over time, what the temperature was, what thrust the propeller makes, what RPM is the motor producing? This is not necessary, but I would find it interesting to know.

I do not want to record by hand, that is archaic and pointless when I can do so much more with Matlab.

Chroot, your offer is generous, thank you. I will take it into consideration. I am not an EE or a programmer, so the though of making it myself from the basics is a bit unnerving. :yikes:
 
  • #14
Ah, well, using an off-the-shelf data acquisition module would be the easiest route, but they suffer from major price inflation. For some reason, a couple of 1990's through-hole components soldered to a two-layer board goes for $300 on the open market as a "hobbyist DAQ module"... but you can construct a USB 2.0 (400 Mbps) interface to a couple of almost theoretically perfect > 1 MSPS A/Ds for the price of a meal at McDonalds. I suppose it's just supply and demand at work.

Hmmm... maybe I should get into business making super high-speed high-capability hobbyist modules...

- Warren
 
  • #15
I found everything I need!

It's going to total to about 800 bucks though! AHHH!

Oh well. I'll post more details later.
 
  • #16
did you not look at that usb interface board? Is that not enough?
 
  • #17
Here is what I found from this company. http://www.cometsystem.cz/english/

I just got off the phone with their US distributor. Nice, knowledgeable guy.

The parts that he has that I can use are:

  • Dual Channel V/I metter (I will have to step down the V/I through a network myself and then step it back up in matlab) Price$355
  • Four channel Data Logger- (2,temperature, 2, other) $365.00
  • Optical RPM measurement sensor $69
  • 2 usb adapters $100
  • 2 2-m temperature probes $70
  • Power supply for the RPM measurement sensor $5.00
  • Total price $964

But I can buy it in pieces, so I might try the V/I sensor first, and work from there. The data comes in a good format for using MATLAB too.

Code:
ýrobní èíslo:  01910443
Test

                            Teplota        Vlhkost        Ros.bod
                               [°C]            [%]           [°C]

3.3.2003 14:07:00              23.5           11.5           -7.3
3.3.2003 14:08:00              22.7           11.7           -7.6
3.3.2003 14:09:00              22.5           11.7           -7.7
3.3.2003 14:10:00              22.3           11.7           -7.9
3.3.2003 14:11:00              22.3           11.6           -7.9
 
Last edited:
  • #18
Jesus H. Christ, that's highway robbery.

- Warren
 
  • #19
:smile: your telling me!
 
  • #20
Those modules probably contain < $10 of components, and probably took a contracted EE less than a week to design.

- Warren
 
  • #21
Would making something like this be too much to tackle? Within the realm of possiblity?
 
  • #22
Depends. If you have no idea how to design PCBs or develop embedded firmware and so on, it would probably take you a few months to do. You might also get fed up with it and quit.

If you're just looking for the easiest way to get the data you want, paying $1000 for the DAQ hardware is it. I don't know how much hobbyist interest you have in the DAQ itself.

- Warren
 
  • #23
Well, I am an ME, not an EE, so all this stuff is Foreign to me.

I would prefer to make it myself, but I don't have that kind of time to devote to learning how to make my own hardware and software. I want to learn eventually though. I think you said it with "You might also get fed up with it and quit."

Talking with the guy on the phone, he told me that I would need to put a network to step down the voltage and current not to exceed the reading of the meter.

If I were to do that, how would I know what fraction of the total voltage/current is going through the meter? Wouldnt I need to know the total resistance of the motor and speed controller? Is that going to be a constant, will it change significantly with temperature? Can I determine it's value with my multimeter?

This is becoming complicated! :cry:
 
  • #24
cyrusabdollahi said:
If I were to do that, how would I know what fraction of the total voltage/current is going through the meter? Wouldnt I need to know the total resistance of the motor and speed controller? Is that going to be a constant, will it change significantly with temperature? Can I determine it's value with my multimeter?

A simple resistor divider can be used to step down the voltage, and a shunt resistor can be used to step down the current.

- Warren
 
  • #25
How does that work? Do I need to know the resistance of my motor in order to select the resistors to construct such a divider/shunt?

Is that as simple as switching my multimeter to Ohms and touching the leads to the motor?

Is the resitance of the motor going to change significantly as the temperature changes?
 
  • #26
cyrusabdollahi said:
How does that work? Do I need to know the resistance of my motor in order to select the resistors to construct such a divider/shunt?

Not really. You just need to select high-valued resistors for the divider, so that the resistance of the motor is negligible in comparison. You can use megohm resistors for the divider.

For measuing large currents, the shunt resistor is placed in parallel with the ammeter. The shunt resistance is very, very small as compared to the resistance of the motor, so it hardly affects the flow of current through the complete circuit.

- Warren
 
  • #27
I see. Well, I can buy this thing one at a time. I will probably buy the V/I meter first. I have an optical tachometer, but it does not hook up to a port. I also have a handheld multimeter that I can read voltage with (or current/ Resistance).

If it works well, then I can buy the temperature DL later, as not to spend so much money at once.
 
  • #28
  • #29
AHA! I found one that does exactly all of the above and has a thrust stand and its for $200.00 bucks and it has a USB interface!

YESS. I am soooooooooooooo glad I opened up this issue of Model Avation Magazine. :biggrin:

You were right Chroot, high way robbery!
 
  • #30
What's the name of it? Does it have a web site? I'd be interested to see the specs on it.
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
3K