This is only a preview of the September 2019 issue of Silicon Chip. You can view 58 of the 128 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Build your own Gamer’s Seat with Four DoF":
Items relevant to "A new Micromite: the sensational Explore-28":
Items relevant to "Six-way Stereo Audio Input Selector with remote control":
Articles in this series:
Items relevant to "Ultrabrite LED Bicycle Light":
Purchase a printed copy of this issue for $10.00. |
Micromite-based
4DOF
Simulator
Seat
Playing a car racing game (or if
you prefer, a driving simulator) on a
big screen can be thrilling. Plus it’s a lot
cheaper and safer than taking your car to a
racetrack! But it’s a lot more exciting if you
can actually feel the motion and forces as
you accelerate, brake, corner and drive up/
down hills or banked tracks. Build this
four-degree-of-freedom racecar seat and
experience that motion, without spending
heaps! It works well with flight simulators, too.
I
f you’re really into racing games or driving simulators,
you’ll want a seat like this, which moves to simulate
the motion of the vehicle you’re ‘driving’.
It can also give you some sensation of motion with a
flight simulator, although obviously, it can’t quite simulate barrel rolls and loops!
You can go out and buy one right now (or order it online), but you could easily spend thousands of dollars on
a good one. If you have some mechanical and electronics
skills, and are interested in a bit of a challenge, you can
build your own for a fraction of the price.
And in this article, we explain just how to do that.
You can see the sort of results you can expect to get if
you build this seat by watching the following short video:
https://youtu.be/tn9LW758emc
That video shows a racing simulation game called rFactor (available on https://store.steampowered.com), actuating the seat using the SimTools software (link at the end
of this article).
Micromite-based
The electronics, whose job is to inter26
Silicon Chip
by Gianni
face with your PC,
retrieve data from the simulation and then drive
the motors in the seat to the
required angles. It’s set up using a touchscreen interface.
And it’s all based on a familiar module to SILICON CHIP
readers: Geoff Graham’s Micromite processor. The electronics module can control the motors in the seat using off-theshelf motor driver boards, or even better (and much cheaper!) you can build your own, as described later.
The seat itself is a bucket seat as installed in many race
cars, or even street cars. They are widely available and
not terribly expensive (try a wrecker who might have just
what you want!).
Of course, if you want to use a famous brand seat (like
a Recaro) be prepared to pay just a little more!
The seat’s supporting structure is built mainly from steel
tubing, plates and MDF, with linear bearings to allow it to
move forward and back and simple ‘bearings’ made from
caster wheels and tubes to allow it to pitch forward and
back, yaw from side to side and roll from side to side.
Between two and four motors provide
the motion, depending on how many ‘dePallotti
grees of freedom’ (DoF) you want.
Australia’s electronics magazine
siliconchip.com.au
MICROMITE 4DOF AXES CONTROLLER
Roll
Up
POWER SUPPLY
“Pitch”
Down
PIC32MX170F256D
Yaw
H-BRIDGE
Forward
“Surge”
POLOLU 758
Back
WIPER MOTOR
WIPER MOTOR
Fig.1: apart from the mechanical side, which we’ll get to
shortly, here are the electrical components of the simulator
seat and are described in the text. The motors are worm
drive (12V or 24V wiper motors, for example) which can be
obtained at low cost from an auto wrecking yard.
The panel below shows and explains the six basic degrees of freedom, while Fig.2 shows those motions the most
complicated version of the seat provides.
With a driving simulation, turning the vehicle normally
causes some degree of yaw, sway (pitching sideways) and
possibly also roll (pitching forward/back).
Acceleration and deceleration cause changes in pitch
(to simulate suspension compression) and surge (forward/
back motion), while driving over bumps or elevation changes (ie, going up or down a hill) causes heave (up/down)
movements.
The use of a standard seat slider mechanism provides a
reach adjustment for the pedals, steering and gear controls
(slider frame), so that you can customize it to suit each individual driver.
Additionally, the seat can be relocated forward or backwards through additional holes on the main frame.
It also provides a reach adjustment for the pedals and
other controls, so that you can customise it to suit each
individual driver.
WHAT IS DoF?
The are actually six Degrees of Freedom, which allow you to experience just about any force you’re
likely to encounter. All relate to the possible movement of a ship at sea or an aircraft/spacecraft in flight.
These are:
Roll
Right
Yaw
Left
Pitch
SC
2019
Down
siliconchip.com.au
The seat assembly can be built in three different versions,
with two, three or four degrees of freedom. The three DoF
version cannot move forward or backward but can tilt forward, back, left, right and yaw. The two DoF version cannot yaw either, and can only tilt forward, back, left or right.
Essentially, the two DoF seat is made into a three DoF
seat by the addition of a “swivel/yaw frame”, including
a third motor which causes the back of the seat to swing
from side to side. The three DoF seat is turned into a four
DoF seat by the addition of another base (made from MDF)
DoF – Degrees of Freedom – refer to the directions you (or more properly, your craft) can move (in
this case, simulated by our seat).
Up
Forward
Fig.2: the four ‘degrees of freedom’ which allow you to experience just about any force you’re likely to encounter while
in a moving vehicle. The seat described here can provide all
degrees of freedom except for left/right and heave (although
its up/down axis does provide some degree of heave motion).
Move up and down (elevating/heaving);
Move left and right (turning/swaying);
Move forward and backward (accelerating/braking or ‘surging’);
Swivel left and right (yawing);
Back Tilt forward and backward (pitching);
Pivot side to side (rolling).
Our simulation seat has four of these motions: up/down (heave), forward/back (surge), swivel (yaw)
and roll. The ‘heave’ motion is implemented by moving the front of the seat up and down on both sides
at the same time, while roll is provided by the differential vertical motion of the front of the seat between
the left and right sides.
Australia’s electronics magazine
September 2019 27
Fig.3: the four main subframes: from left to right,
the yaw base/swivel frame (not required for the two-DoF
version), the main frame, the seat frame and the slider/steering
frame. The majority of mechanical construction work in building the seat involves
fabricating these four sub-frames. They are made mostly from steel tubing, plates, angle,
flat bar and a few brackets. You will need some welding skills to do a good job.
with linear bearings and a motor, so that it can slide forwards and backwards.
The two-DoF version is the easiest to build, especially if you omit the seat slider adjustment. It’s possible to
upgrade a two-DoF version to the three-DoF version later, and similarly, to upgrade the three-DoF version to the
four-DoF version.
The four main subframes are shown in Fig.3. The yaw
base (not required for the two-DoF version), the main frame,
the seat frame and the slider/steering frame are arranged in
a stack, with the bottom frame on top of the yaw base, the
seat frame on top of the bottom frame and the slider frame
hanging from the seat frame.
Building the seat frame/assembly
This is a job which requires some significant fabrication
skills and tools. Most of the components are made from
steel, which can be cut using a metal cut-off saw or manually (and slowly!), with a hacksaw.
The 6mm plates used to attach the electric motors are the
only plates requiring actual shaping. Any metal supplier
The seat frame with the bucket seat removed
28
Silicon Chip
can cut these. It can be done manually, but it’s hard work!
The other mounting plates are either fabricated from
blank metal plates or made up using standard off-the-shelf
brackets.
There is a need to machine special bushes and rods to
suit the spherical bearing and universal joint unit. These
should be made to fit the selected components.
The two rear caster wheels on the swivel base are attached using spherical bearings to reduce friction, and the
shaft holes must be re-drilled to keep the correct horizontal height of the frame.
Nylon solid wheels (not rubber) can also be used, although this will increase the power demand from the motor.
In this case, the two angle holes to the main frame wheel
also need to be re-located to maintain the correct horizontal level of the main frame.
For the simulator frame to swivel, the body of the larger
caster swivel wheel base is used. The wheel housing needs
to be cut and welded to the swivel base.
To allow a smoother swivel movement, it would be better to remove the ball bearing from the large caster swivel
A view of the universal joint connecting the seat frame to
the main frame.
Australia’s electronics magazine
siliconchip.com.au
C
120
16
7
24°
A
300
800
SLIDER BASE
C
205
395
380
A
G
C
C
C
A
H
300
340
H
1071
134
ALL DIMENSIONS ARE IN MM
F
130°
518
SLIDER & STEERING FRAME
B
72°
149
1
October 2019 29
185
282
12
H
G
A
E
40°
C
82
518
I
340
FOOT PLATE
B
E
B
E
340
F
D
500
134
SC
2019
SLIDER STEERING
D
B
F
E
149
800
30
base and introduce a double raw-angular contact bearing or
similar, with a dedicated spindle. But that would require
a dedicated housing design. The caster swivel base used
is the easiest solution and works well.
Figs.4-7 show the details of how each subframe is made,
while Fig.8 shows the MDF pieces which need to be cut
and shaped for the table which holds the steering wheel
and gearshift lever, and the floor base, which is only needed
for the four-DoF version of the seat. Fig.9 shows the assembled seat (four-DoF version) from two different angles while
Fig.10 shows a 3D view of the completed assembly (3 DoF).
You can also refer back to Fig.3 and the photos throughout this article during construction in case you have trouble figuring out exactly how the various pieces fit together.
We won’t go into exhaustive detail on the construction
steps here, partly because there are various ways you can
go about it, and partly because we expect constructors with
the tools and skills to be able to do so should be able to figure it out from the CAD drawings and diagrams.
Most parts will need to be welded, although some parts
are bolted together, and generally, the holes which need to
be drilled for these bolts are shown in the drawings. Drill
12mm holes for M10 bolts, 10mm holes for M8 and 8mm
holes for M6.
Once you have built the subframes, given them a good
coat of black paint for rust prevention (and to make it look
good), put them together and then you can start mounting
up the motors and fabricating the linkages to attach them
to the frame where required.
If building the three-DoF version, it’s easiest to completely build and test the two-DoF version first, then add
the yaw base, motor and linkages and test that separately.
Similarly, to build the four-DoF version, build and test
the three-DoF version and then add the floor base, linear
bearings, forward/back motor and linkages, then wire that
up and test the final product.
Once you’ve built the frame and attached the motors,
you will need to build the controller module and obtain a
suitable power supply before you can wire up the motors
and test it properly.
Make sure you attach the punched angle rail to the slider
frame (“foot plate retainer”), even if you aren’t using the
chequerplate foot plate, as it adds needed rigidity. The
CAD drawings do not show how this is mounted, but you
can see it in the photos.
J
FOOT PLATE RETAINER (x2)
Fig.4: the slider and steering frame provides a place to mount
the steering wheel, gear shift lever and pedals, while allowing
them to be moved forward and back, to suit users of different
heights and sizes. It’s a good idea also to fit the foot plate, to
give you somewhere to rest your feet (it looks nice, too).
583
SC
Fig.5: the
bucket seat is
mounted on the
12 x 12mm diameter
seat frame, and
P
38 holes to attach seat
can be moved
forwards or
K
M
backwards
4 x 8mm
O
into one of
diameter
three positions
holes
to
L
N
L
attach
through extra
slider
O
bolt holes. This
frame
also provides
280
K
attachment
points for the
320
P
slider and
steering frame and also the caster wheels
which roll on the optional swivel frame.
N
2019
152
K
P
siliconchip.com.au
Australia’s electronics
electronics magazine
magazine
Australia’s
524
95
380
The additional adjustment holes allow 25mm further
movement of the seat frame assembly.
355
110
81
SSeptember
eptember 2019 29
2019 29
200
You can cut the MDF components using a jigsaw and
laminate the edges with PVC edge banding tape and a hot
air gun.
225
W
V
U
70
108
T
T
U
R
Adjustment and weight handling
Q
There are two options to assemble the seat and slider
frame, depending on whether a standard seat slider is used
or not. If using a seat slider, this is bolted between the seat
bottom and top of the slider/steering frames.
Unlike in a vehicle, instead of moving the seat itself, it
moves the sliding/steering frame back and forward.
The seat frame/slider frame is bolted to the pedal frame,
while the slider top rail is bolted to the seat frame. This
allows the foot frame to move forward or back as needed,
with minimal disturbance to weight ratio balance of the
unit as the seat stays close to the universal joint pivot point.
There is a further 25mm forward or backward step adjustment on the seat frame, as there are three sets of holes
in the seat frame to which the seat can be bolted. This can
be used to offset user size or weight differences.
I have tested the rig with a 120kg, 1.75m tall individual, and both the frame and the motors were able to cope
without any problems.
S 765
W
300
U
123
V
U
T
61°
V
Q
510
U
T
T
R
750
U
391
S
100
650
108
V
Q
W
U
Controller circuit
U
S
SC
V
2019
Fig.6: the seat frame mounts on top of this main frame, which
provides attachment points for the two front motors and also
the caster wheels, which roll on the optional yaw base below.
<at>
185
2019
5
40
40
15
8
SC
113
2
6
40
<at>
X
335
7
75
280
5
350
2
Y
305
Z
$
X
200
120
<at>
12
30
8
<at>
755
40
RETAINING WHEEL
16
6
LINEAR BEARING BRACKET
7
45
700
R887
The controller circuit is shown in Fig.11. This excludes
the four motor controllers, which will be described separately later. You have a couple of options when it comes
to those motor controllers.
The job of this circuit is to receive data from the simulation running on a PC via a USB port, then perform some
calculations to determine how the motors need to be driven to move the seat appropriately.
It must then produce the appropriate drive signals to
send to those motor controllers.
All of this work is done by the software running on IC1,
a 44-pin SMD PIC32 processor programmed as a Micromite. The aforementioned software is therefore written
in MMBasic.
Data from the PC comes in via a USB/serial adaptor that
is wired up to CON1. The data then goes from CON2 to
CON4, via a pair of jumper wires (blue/green dashed lines).
CON4 connects to pins 8 & 9 on IC1, which are configured
as a second serial port (ie, not the same one used for the
<at>
5
8
<at> Z
8
2
<at> Z
WHEEL HOLDERS
3
25
30
Fig.7: the yaw base/swivel
3
frame allows the main
100
20 20
frame above to rotate around
146
the front pivot point made
from a caster swivel wheel.
60 50
It rides on two caster wheels
attached to the angle bar which
roll on the angled metal plates at the back of the frame.
This also provides a mounting point for the yaw motor.
30
30 S
Silicon Chip
A view of the typical linear bearings and shaft used for the
forward/backward motions.
Australia’s
Australia’s electronics
electronics magazine
magazine
siliconchip.com.au
280
225
$
$
130
445
1100
340
450
%
%
Motor
$
FLOOR BASE (FORWARD/BACK)
%
Fig.8: these pieces, cut
%
from 16mm MDF, provide a
SC
2019for the steering wheel and gear
table
shift lever, and the optional floor base which
is needed for the fourth (forward/back) degree of freedom.
BUCKET SEAT
GHEPARDO
(ADJUSTABLE)
A view of the aluminium plate used as a footrest, installed
on the slider/steering frame.
siliconchip.com.au
355
150
115
$
200
200
STEERING & GEARSHIFT TABLE
470
Micromite console & programming).
To program or reprogram the Micromite software, the
jumper wires connecting CON2 to CON4 are changed to
connect CON2 to CON3 instead, so that the USB serial
port accesses the Micromite console.
During regular operation, the software reads in and
processes the data from the USB serial port on the PC. It
then generates control signals on digital output pins 1-4,
15 and 21-23. Pins 15 and 21-23 carry PWM signals which
determine the torque/speed for each motor, while pins 1-4
control the direction of motor rotation.
These signals go to pin headers CON8a-d and header
sockets CON9a-d – these interface to one of two types of
motor controller. CON8a-d suit pre-built modules, the
“Pololu High-Power Motor Driver 18v25” while CON9ad suit a module that you can build yourself, for considerably less than the Pololu modules cost, described later
in this article.
It’s a slightly revised version of my design published
in the Circuit Notebook section of the November 2017 issue (page 80).
The main difference is a slightly changed layout to better suit plugging into the controller board used for this
project, plus a slight simplification which removes two
redundant resistors.
While not shown in Fig.11, the board has two two-way
terminal blocks to feed +13.8V and 0V from a high current
supply into the board, for distribution to these four motor
controller modules (see Fig.13). The motors are wired directly to the output sockets on the motor driver modules.
If using my motor drivers, because they have three control inputs, rather than the two of the Pololu modules, you
need an extra inverter for each driver. This is provided by
IC2, a 74LS14 hex inverter. It converts the direction signals
(low for one direction, high for the other) into two signals,
with one going high for rotation in one direction, and the
other going high for rotation in the opposite direction.
CON6 is a 14-way header to connect to a 2.4in or 2.8in
touchscreen based on the ILI9341 controller chip, which
is the same screen used in the Micromite LCD BackPack
and V2 or V3 BackPack.
This is used to set the unit up and to monitor its operation.
See the screen grabs below to see how the screen is used.
It’s critical to calibrate the motor control scheme properly.
Australia’s electronics
electronics magazine
magazine
Australia’s
Fig.9 (below): when the four main frames,
seat, table, steering wheel and pedals
are all joined together, they should look
something like this
(4DoF version).
LOGITECH G27
STEERING FRAME
NOT SHOWN
SSeptember
eptember 2019 31
2019 31
Fig.10: here’s a 3D view of the four main
frames (not including the floor base or
motors) as they appear when fully built
and assembled.
Other connectors
CON5 is an in-circuit serial programming header which
is compatible with the Microchip PICkit 3 and PICkit 4,
although you could also connect it to a Microbridge (see
the May 2017 article; siliconchip.com.au/Article/10648).
This is necessary if you purchase a blank PIC32 microcontroller.
If you purchase a pre-programmed micro from the SILICON
CHIP ONLINE SHOP, you can get away without this header.
Power is fed into the unit via CON7. It must be a regulated 5V, and this supplies the LCD screen at CON6 directly, both for logic power and to run its backlighting LEDs.
(Initially the plan was to supply power via CON1 from the
PC’s USB port but we found that the voltage drop caused
by the long cable between the rear end of the chair and the
display (about 2m) caused the display to misbehave. So it
is best fed in via CON7).
The 5V rail is also regulated to 3.3V by LDO REG1, to
power microcontroller IC1.
CON10 allows a DS18B20 temperature sensor to be connected to the board, so that the unit can shut down if the
board temperature gets too high.
If you use one of the DS18B20 sensors on the end of a
A view of one possible mechanical link between the front
motor shaft and the positioning potentiometer.
32
Silicon Chip
wire, you could mount it in or on the power supply, or one
of the motors, if you want.
But if anything is going to overheat, it will probably
be the motor drivers, so the ideal location for this sensor is in the middle of the M1 and M2 driver boards
as these are the most heavily used.
The pins of CON11 can be shorted to reset microcontroller IC1. It could be wired to a momentary pushbutton reset switch. CON12a-d
provide connection points for the four motor
position feedback potentiometers.
Basically, as the motors rotate, the voltage at pin
3 of each of these connectors varies between 0V and
3.3V, and this is fed to analog input pins 27-24 of IC1, so
it can use its internal analog-to-digital converter (ADC) to
sense the potentiometer positions and thus drive the motors to a particular angle, just like a servo motor.
LED1 is a simple power indicator to show when the
5V supply is present. And finally, CON13 is an auxiliary
header which breaks out connections to four spare Micromite pins plus +3.3V and GND, and could be used for future expansion (such as adding a fan to simulate wind!).
Pololu motor drivers
Note that the Pololu motor drivers now being sold are
somewhat smaller and cheaper than the versions shown
here, but they do the same job and are drop-in replacements.
These drivers enable bidirectional control of the highpower DC brushed motors used. These motor driver boards
support a wide range of motor voltages, from 6.5V to 30V
DC, and can deliver a continuous 25A.
You can get these modules in Australia from RobotGear
(http://siliconchip.com.au/link/aats) or Core Electronics
(http://siliconchip.com.au/link/aatt). Or you can build
your own H-bridge drivers, which are almost as capable...
H-bridge driver circuit
My own H-bridge module design is shown in Fig.12,
which is very similar to the circuit published in the Circuit Notebook section of November 2017. The H-bridge is
formed from two CSD18534KCS high-current logic-level
N-channel Mosfets (Q3 & Q5) and two IRF4905 P-channel
high-current Mosfets, Q2 & Q4.
The rear bearing assembly. The retaining centre bearing
prevents the frame from over-tilting during strong changes
of direction of the swivel frame.
Australia’s electronics magazine
siliconchip.com.au
An overall view of the assembled unit. The
positioning of the motor links on the two lower
frames is best determined once assembly is complete.
Schottky diodes D1-D4 parallel the Mosfet body diodes
and absorb any back-EMF or motor braking energy. They
dissipate a lot less heat than the Mosfet body diodes because of their lower forward voltages. There’s also a local
100µF bypass capacitor across the motor supply. Zener
diodes ZD1-ZD4 protect the Mosfet gates from excessive
voltages, clamping them to about -0.7V and +15V.
AND gates IC1a & IC1b combine the PWM and directional
input signals to generate the gate drive voltages, and their
outputs directly drive the gates of Q3 and Q5.
These signals also go to the bases of NPN transistors Q1
and Q6, which form inverters to generate the drive signals
for the P-channel Mosfets. These also act as level-shifters,
so that when the signal from IC1a/IC1b is low, the gate
of the associated P-channel Mosfet is held at V+, around
13.8V, to keep that Mosfet switched off.
When the signal from IC1a/IC1b goes high, the baseemitter junction of one of these NPN transistors is forward-biased, and current flows through its 3.6kΩ base
current-limiting resistor, causing it to switch on and pull
its collector down to just a volt or so. This is well below
the 13.8V at the source of Q2 and Q4, so one of those Mosfets switches on.
The 1.5kΩ base-emitter resistors for Q1 and Q6 ensure
that they switch off when there is no drive voltage, and
as a result, all four Mosfets are kept off if the 5V supply
is absent, even if the 13.8V motor supply is present. The
160Ω emitter resistors for Q1 and Q6 prevent them from
fully saturating when switched on, so that they switch off
faster when the base drive is removed.
The exposed seat frame.
The full frame, without the seat in place.
siliconchip.com.au
Building the control module
The control module is built on a single-sided PCB coded 11109191. Use the overlay diagram, Fig.13, as a guide
during construction.
You can etch this at home, as I did, or you can buy
a commercially-made PCB from the SILICON CHIP ONLINE SHOP. That board will be double-sided, with copper
tracks on the top layer replacing the wire links, saving you
considerable effort in fitting those links.
Australia’s electronics magazine
September 2019 33
CON7
DC
IN
+5V
+
470
–
CIRCUITRY IN THIS
SHADED AREA
V+
FF2
FF1
RESET-
8
5V
7
PWM
6
DIR+
5
DIR–
4
GND
5
GND
47 F
LED1
K
4
3
2
2
1
14
1
IC2a
3
PWM
2
DIR
1
GND
CON 9 b
CON8b
V+
5V(out)
FF2
FF1
RESET-
8
5V
7
PWM
6
DIR+
5
DIR–
4
GND
5
4
3
2
4
1
3
CON4
IC2b
1 TX
3
PWM
GAME
2 RX
2
DIR
CON10
1
GND
CON 9 c
CON8c
V+
5V(out)
FF2
FF1
RESET-
8
5V
7
PWM
6
DIR+
5
DIR–
4
GND
IC2: 74LS14
5
4.7k
3
TEMP
SENSOR
IN
+3.3V
2
1
4
3
2
6
1
5
IC2c
3
PWM
ICSP
2
DIR
CON5
1
GND
MCLR
Vcc
5V(out)
FF2
FF1
RESET-
GND
CON 9 d
CON8d
V+
8
5V
7
PWM
6
DIR+
5
DIR–
4
GND
5
PGD
4
PCC
3
2
1
+3.3V
3
4
5
6
IC2d
8
1
2
9
7
3
PWM
2
DIR
K
A
CON8a-9d: For Pololu Drivers
CON9a-9d: For DIY drivers
SC
20 1 9
LM3940IT
LED
1
GND
GND
IN
GND
OUT
FOUR DEGREES OF FREEDOM MICROMITE-BASED MOTOR CONTROLLER
The only slightly tricky part to solder is SMD microcontroller IC1. But it isn’t a particularly fine-pitched device, so
it is not too difficult. You will need some good flux paste
and a roll of solder wick, though.
Start by locating its pin 1 dot and line this up with
the pin 1 indicator etched into the copper on the bottom side of the board. Tack one of the corner pins to the
board, for example, by applying a little solder to one of
the pads and then sliding the chip into position while
heating that solder.
Check that the chip is square and all the pins are lined
34
+3.3V
OUT
IN
100nF
A
CON 9 a
CON8a
5V(out)
NOT REQUIRED IF
POLOLU IS USED
REG1 LM3940IT-3.3
+5V
Silicon Chip
up with their pads. If not, re-heat that initial solder joint
and gently nudge the chip in the right direction. Once it’s
correctly aligned, apply flux paste to all the pins, then solder the diagonally opposite pin from the one you tacked.
Apply solder to the remaining pins.
You can do this by loading the iron tip with some solder,
then gently dragging it along one edge of the chip. Repeat for
the other edges, then check for solder bridges across pins.
If you find any, apply extra flux paste and clean them
up with solder wick. Then use pure alcohol or flux residue cleaning solution to remove flux residue and inspect
Australia’s electronics magazine
siliconchip.com.au
9
10
11
T_IRQ
8
T_DO
7
T_DIN
T_CLK
6
T_CS
5
SDO
4
BKL
3
SDI
2
SCK
1
D/C
RESET
1
18
CS
2
RESET
CON11
1k
+5V
50k
+3.3V
GND
+5V
12 13 14
CON6
ILI9341 BASED
LCD DISPLAY
47 F
+3.3V
17
AVDD
28
VDD
40
VDD
AUX1
MCLR
1
2
3
4
RPB 8/PMD4/RB 8
RB9/RPB 9/SDA1/PMD3
RPB 7/PMD5/RB 7
RC 6 /RPC 6/PMA1
PGEC 3/RPB 6/PMD6/RB 6
RC 7 /RPC 7/PMA0
PGED3/RPB5/PMD7/RB5
CON13
18
6
44
5
43
4
42
3
41
+3.3V
2
1
38
IC1
RPC 5/PMA3/RC 5
5
PIC32MX170F
2 MX170F
37
RC9/RPC9/PMA6 PIC3
RPC4/PMA4/RC4
–256D
8
9
10
11
12
13
14
15
19
20
21
22
RC8/RPC8/PMA5
RB 10/RPB 10/PMD2/PGED2
RB 11/RPB 11/PMD1/PGEC 2
RPC3/RC3
TDI/RPA9/PMA9/RA9
RB12/PMD0/AN12
SOSCO /RPA4/RA4
RB 1 3 /RPB 1 3 /AN 11
SOSCI/RPB4/RB4
RA10/PMA10/TMS/PGED4
RA7/PMA7/TCK/PGEC4
RB 1 4 /RPB 1 4 /AN 10
TDO /RPA8/PMA8/RA8
OSC 2/CLKO /RPA3/RA3
OSC 1/CLKI/RPA2/RA2
RB15/RPB15/AN9
AN 8/RPC 2/RC 2
RA0 /AN 0 /VREF+
AN 7/RPC 1/RC 1
RA1/AN1/VREF–
AN6/RPC0/RC0
PGED1/AN 2 /RPB 0/RB 0
AN5/RPB3/RB3
PGEC1/AN3/RPB1 /RB1
AN4/RPB2/RB2
VCAP
AVSS
16
VSS
6
VSS
29
VSS
39
JP1
34
RX 2
33
TX 1
GND
CON1
+5V
1
CON3
CON2
PROGRAM
32
+3.3V
USB-SERIAL
INPUT
36
35
PWM2B
IN/OUT
31
2
2
3
1
4
5
30
6
27
+5V
GND
TX
RX
DTR
+3.3V
CON 12 a
26
3
25
+3.3V
24
2
1
23
POT
– M1
CON 12 b
7
3
+3.3V
47 F
2
1
TANT.
POT
– M2
CON 12 c
3
+3.3V
2
1
POT
– M3
CON 12 d
3
Fig.11: the control board circuit is relatively simple, thanks to the use of a PIC32
Micromite microcontroller (IC1) and four separate motor driver H-bridge modules, which
connect via CON8a-d or CON9a-d, depending on the type. Motor position feedback comes
from attached potentiometers, which provide variable voltage signals at CON12a-d. The
blue and green dotted lines (CON2 to CON3 or CON2 to CON4) are where jumper leads
are fitted to select between programming mode and game mode.
the solder joints under magnification to ensure they are
all good.
Fitting the remaining parts
If you have a single-sided board, the next job is to fit the
27 wire links on the top side of the board. They are shown
in red on Fig.13. Don’t miss any, and if you are using uninsulated wire, make sure the links are taut so that they
can’t easily bend and short to each other, or to the leads
of adjacent components.
Now fit the five resistors in place where shown on the
siliconchip.com.au
+3.3V
2
1
POT
– M4
overlay diagram. It’s best to check each one with a multimeter before soldering it; you can identify them by the
colour bands, but they are easily mixed up.
Next, solder IC2 in place, ensuring that its pin 1 dot is
orientated correctly. You can use a socket if you want, but
it shouldn’t be necessary. IC2 can be left out if you are using the Pololu motor drivers.
Install LED2, with its longer lead towards the closest
edge of the board (marked “A” for anode on the PCB).
Follow by fitting all the standard pin headers. Depending
on how you are building the unit, some can be left out,
Australia’s electronics magazine
September 2019 35
Fig.12: the circuit of the DIY version of the motor driver (H-bridge) module.
It uses four Mosfets to drive the motor in either direction, controlled by two
small-signal transistors and a 74HC08 quad 2-input AND gate. This is only
slightly different than the version previously published in Circuit Notebook.
but they’re quite cheap, so it’s easier just to fit them all.
If using the Pololu motor drivers, you can also fit the
four 8-way female header sockets now.
Follow by mounting polarised header CON7, then the
capacitors. The electrolytic capacitors are polarised and
must be orientated as shown. You can identify the positive lead as it is the longer of the two. The tantalum capacitor should also have a “+” marking on its body, while
the aluminium electrolytics will have a stripe on the can
showing the negative lead.
You can now install the two terminal blocks along the
left edge, with their wide entry holes facing the edge of
the PCB, then fit regulator REG1 with its metal tab orientated as shown in Fig.13.
Your touchscreen module should have come with a 14pin header pre-soldered to it. You can now connect this
up to CON6 on the controller PCB using fourteen femalefemale jumper wires. You can get such wires joined together in a single ribbon cable, which would make the job
a little easier (and neater).
Pin 1 of CON6 is as the bottom, so make sure this goes
to pin 1 on the LCD (pin 1 is +5V, pin 2 is GND) and that
each pin is wired up in sequence.
Use the two shorter jumper wires to connect Tx on CON2
to Tx on CON3, and similarly, Rx to Rx. Fit the shorting
block on JP1 only if the controller is driven via the USB
and LCD display installed close by (see our earlier comments about the display misbehaving with a long cable).
Do not connect any other power source to CON7 (the LED
will not light up).
Solder the six-pin female header to the bottom of your
USB/serial adaptor, so that its pinout matches that of CON1.
Then plug this adaptor into CON1.
Programming IC1
If you’ve purchased a preprogrammed Micromite chip,
you can skip this step. Connect a PIC32 programmer to
CON5, ensuring the pinout is correct (for a PICkit, this will
be the case as long as pin 1 is lined up correctly).
If using a PICkit, use MPLAB X IPE to load the 44-pin
Micromite Mk2 HEX file into the chip, which can be downloaded for free from either the SILICON CHIP website, or
Geoff Graham’s website (geoffg.net).
If using a Microbridge, follow the instructions in the
Microbridge article on using pic32prog to load a HEX file
into PIC32. The file is the same regardless of the programmer you’re using.
Loading the BASIC code
You are now ready to connect this adaptor to your PC
via a USB cable. LED1 should light up. Fire up a terminal
emulator (or MMedit) and connect to the serial port which
Here are the two motor drivers which
suit our controller: on the left is the
commercial “Pololu” driver, while at right
is our DIY version (see Fig. 12 above). The
DIY version, however, does require that
IC2 is fitted to the PCB (see text).
36
Silicon Chip
Australia’s electronics magazine
siliconchip.com.au
Fig.13: use this PCB overlay
diagram as a guide to
building the controller
PCB. If you’re using a
single-sided board, fit the
wire links where shown in
red. Otherwise, if you’ve
purchased a double-sided
PCB, that is not necessary.
Note that the motor drivers
shown here are now obsolete;
the new versions are pincompatible but a fair bit
shorter, so the supply wires
will need to be a little bit
longer. Also note that while
this diagram shows the
Pololu modules fitted, it also
shows IC2. As explained in
the text, you do not need IC2
with the Pololu modules – the
diagram simply shows where
it would be fitted if you are
using DIY H-bridge modules.
has now appeared at 38,400 baud (check Device Manager
to see the newly allocated COM port number).
Once you’ve established communication, use XMODEM
or MMedit’s upload function to load the BASIC source
code for this project into the Micromite chip. As with the
Micromite firmware, the BASIC code is a free download
from the SILICON CHIP website.
You will then need to configure the touchscreen and
set up the code to run on power-up by issuing the following commands:
OPTION LCDPANEL ILI9341,L,36,32,35
OPTION TOUCH 30,31
OPTION AUTORUN ON
GUI CALIBRATE
Once you’ve finished calibrating the touchscreen, you
can use the GUI TEST TOUCH command to check that it’s
correct (touching the screen should leave a trail of dots),
then cycle power and check that the splash screen comes
up (see Screen1) and by touching the screen, the main
screen (Screen2).
Building the H-bridge module
If you aren’t using the Pololu modules, you can build
your own H-bridges using the double-sided PCB coded
11109192. Use the PCB overlay diagram, Fig.14, as a guide.
Start by fitting the resistors where shown, except (for the
moment) for the two 2.2kΩ, followed by the zener diodes,
with the cathode stripes all facing towards the bottom of
the board as shown. Next, fit schottky diodes D1-D4. Note
that D3 faces in the opposite direction to all the other diodes. Also, since the diode bodies are quite large, you will
have to be careful in bending the leads to fit the closely
spaced pads on the PCB.
Now solder IC1 in place, ensuring its pin 1 is in the correct location. You can use a socket, although we suggest you
Top and bottom sides of the controller PCB, before the H-bridge drivers are attached (they slot into the header pin sets on the
top side). While this single-sided board is ideal for home PCB makers, a double-sided version, which has all the links already
in place as the top side pattern, is available from the SILICON CHIP ONLINE SHOP. IC2 is not required if Pololu drivers are used.
siliconchip.com.au
Australia’s electronics magazine
September 2019 37
Part list - seat frame
Pedal frame / slider
2 800mm lengths 20x20x1.6mm square steel tubing (A)
2 520mm lengths 20x20x1.6mm square steel tubing (B)
4 300mm lengths 20x20x1.6mm square steel tubing (C)
1 320mm length 20x20x1.6mm square steel tubing (D)
2 150mm lengths 20x20x1.6mm square steel tubing (E)
1 135mm length 20x20x1.6mm square steel tubing (F)
1 400mm length 25x25x3mm steel angle (G)
2 25mm lengths 25x25x3mm steel angle (H)
1 500x340x1.6mm rectangle of aluminium chequer plate
(I)
2 800mm lengths of 30x30mm punched steel single slot
angle rail (J)
10 M6 x 30mm machine screws and hex nuts (for attaching
J to the slider frame).
Seat frame
2 583mm lengths of 25x25x3mm steel angle (K)
2 355mm lengths of 25x25x3mm steel angle (L)
1 75x145mm rectangle of 6mm steel plate (M)
1 524mm length of 25mm diameter steel tube (N)
2 280mm lengths of 30x5mm flat steel bar (O)
4 M10 x 25mm machine screws (to join O to L)
6 M10 hex nuts (P)
Main frame
1 750mm length of 40x40x1.6mm square steel tubing (Q)
1 650mm length of 40x40x1.6mm square steel tubing (R)
2 762mm lengths of 25x25x1.6mm square steel tubing (S)
2 300mm lengths of 25x25x3mm steel angle (T)
4 123mm lengths of 25x25x3mm steel angle (U)
2 142x100mm rectangles of 6mm steel plate (V)
1 215x100mm rectangle of 6mm steel plate (W)
|
not needed for 2DoF or 3DoF versions
~
Silicon Chip
Fasteners and Linkages
6 55mm lengths of M10 threaded rod (for casters) #
12 M10 domed-cap nuts #
16 M5 x 12mm machine screws (for linear bearings) |
2 M6 x 15mm self-tapping screws (for retaining wheel) #
1 150mm length of M10 threaded rod (to swivel base) #
1 140mm length of M10 threaded rod (to MDF base) |
2 130mm lengths of M10 threaded rod (to seat frame)
Bearings/wheels
8 M10 female swivel-head ball bearings
3 spherical insert ball bearings [NBR-SB201/12-40-22]
2 50mm diameter caster wheels (8)
1 heavy-duty swivel caster, 65x95mm minimum base size
(wheel removed) (9) #
1 steering universal joint or prop-shaft UJ (from any car
scrap yard) (for connecting the seat frame to the main
frame)
4 linear ball bearings with rails (SBR12UU [block] & SBR12250mm [rail]) (%) |
4 Carinya 40x40 zinc-plated brackets (Bunnings Cat
0046902)(<at>) |
not needed for 2DoF version; one only needed for 3DoF version
solder it directly as some pins are soldered on the top side.
Next, install the two 2.2kΩ resistors, which are mounted
vertically, followed by transistors Q1 and Q6, with their
flat faces orientated as shown.
Also, before soldering the diodes, test fit the nearby Mosfets to make sure they will not get in the way. You may need
to bend the diode leads a little to get them into a favourable
position, where they clear the Mosfet bodies.
Now solder the two 2-way terminal blocks in place, with
the wire entry holes facing towards the outside, followed
by the four Mosfets. As there are two different types, be
careful not to get them mixed up, and ensure their tabs
face as shown in Fig.14.
Before soldering them, it would be a good idea to attach
each pair to its heatsink, to ensure they line up correctly.
Insert the insulating layer between the two pairs, then
push them down as far as they will go and solder and trim
the pins. Finally, fit header socket CON1 to the underside
of the board, and it is ready for testing.
Once you’ve completed the modules (you will need one
for each degree of freedom that you are building into the
seat), plug them into the main board.
Note that the power supply terminals for this module are
reversed compared to the Pololu module, so you will have
to cross the wires over when you wire them up.
38
Swivel frame (|)
2 755mm lengths of 25x25x1.6mm square steel tubing (X)
1 700mm length of 40x40x1.6mm square steel tubing (Y)
1 350mm length of 40x40x1.6mm square steel tubing (Z)
1 305mm length of 40x40x1.6mm steel angle (2)
2 146mm lengths of 40x40x1.6mm steel angle (3)
4 40mm lengths of 45x45x5mm steel angle (4)
1 75x113mm rectangle of 3mm steel plate (5)
2 75x200mm rectangles of 3mm steel plate (6)
1 30x120mm rectangle of 3mm steel plate (7)
#
not needed for 2DoF version
Wiring it up
Luckily, this part is pretty straightforward. As you can
see from the photos, I mounted the power supply for my
rig at the back. I suggest you do the same. You will then
need to run some thick (~25A-rated) wires, or a similarly
rated figure-8 cable, from the supply up to the motor power terminals on the control board.
Next, run a set of 10A-rated (or more) figure-8 cable from
each pair of motor controller outputs to the appropriate
motor. Motors 1 & 2 are at front left and right respectively. Motor 3 (if fitted) is the yaw motor, and motor 4 is the
Fig.14: here’s how to fit the components to the double-sided
DIY H-bridge board. For clarity, the heatsinks, mounting
screws and insulating layer between the two pairs of
Mosfets are not shown here. Refer to the photos of the unit
for details on the heatsink mounting. It’s a pretty packed
board, so don’t be surprised if you have to bend a few
component leads to get everything to fit.
Australia’s electronics magazine
siliconchip.com.au
Parts list - controller module
1 Dunnings 100x100x140mm angle bracket (Bunnings
1076757) |
Motors/power
2 12V DC Fiat X1/9 lights retractor motors with 40mm
radius action (roll)
2 24V DC garage sliding door motor with 40mm radius
action (surge/yaw) ~
(worm-drive motors can also be used but are more
expensive)
1 13.8V DC 40A power supply (Jaycar Cat MP3089)
2-4 100kΩ potentiometers (see text)
MDF pieces
1 445x225mm rectangle of 16mm MDF ($)
1 280x130mm rectangle of 16mm MDF ($)
1 150x200mm rectangle of 16mm MDF ($)
1 1100x800mm rectangle of 16mm MDF ($) (floor base) |
Other
1 Ghepardo fixed-back, five-way adjustable racing bucket seat
1 standard car seat slider mechanism (optional – see text)
1 set of Logitech G27 force feedback steering wheel and
pedals
Several metres of heavy-duty figure-8 cable
Several metres of medium or light-duty three-core (or more)
cable
Connectors, to suit motors
Total lengths of tube/angle/bar/rod
40x40x1.6mm square steel tubing: 1.1m
20x20x1.6mm square steel tubing: 4.6m
40x40x1.6 steel angle: 0.65m
25x25x3mm steel angle: 3.5m
30x5mm flat steel bar: 0.6m
M10 threaded rod: 1m
forward/back motor.
Each motor must be fitted with a potentiometer to sense
its shaft position. You need to wire the three connections
for each potentiometer back to CON12a-CON12d on the
controller board, ie, from motor 1 back to CON12a, motor
2 to CON12b etc.
There are many different ways to connect these pots to
the motors. Some motors have an extended shaft (for example, the two garage door motors I used). This allows
placing the pot on one side of the shaft and the lever on
the other end.
Note that the arm lever length should not exceed 4550mm pivot to pivot, or the motor torque requirements
may be too high. The RPM of a typical wiper motor will
be around 50 revs/min.
Wiper motors usually have the shaft extending only one
one side, which will require a different mounting.
The wiper motors unit pot uses a fork and spindle (a
slide type mechanism). This allows full 180° rotation. But
to avoid possible damage to the pots, I recommend opening
the pots and flattening the wiper arm stopper. (see Fig.15).
Additionally, do not attach any mechanical links yet – this
is to avoid sudden and dangerous movement of any one of
the actual chair frames.
In each case, the pot wiper is wired to the connector
siliconchip.com.au
1 single-sided PCB, code 11109191, 133.5 x 96.5m
3 6-pin headers (CON1,CON5,CON13)
5 2-pin headers (CON2-CON4,CON11,JP1)
1 14-pin header (CON6)
1 2-pin polarised header (CON7)
4 8-pin header sockets (CON8a-d; optional – for Pololu
motor drivers)
4 5-pin headers (CON9a-d; optional – for self-built motor
drivers)
5 3-pin headers (CON10,CON12a-d)
1 jumper shunt (JP1)
1 USB/serial adaptor (eg, CP2102-based; SILICON CHIP
ONLINE SHOP Cat SC3543)
1 6-pin female socket (for USB/serial adaptor)
2 2-way 5.08mm pitch screw terminal blocks [Altronics Cat
P2040/P2040A]
1 2.4in or 2.8in ILI9341-based colour LCD touchscreen
[SILICON CHIP ONLINE SHOP Cat SC3410]
2 short (~100mm) female-female jumper leads
14 long (~200mm) female-female jumper leads (for LCD
screen)
1 1m length of Bell wire, tinned copper wire or light-duty
hookup wire (not needed for double-sided PCB)
Semiconductors
1 PIC32MX170F256D-I/PT microcontroller, QFP-44,
programmed with Micromite V2 firmware (IC1)
1 74LS14 hex Schmitt trigger inverter, DIP-14 (IC2)^
1 LM3940IT-3.3 3.3V 1A low-dropout regulator, TO-220
(REG1) [Jaycar Cat ZV1565]
1 5mm LED (LED1)
^Not needed
with Pololu
Capacitors
motor drivers
1 47µF 6V tantalum electrolytic
2 47µF 16V aluminium electrolytic
1 100nF MKT or ceramic
Resistors (all 1/4W 5%)
1 47kΩ
1 4.7kΩ
1 1kΩ
1 470Ω
1 18Ω
Parts list – DIY H-bridge
H-bri dge
(per module, 2-4 required)
1 double-sided PCB, code 11109192, 54.5 x 23mm
1 5-pin header socket (CON1)
1 4-pin terminal block, or 2 2-pin terminal blocks (CON2)
2 small heatsinks (cut down from Jaycar HH8526)
1 piece of insulating material, 20 x 20mm (eg, presspahn or
stiff plastic)
2 M3 x 16mm machine screws, shakeproof washers and nuts
Semiconductors
1 74HC08 quad 2-input AND gate, DIP-14 (IC1)
2 BC546 100mA NPN transistors, TO-92 (Q1,Q6)
2 IRF4905 P-channel Mosfets, TO-220 (Q2,Q4)
2 CSD18534KCS N-channel Mosfets, TO-220 (Q3,Q5) [SC4177]
4 1N5819 40V 1A schottky diodes (D1-D4)
4 15V 1W zener diodes (ZD1-ZD4)
Capacitors
1 100µF 25V low-ESR electrolytic
Resistors (all 1/4W 5%)
2 3.6kΩ
2 2.2kΩ
Australia’s electronics magazine
2 1.5kΩ
2 160Ω
September 2019 39
Fig.15: to make
the pot wipers
continuously
variable, prise the
lugs holding the rear
cover on apart and
remove the stoppers
on both the pot cover
and the internal
workings.
pin that’s closest to CON5, the ICSP header, while the opposite ends of the pot tracks go to the other two pins. But
you need to be careful to connect these two connections
with the correct polarity, or else the motor will bump into
its end stops the first time it’s powered up.
To get this right, disconnect the motor wiring one at a
time and briefly power each from a 12V source so that they
rotate fully clockwise, then measure the resistance from
the wiper to each end.
Find the end which gives the highest resistance when
fully clockwise, and ensure that this end is wired to the
ground pin on CON12a-d. The ground pin is the one centre pin of each header, while +5V is at the right-hand end.
Also, make sure that you don’t get the motor wiring mixed
up; the motor which is wired to CON12a should be powered from the M1 outputs (CON8a or CON9a) and so on.
Wiper motors usually have a switch in the gearbox which
need to be bypassed in this application.
Wiring for all motors must be isolated from the motors
and frames; you should also make necessary arrangements
that take into accout that there are several parts which move
and could cause chafing later on.
The top side of
the completed
controller PCB with
the four Pololu H-Bridge
motor controllers in situ, with
heatsinks (eg, Jaycar HH8526)
attached.
Set-up and testing
You can now change the jumper leads from the Tx and
Rx pins of CON2 to go to CON4 rather than CON3, then
power the controller up by placing a shorting block on JP1
and plugging the USB cable into your PC.
After the splash screen has been shown and you can
see the main screen (shown in Screen2), briefly disconnect each motor from the power supply and apply 12V to
Motor 1 should move anti-clockwise about 45°. This
command should return it to centre:
Screen1: the initial splash screen which appears on the
LCD touchscreen when power is first applied, assuming
that the Micromite firmware and BASIC code has been
loaded onto the PIC32 chip.
Screen2: this shows you the current motor positions (POTx)
and desired motor positions (MOTx), along with the internal
temperature reading. Touch the limit percentage bars to
adjust the motor power for each axis.
40
Silicon Chip
each motor in each direction. Check that as the motor rotates clockwise, the relevant POTx reading on the screen
increases, and as it rotates anti-clockwise, the reading decreases. Check also that the temperature reading is correct.
Set the roll, surge and sway limits low, then connect all
the motors back to the main power supply and switch it
on. The motors should all move towards the centre, then
stop. If any of them are acting up, switch the power supply off and check their wiring, especially to CON12a-d.
Now open a terminal emulator program and connect to
the USB/serial port on your PC at 115,200 baud (or use
MMedit chat facility), then type the following sequence
and press Enter (you may need to copy and paste this
text into some terminal programs for it to work):
A<at>~~~Z
(That’s a capital A, the at symbol,
three tildes, and a capital Z).
A~~~~Z
(That’s a capital A, four tildes, and a
capital Z).
Repeat these commands, moving the <at> (at symbol) to
the right, to test the other motors, eg:
Australia’s electronics magazine
siliconchip.com.au
Here’s the electronics “works” – the (commercial) power supply on the left and the H-brdge controller on the right.
ing, flying and other simulators:
A~<at>~~Z
A~~<at>~Z
•
•
•
etc.
www.x-sim.de
www.xsimulator.net
http://bffsimulation.com
If that all works, then you’re ready to close the terminal
emulator, turn up the settings on the touchscreen, fire up
your simulator and give it a try!
Once you’ve finished testing, it’s up to you whether you
want to leave the controller board powered from the 5V
USB supply, via JP1, or rig up a 5V regulator to run the
controller off the 13.8V motor supply – or via some other
arrangement, like a 5V DC regulated plugpack.
To see just how expensive commercial equivalents of
this project are, check out the following links:
Useful links
Further information regarding the actual seat development and construction can be viewed on the following link:
The following websites are dedicated to simulations
which have developed accessible programs to extract the
physics data from many supported games, including driv-
•
•
•
•
•
•
•
www.pagnianimports.com.au
https://simxperience.com
www.inmotionsimulation.com
www.atomicmotionsystems.com
www.cxcsimulations.com
www.vrx.ca
www.xsimulator.net/community/marketplace/
2dof-3dof-optional-descriptions.81/
Changing the software
Screen3: this is the screen which allows you to save or load
those presets, depicted as three different types of vehicle.
siliconchip.com.au
The BASIC code includes two variables called PotLimMax and PotLimMin which allow the motor potentiometers to work at the centre of their movement, taking account of any possible small ‘overrun’ past the +90° and
-90° maximum angles.
PotLimMax is the required travel angle of rotation of the
pots (from 0 to 1), in this case, a full 180°, while PotLimMin is the value at the lowest point of the travel (-90° angle, again from 0 to 1). There are also offset variables (Brk1,
Brk2, Brk3 and Brk4) are used to limit or remove any minute motor movements due to pot variation when standing
still. These also assist in ‘powering-off’ the motors when
movement is not required.
You can control the most suitable axis strengths relating
to the type of simulation being run, by limiting the PWM
pulse width to a percentage of its maximum value, via the
touchscreen. These can be saved and reloaded in three
SC
presets (Screen3).
Australia’s electronics magazine
September 2019 41
|