ABOUT, PROJECTSBLOG COMMUNITY TERMS of Use BARON 58 SimVimPanel Status, plans SimVimCockpit HOME

Servo, PWM an Stepper-motor control in ArdSimX

Sero connection

Before doing servo configuration, you need to do some research work for your servo - test each of them to find out their minimum and maximum control pulse width in microseconds (put a sticker with these values on every servo), define rotation angle range. If needed, define interim linear segmets (up to 10) on the scale for non-linear output.

Notes:
  • Use external stabilized DC power supply for servo powering (not USB !!!)
  • Typically most servos have Operating Voltage Range of 4.2 - 6 Volts
  • Ensure you are using the optimal Voltage for your servo (+5v mostly is good)
  • Be sure to connect the grounds of Arduino and servo external power supply together.

In the configurator you only need to select Arduino pin and parameter that will be "linked" with this servo, then write down the value range (in parameter units) and corresponding rotation range (in microseconds).


Using a moving-coil gauges with ArdSimX

img

Any moving-coil milliammeter can be used as a gauge for your cockpit simulator. It's an easy and convinient way to make the instrument that have a limited needle rotation angle (moving-coil ammeters can have the scale varied from 90 to 200 degrees).

Before using your coil gauge you need to know milliammeter characteristics and calibrate it using resisors/potentiometers.



Connecting coil gauge to Arduino

Just connect your ammeter to the PWM output through a current limiting resistor, with the other wire of the gauge connected to the ground. This resistor can be varied from 5 to 100 kohm depending of the gauge you will use:


Arduino PWM pins limitation

To get analog gauges working with Arduino digital outputs the Pulse Width Modulation (PWM) is used. But you can not use any Arduino pins for this - the number of-PWM controlled pins is limited. On most Arduino boards (including Uno, Nano, Mini, Leonardo), PWM output works only on pins 3, 5, 6, and 9, 10, 11. On Arduino Mega, you can use much more PWM gauges on pins #2...13 and 44...46.




Stepper motors control with ArdSimX

As default, ArdSimX works with a bipolar stepper motors used in car dashboard instruments (X25, X27, VID29 and similar) with external stepper motor controllers (VID6606, STI6606Z).

All details on how to control stepper motors and use stepper controllers you can read in the Sim Cockpit section.
In ArdSimX all connections related to driver wiring are the same, besides the fact that in SimVim all steppers are connected to one multiplexer and in ArdSimX every stepper uses it's own separate Arduino pin.

Using Stepper motors for cockpit instruments

These stepper controllers have two main control inputs - "DIR" and "STEP" for each one motor. All "DIR" inputs of all connected steppers are combined and use one output pin ("D") pre-assigned. Each "STEP" input is connected to one assigned in the configurator Arduino pin, plus one common "Direction" pin for all steppers.


Zero-positioning

Note: in ArdSimX, for the stepper with positioning sensor one more Arduino pin is used as sensor input. This pin always follows the "step" pin assigned for this stepper (N - "step" pin number, N+1 - sensor pin number).








© Copyright 2012-2018 - SimVim Design