DC motors are fairly easy to understand. Unlike certain hardware used in the cockpit-building industry, which often feature multiple connections, tricky circuits and delicate soldering, DC motors rest on the same level of simplicity as an everyday push-button switch.
A standard DC motor has just two terminal connections. A negative (black) and a positive (red). These two terminals are identical to the type you would find on a push-button switch, and they connect up in an identical fashion too. These two terminals then connect to a power supply, whether that be a battery, mains power or, in the case of this review, the DC motors card itself. Of course, be careful which one you choose. Connecting a small 5V motor to a 240v mains supply is, quite frankly, idiotic.
That's all there is too it! After connecting a power supply, the motor will will move forwards. Reversing the polarity of the connections will cause the opposite movement, and adjusting the voltage will adjust the speed accordingly.
Opencockpits, a Spanish company notorious for their extensive
range of cockpit-interfacing
cards, have designed a card that handles up to 6 simple
direct-current motors through a
computer's USB Port.
This card, very simple in its inception but extraordinarily powerful in application, is perfect for a wide range of uses. From converted aircraft gauges to cockpit autothrottle systems, the USB DCMotors Card has a place almost anywhere in a home-built cockpit.
The card provides full control over both speed and direction of the motor; crucial in a cockpit where every gauge is different. However, is the card as useful as it sounds? Is it a triumph of electrical engineering, or something that should be wholly ignored? Please, read on.
As with most Opencockpits products, the card can either be purchased directly from their online store, or bought from the Aviation Megastore. I usually prefer to purchase the cards from Opencockpits directly, as their shipping prices are often much more reasonable, and you are dealing with the company “one-on-one”, as opposed to through a third party.
Both companies feature a secure and verified payment process, providing you with the peace of mind that you are performing a safe online transaction. The card costs 41 Euros; that is, exclusive of shipping and applicable VAT.
Unfortunately, unlike other Opencockpits products, a kit version of this product is not available. This means that you have no choice but to purchase the pre-built edition of the product; a disappointment if you were looking to save some money and/or enjoy soldering.
The following list details exactly what is provided with the Opencockpits DC motors card:
- Ability to handle up to 6 DC motors using PWM (pulse width modulation, see later in review)
- Full direction and speed control through the freeware SIOC program
- Includes 5 analogue inputs, for potentiometers
- Able to accept up to 36V power supply
- Current peaks of up to 2A are catered for
- USB connection cable included
- Fully tested prior to dispatch
How does it work?
The DC motors card works using a technique called “Pulse Width Modulation”, or PWM for short.
The output from the motors card is provided in the form of “pulses”; the opening and closing of a circuit, sort of like an electronic heartbeat. These pulses can be used to control the speed of a DC motor, by varying the width of each pulse appropriately.
The above diagram illustrates how PWM works. The peaks of the
diagram (similar looking to
the roofs of skyscrapers) are when the circuit is switched on;
and conversely, the flat, low-lying
parts of the diagram represent when the circuit is closed.
Consider the following example. Imagine a simple circuit consisting of a battery (10V), a switch and a light bulb. If we turn the light-bulb on (close the circuit) for 50ms (milliseconds), and then turn it off for 50ms, we get a pulse. If this on/off pattern is repeated 10 times per second, we would expect the bulb to illuminate as if connected to a 10V battery. However, since the circuit has been (overall) closed for exactly 5 seconds, and opened for exactly 5 seconds, the voltage is halved; therefore meaning that the light-bulb lights as if connected to a 5V power supply.
Interestingly, this concept also ties in with the subject of Frequency, measured in Hertz (Hz). In the above example, the “modulating frequency” is 10Hz, and the “duty cycle” is 50%. For more information on these topics, I suggest you visit a website such as Wikipedia, or consult a professional.
Getting Started – First Impressions
I received my DC motors card, along with the included USB cable, a few months back. Of course, my first urge was to plug the card straight in; and that I did.
After seeing no puffs of smoke emerge from the card, and after hearing that all-familiar Windows 7 “ding-dong” sound that is made whenever a USB device is attached, I concluded that I had passed the first obstacle.
I then clicked on “Devices and Printers”, a small tab available through the start menu, and sure enough, the entry “IOCard USBDCMotors” had been listed under “unspecified” (this is where all FS devices go, whether they be Opencockpits, Saitek, Thrustmaster or Logitech!).
To further confirm if the card had truly installed, I executed the SIOC application (fantastic software that is freely available, see later in this review) and checked if the card appeared in the devices window. Thankfully, the card was recognized as “device 38”, just below the entry for my USB Servos Card, and just above the entry for my 737 Autopilot panel (two more products also available from Opencockpits).
Once I had given myself the all clear, I turned and faced the printed circuit board of the DC motors card and familiarized myself with its design. I managed to suss out the fundamental aspects of the card; two pins for each DC motor, and two pins for an “X” Volt power supply.
However, there were still a very large amount of things I didn't know about the card. For example, two pins protruding from the centre of the card, and an army of capacitors, chipsets and resistors; the functionality of which was completely oblivious to me.
Want to know more? Read on...
Installation and Wiring
Owing to the simplistic nature of how DC Motors function,
electronically configuring the card
was not a problem.
The manual states that, to connect a DC Motor, choose any two consecutive pins from the three sets of 5 pins on the side of the card (what a mouthful!). It does not matter which way round the terminals are connected, as the polarities of each pin shall be reversed anyway if one wishes to change the motors' direction.
However, since the DC motors card supports 6 motors, one would expect to see 12 pins adorning the side of the card. In fact, as stated above, there are 15 pins (3 sets of 5), not 12. This also means that only 4 pins per set of 5 will be used, leaving a mysterious “fifth pin”; the function of which remains a mystery.
I can only assume that the five-pin set is just a standard component that Opencockpits use, and that they have only chosen to use four of the available pins in order to cater for the use of DC Motors.
It is paramount that the user does not connect to the fifth pin, as it will render the respective motor useless. For more clarification, please observe the included wiring diagram below:
It is important to note the following things in the above
J1: This is the USB connector block, where a USB cable is connected and then plugged into a PC at the other end.
J2: This is the power connector, where any power supply up to 36V can be connected. It is essential that you either use the correct power supply for your motor, or place resistors in series with your motors to prevent too-high-a voltage developing. Unfortunately, there was not female connector plug supplied with the product; which meant I had to obtain my own, home-built alternative to connecting to this card.
J3 – J5 and J9: These are analogue potentiometer inputs. Each potentiometer has three pins; a Wiper (also called DATA), 5V (the power supply) and GND (the negative or “black” terminal). These potentiometer inputs are invaluable if you are wanting to design a gauge with the DC Motors card; as they provide electronic feedback to the SIOC software interface.
Strangely, in the documentation, the adjacent potentiometer inputs are labelled J3, J4, J5 (logically).. And then J9! It would make much more sense to call J9 J6, and it would probably lead to less confusion in general.
J6 – J8: These are the three sets of 5 pins. This is where DC Motors are connected to the card. For more information, see the paragraphs above the diagram. As you can see, nothing is connected to the fifth pin of each set.
J11: Three pins that are unused on the card. Nothing is connected to these pins.
Furthermore, there are two pins labelled “SW1” that are not present on the above diagram, but are present in the “principal dimensions” image at the start of this section. These two pins are special “reset” pins, and will do exactly what they say; using them will reset the card. It is strongly advised not to touch these pins unless you have been advised to by an Opencockpits member of staff.
For testing purposes, I wired three simple motors, taking up 6 pins overall (and, therefore, half the card's capacity). To start with, I did not use the potentiometer inputs; these would not be needed until I required a feedback signal from the card.
I also connected a 12V power supply to the card. This was because this particular voltage suited my motors best. In addition, I ensured that the current flowing out of connectors J3, J4, J5 and J9 did not exceed 1 Ampere; all according to Opencockpits' recommendations.
To house the power supply, I constructed myself a small “power box” which provided easy access both to and from the USBDC motors card.
With the card correctly configured, and the motors successfully
connected, it was time to
execute stage 2 of “operation commutator”; getting the DC motors
card to interface to FSX,
Testing, SIOC Software and FSX |
SIOC software, the freeware programming language developed by Opencockpits, allows an interface between FS2004/FSX and IOCards hardware, such as the DC motors card.
Whilst understanding the SIOC language can be fairly tricky, I feel that using it with the DC Motors card is straightforward enough. However, as I have done with all my Opencockpits reviews, I would advise you turn away at this point if you are not “in the mood”, as it is a fairly technical portion of this article.
Unfortunately, the provided documentation and files on Opencockpits' website yield almost no information regarding the operation of the DC motors card through SIOC.
A large portion of the knowledge contained within the section has been lifted from a comprehensive, “fan made” guide written by Hessel Oosten from the Netherlands. I would like to offer my sincere thanks to Hessel for helping me out here.
Note that, in addition to the SIOC software, unregistered/registered FSUIPC is required. For more information, please see the “downloads” section at the very end of the review.
Please study the script below, and then read the detailed annotations below it. Do not worry if you do not stomach everything; the annotations are purposely over-detailed and are designed as an in-depth reference for SIOC users.
Var 0, Value 0
&Motor_1 = 120
&Motor_2 = 120
&Motor_3 = 120
&Motor_4 = 120
&Motor_5 = 120
&Motor_6 = 120
Var 0001, name Motor_1, Link USB_DCMOTOR, Output 1
Var 0002, name Motor_2, Link USB_DCMOTOR, Output 2
Var 0003, name Motor_3, Link USB_DCMOTOR, Output 3
Var 0004, name Motor_4, Link USB_DCMOTOR, Output 4
Var 0005, name Motor_5, Link USB_DCMOTOR, Output 5
Var 0006, name Motor_6, Link USB_DCMOTOR, Output 6
Var 0, Value 0: A “Var” in SIOC is a shortened version of the word “variable”. A variable is, as the name suggests, anything that can vary; or, put another way, anything that can be in more than one state. Since SIOC is designed to interface electronic hardware to FSX, you can think of anything in a cockpit as a variable. For example, a switch is a variable; it can be “ON” or “OFF”. A bulb/LED is a variable; it can also be “ON” or “OFF”. Even hydraulic rotary switches are variables; they can be “ON”, “AUTO” or “OFF”. Anything that can be “clicked” in FS2004/FSX is a variable; likewise, anything that can “light up” in FSX is also a variable.
In SIOC, variables are declared by writing “Var XXXX”, where X represents any number between 0001 (one) and 9999 (nine-thousand-ninety-nine). They can simply be written as per the previous sentence, or the user can go a stage further, by linking them to an “FSUIPC Offset”, or to a piece of hardware such as a switch (in our case a motor).
Optionally, variables can be given a name. In this script, variables 0001 – 0006 have been called “Motor_N”, where N represents the respective motor.
Var 0, Value 0 is a special variable, because it does not conform to the pattern one would expect it to do so. As SIOC is an event driven language, nothing happens unless something changes (ie an event). For example; nothing will happen in SIOC if the user is sat still, with engines turned off, at a parking space at an airport; because nothing is happening. However, should the user turn the battery switch on, SIOC recognizes this as an event and reacts accordingly.
The reason Var 0, Value 0 is unusual, is because it is not event driven. Var 0, Value 0 is executed as soon as SIOC starts up, and never again. This means that, in theory, double clicking the SIOC application icon is acting as the “event”, and the “reaction” is the execution of Var 0.
“Executing” a variable in SIOC simply means carrying out the function confined within its associated brackets. As you can see, below the line “Var 0, Value 0” there is an open “curly bracket”, followed by a few lines, and then succeeded by a closed “curly bracket”. Whatever is between the open and closed curly brackets is what is “carried out” when the variable, in this case Var 0, is executed.
&Motor_1, &Motor_2, &Motor_3...: These are simply references to other variables within the script. To write a reference in SIOC, the ampersand symbol (&) is placed directly before the name of the variable (remember, variables 0001-0006 have each been given a name). It is also important to note that it is these exact variables which get executed when Var 0, Value 0 takes place.
= 120: This particular phrase is used six times in the script; once for each motor. The number “120” simply defines both the speed and direction of the motor. To adjust this figure, the user has to select the appropriate value for their desired function. See below for speed and direction values.
1-127 = Forward direction. The higher the value, the faster the speed of the motor.
128 = STOP
129-255 = Reverse direction. Once again, the higher the value, the faster the speed of the motor.
I chose the figure 120. This represents a fairly fast spinning motor that is moving forwards. The purpose of the “=” sign is to tell SIOC that we want that variable to equal (=) a certain figure, in this case the motor variable(s) representing the speed figure (1-255, discussed above).
Var 0001, name Motor_1, Link USB_DCMOTOR, Output 1...: This is identical the the aforementioned variable declarations (see “Var 0, Value 0” paragraph), however this time, we have linked variables to a specific piece of hardware, notably motors through the DC motors card.
I have chosen the numbers “0001” to “0006” for my variables; I could have chosen numbers like “8746” or “3811” if I had wished; I just opted for a more logical approach to my script.
The phrase “name Motor_1” does exactly as it suggests; it names the motor “Motor_1”, so that we can reference to it in the script (see above for referencing and the ampersand symbol).
“Link USB DCMOTOR” is perhaps the most straightforward of all. It just tells SIOC that we are using a DC motors card. The word “Link” can also be used with other cards, such as the USBServos card (“Link USBServos”).
The closing words, “Output 1”, tell SIOC that this variable is linked to output 1 of the DC motor card. To know which output is which, simply observe the PCB of the DC motors card; they are appropriately labelled.
Advanced SIOC example
<The following section is significantly more complicated than the previous, and is intended to be a short “guide” (if you will) for those wishing to take SIOC a stage further. If you do not wish to read the section, please advance to the “Endless Possibilities” chapter.>
This next section brings forward the fundamentals of the DC motors card and SIOC learned in the last section, by introducing a more complex script logic.
The following script uses a FSUIPC offset (briefly mentioned in the last section) to control the motors according to the aircraft's speed in FSX. It also demonstrates what is a more likely application than just blindly turning on the motors and watching them turn.
Up to (and including) 65 Knots IAS, the motors will turn forwards at a speed of “120” (an identical speed to that used in the last section). However, once the aircraft surpasses 65 Knots, the motors will turn backwards at a speed of “251” (this is almost the fastest reverse speed a motor connected to the card can turn; the most being “255”).
Similar to the last section, please read the following script and then study the annotations below it. Annotated notes such as that on “variables” and “ampersand references” have been omitted; these were discussed in the last section.
Var 9003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS from Sim
L0 = DIV &IAS ,128
IF L0 <= 65
&Motor_1 = 120
&Motor_2 = 120
&Motor_3 = 120
IF L0 > 65
&Motor_1 = 251
&Motor_2 = 251
&Motor_3 = 251
Var 0001, name Motor_1, Link USB_DCMOTOR, Output 1
Var 0002, name Motor_2, Link USB_DCMOTOR, Output 2
Var 0003, name Motor_3, Link USB_DCMOTOR, Output 3
Var 9003, name IAS, Link FSUIPC_IN...: This line is a variable declaration that links (hence “link” in the statement) SIOC to offset 02BC of FSUIPC. The “$” (dollar) sign is always put before the four digit alpha-numerical code of a FSUIPC offset; don't ask why, it's just one of those weird SIOC rules we love so much.
The “Length 4” part of the phrase tells SIOC that the offset has a length of 4 bytes. To find out what the length of a particular FSUIPC offset is, the Software Development Kit (SDK) available on Pete Dowson's website contains a PDF document with all such information.
Also, note the variable number “9003”. I just used this to illustrate the fact that any random number between 1 and 9999 can be used for a variable declaration.
L0 = DIV &IAS ,128: “L0” is an example of an “integer internal variable”. These are used to store whatever intermediate results (values) we tell them to hold. In this case, we have told SIOC that “L0” is equal to variable 9003 (remember; &IAS is another “ampersand reference”, linking back to variable 9003) divided by 128. “DIV” tells SIOC to divide the number, and the number after the comma is what it is told to divide by (128). This division is essential because, when SIOC reads the IAS data from offset 02BC, it is multiplied by 128 (once again, I am not sure why, it is just how FSX and FSUIPC hand data over to programs such as SIOC).
Of course, we do not want our data to be 128 times more than it should be, or else SIOC would interpret a speed of 45 Knots to be 5760 Knots (Mach 8.64)!!!
IF L0 <= 65: This line is very easy. This just tells SIOC to execute what is within the curly brackets if “L0” (which is now holding the value of our aircraft's indicated air speed) is less than or equal to 65 (<=).
&Motor1 = 120, &Motor2 = 120...: This serves an identical function to the “&Motor” statements mentioned in the last section. This time, however, I have connected only 3 motors, so I have only written 3 statements, not 6.
IF L0 >65: This line is rather simple too. It just executes whatever is within the succeeding brackets if the airspeed is higher than 65 Knots.
&Motor1 = 251, &Motor2 = 251...: These references are similar to the “=120” ones above. However, this time, we tell SIOC to run the motors at a speed of “251” (approximately 95% power reverse).
Var 0001, name Motor_1, Link USB DC_MOTOR, Output 1: Identical to the linked motor variable declarations annotated at the end of the last section. This time, however, we only have three, not six, because there are only 3 motors connected to the card at this time.
If you would like to see a video of this script working with the DC motors card, please watch the following YouTube clip.
...And that's it! The above SIOC script, whilst rather complex,
is actually a fairly manageable
piece of programming compared to what else has been made by SIOC
users. For example,
the script which powers my Boeing 767 cockpit is well over 2,000
lines long, using 34 pages
of paper when printed, and consisting of over 31,000 letters and
Luckily, for people wishing to use the DC motors card for an autothrottle system, there are already plenty of available scripts and documents; some published by Opencockpits themselves, allowing the user to partially circumvent the laborious task of SIOC scripting.
Feedback is the process of giving the computer a return signal from a device. For the purposes of this review, the “device” is the DC motors card and the motors connected to it.
Unfortunately, DC motors themselves cannot provide any sort of feedback. Whilst this is not essential for non-precision applications such as the aforementioned tests, it is useless in circumstances such as that of making an instrument, or designing an autothrottle system. This is because whilst SIOC can turn the motors, it will have no knowledge of their position relative to the output it is providing, and so the situation quickly becomes “out of control”.
Opencockpits have provided 4 separate potentiometer inputs on the DC motors card to act as feedback signals. This allows SIOC to accurately control the position of the motor, can adjust them according to the user's requirements.
Sadly, whilst the potentiometer inputs work perfectly, there is no way to test them or to determine if they are set-up correctly. Usually, Opencockpits provide a testing utility (such as the with USBServos card) which allows the user to experiment with the card prior to using it with SIOC. This is the reason why I had to design my own test script for the card (see SIOC section).
A further hindrance is the issue of positioning potentiometers. Obviously, potentiometers have a LEFT, MIDDLE (also called CENTRE) and RIGHT position; as do most control knobs (a minimum, middle and maximum). These three positions are critical to SIOC, and the software requires the user to input these values into a script. Due to the absence of a testing utility, there is no way the user can obtain these values without having to use another program, such as the USBServos or USBExpansion card, which, incidentally, requires the purchase of that respective card.
Another possible way to calculate these positions is to get a friend to test them for you, using their own software, and to send them back to you. However, this is very impractical and should not really be necessary for paying customers.
I would seriously appreciate the development of (even a very basic) testing program; even if it just allows the user to move the motor back and forth, and to gain simple potentiometer information.
Whilst I am disappointed in the lack of this critical software, I am pleased that Opencockpits have designed their card with flexibility in mind by including potentiometer terminals in the first place.
Owing to the flexible nature of both SIOC and the DC motors card, there are many different practical uses in which the product could come in handy. Whilst an autothrottle system is by far the most obvious application for this product, I have been thinking outside of the box and
have developed a few more surreal ideas, definitely falling within the “weird and wacky” side of flight simulator.
One of my most pleasing plans would be the schematics I drew for an “Airspeed Fan”. This is, literally, a desk fan that is driven by the speed of the aircraft that I'm flying. Furthermore; the code I developed for this idea amounted to a very simple equation; the faster the aircraft, the faster the fan.
Just connecting the correct motor to the card, along with running such a simple script, would allow me to attach a fan blade to the motor and get the contraption In question “up and running”.
Although it hasn't quite come to fruition yet, I can imagine myself cruising at 350 Knots in a Boeing 767, being blasted in the face with jets of cool air.
Another idea I had was to design a small model aircraft, and use motor-driven propellers, connected to the USB DC motors card, to show the in-flight status of my aircraft. For example, when I start my engine, the model propeller would come to life; and when I increase the power to the engine, the propeller turns faster! Genius or what?
These are just a few of the very fun ideas I came up with to play with the USB DC motors card. As per the title of this section, “endless possibilities”, I think that a lot more can be achieved from the card than just an autothrottle system, which tends to be the standard reason of purchase for this card.
To conclude this section, and to further re-enforce what I have written above, I would like to showcase a video directed by “Eduardo” of the MyCockpit.org forum. He has used the DC motors card, along with potentiometers for electronic feedback, to design a Boeing 767 airspeed indicator.
I experienced a few minor difficulties with the card; the most prominent being the trouble identifying the card in Windows.
When I plug the DC motors card in, it is recognized, almost instantaneously. However, when I turn on my 12V power supply, the card's existence is ignored by Windows, for some surreal reason.
I figured out that I had to turn my power supply on prior to plugging the card in – a very minor inconvenience, but one can appreciate the confusion this problem can cause for those new to the card.
Generally though, these faults were insignificant to the card's operation as a whole.
Opencockpits have supplied one PDF manual which covers the fundamental aspects of the card.
However, I personally feel that this is not near enough to allow customers to get the most out of the card. The documentation is very patchy, and left me confused at various points.
For example, there is almost no support whatsoever for users wishing to implement the card with SIOC, which, incredibly, is the only way to interface the card. All that is given in the manual is a large script designed for an autothrottle system, with no indication or explanation for what each command/line meant.
Had it not been for the tutorial written by Hessel Oosten, I think that this review could easily have been delayed for many months; simply due to the fact that there is not enough information on the card.
Although the translation does sometimes yield a little confusion, I think that it is more of a content issue rather than a linguistic one.
Furthermore, I do not necessarily think that it is just a documentation issue. The “downloads” section of the Opencockpits site, which contains many different scripting examples, features not a single SIOC file for the USBDC motors card.
Interestingly, I managed to located a mysterious application called “USBDC motor controller” which appears to be almost useless. Its only purpose seems to be to notify you when the card is plugged in, and into which USB port, so I am puzzled at the title of “controller”.
I think that Opencockpits, along with many others in the Flightsim community, are under the misconception that this card is only useful for autothrottle systems. As I have tried to illustrate throughout this review, I strongly believe that this card has much more potential than just that.
- USB cable included as standard.
- Great value for money.
- Up to 36V power supply can be connected to the card.
- Simple to connect to the product.
- Powerful and flexible interfacing software.
- Perfect for building many cockpit items, from autothrottle systems to instruments.
- Scarcity of information; both in the documentation and in general.
- No power-pin connector included.
- Lack of testing software available
Hessel Oosten's excellent USBDC motors guide (.txt file): http://www.mediafire.com/?4b0vtg59w7b24bz
The Opencockpits USBDC motors card provides flexible, powerful and (dare I say) easy control over most DC motors available today.
Whilst the card is rather easy to operate in SIOC, and is very easy to configure, the process is not made any easier by the severe lack of information on the operation of this product.
On a lighter note, I am very impressed with the inclusion of 4 A/D (analogue/digital) potentiometer connectors on the card, as these significantly widen the opportunities accessible with the product.
I feel that if a little more thought would go into the documentation process over at Opencockpits, their products would face almost no obstacles into becoming the very best cockpit-building utilities within the industry.
If you are looking for a nice project, and are relatively new to cockpit building, then this is certainly the card for you. Just don't expect all the information to be laid out neatly in-front of you.
Mutley's Hangar score of 8/10
Review machine Spec: Core i7 920 OC @ 3.8 Ghz | 6Gb Tri-Channel DDR3 Ram |GTX285 Graphics |Windows 7 64bit Home Premium