Sie sind auf Seite 1von 38

2/7/2011

AMC & DSMHB BUILDING AND PROGRAMMING GUIDE,


2 DOF MOTION SIMULATOR WITH WINDSHIELD WIPER MOTORS

DIY windshield wiper motion simulator | Igor Fermevc


X-Sim is a Free Motion Simulator Software Written By Martin Wiedenbauer

MAKING OF ELECTRONIC INTERFACE FOR X-SIM


Contents
Introduction ...............................................................................................................................................................................................3
What is x-sim software? .........................................................................................................................................................................4
WHAT is AMC and DSMhb? ...................................................................................................................................................................5
PRODUCING THE PCB (PAY to professional or DIY?) ..................................................................................................................................6
Things you'll need...................................................................................................................................................................................7
toner transfer method ...........................................................................................................................................................................8
diy Etching the PCB.................................................................................................................................................................................9
AMC v1.5 ..................................................................................................................................................................................................10
parts list................................................................................................................................................................................................10
PCB LAYOUT .........................................................................................................................................................................................13
Placing the electronic components ......................................................................................................................................................15
Programming the AMC.........................................................................................................................................................................19
PonyProg2000 ..................................................................................................................................................................................21
Basic testing and calibrating.................................................................................................................................................................25
Setting the KP values ........................................................................................................................................................................25
Calibrating the potentiometers travel..............................................................................................................................................27
DSMhb v 1.2b ...........................................................................................................................................................................................28
parts list................................................................................................................................................................................................28
PCB layout ............................................................................................................................................................................................30
Order to place components on PCB .....................................................................................................................................................34
Connecting the whole circuit ...............................................................................................................................................................37
Credits and Version Information ..............................................................................................................................................................38

INTRODUCTION
In this guide you can find some basic information and read about concepts for creating a motion simulator platform.
Using X-Sim software along with AMC and DSMhb electronic interface to drive two standard windshield wiper motors, developers
have made it possible to simulate motion in two degrees of freedom (2 DOF). By having 2 DOF available, immersion feeling achieved
is very good. It really feels like you're behind a wheel of a real race car, or in the cockpit of an airplane. Of course, there are many
different type of simulators, but if you're on a road of low budget, rather simple simulator, this is the way to go.
Further on, you'll find all information on how to make a micro-controller interface (AMC) and dual PWM motor driver (DSMhb).
This guide will also show you how to produce the PCB boards for electronic interface, and some tips on proper soldering of
components.
Step by step programming instructions for Atmel micro-controller using PonyProg software will also be shown and some instructions
on how to connect all the parts together.

WHAT IS X-SIM SOFTWARE?


X-Sim is the short synonym for Cross Simulator software. It is software suitable for most self made or commercial simulators. The
most interesting part would be the big support for every game usable with it. Because every game developer will implement another
method of exporting the in game real time values like g-forces, speeds or the selected gear, it is very important to know about the
different export types.
X-Sim software consist of couple of SW modules which together allow the game data to be collected and processed and than sent to
electronic interface which will at the end drive the motors. This is a basic explanation of X-Sim role in motion simulator, and for the
sake of simplicity of this guide, only two X-Sim modules will be explained.
There are more guides for you, so you can get the whole picture about X-Sim, and you can find it at:
http://x-simulator.de
FORCE-SENDER module
The profiler will help you to control more than a 6DOF platform and make it possible to add other actuators to a realistic simulator
like a air speed hardware add on with simple fans to simulate the car speed in a open car. You can break the limits of any other
solutions on the market. Also the Profiler2 is able to do some input value scaling and serial export with a Universal Serial Output
parser system. This will output the current target value as a simple byte to the serial port where a intelligent actuator system is
placed.
Don't worry if you didn't understood all of the above things mentioned. Good thing about Force-Sender is that it has Predefined
plug-ins which can be simply selected according to the game you're using.
What it basically does is sending the game data to the other X-Sim module for processing.
FORCE-PROFILER module
This module is responsible for processing of the collected data acquired from Force-Sender. When you decide to use X-Sim + AMC +
DSMhb concept, you will setup the USO (Universal Serial Output) section. We won't get into details now, it is only important to
remember the "USO" term.

It is recommended to use TWO separate PCs for X-Sim SW installation. Read more about it in X-Sim documentation!

All information regarding X-Sim software, its operation and user guides can be found on http://x-simulator.de

WHAT IS AMC AND DSMHB?

As you've read in the previous pages, there is an electronic component in our motion simulator. This component is made of two
parts. First is AMC, which is AVR Motion Controller, and the second is DSMhb which is DIY MOSFET H-bridge motor driver.
When you finish setting up your X-Sim software and you start it, USO component is sending some kind of data through selected
COM (serial) port to Atmel micro-controller. Program code (FW - firmware) running inside the AMC, process the data received and
specific results are converted to PWM signals. These signals are further processed by DSMhb circuit which finally operates the
motors connected to it.
There's no need to go into detail of this process because the theory behind it, is very well documented and can be found online, just
"Google" for it.
Main thing to understand is the "program code" or FW version used in micro-controller, and a couple more settings which enables
certain features provided with the FW used. The great thing about AMC board is that it already has a programming circuit built in.
You'll notice two DB9 serial connectors. One is for connection with X-Sim PC, and the other one is for connection with PC that is
running the programming SW. This port is used only during the AMC programming sequence, but it is a nice feature - no need for
additional programming boards.
Another important aspect of electronic part of motion simulator are "feedback potentiometers", which should be linked to motor
and they are giving the "return" information needed by micro-controller. This way, controller knows the position of motor, and
knows in witch direction to move them and how much, or when to hold them in one position. You'll se later how to calibrate the
travel of these potentiometers in order to determine the travel of motor arm.
Again, there are various types of motor controllers but mainly commercial ones and their price exceeds the price of DSMhb. If you
follow the basic instructions found in this guide, you'll have no problem finishing the build of it and making it operational.

PRODUCING THE PCB (PAY TO PROFESSIONAL OR DIY?)

As you probably know, there are companies that are producing the PCBs (Printed Circuit Boards). When you choose to use their
services you'll get professionally produced PCB, with all kind of protections, precision drilled holes, solder masks, .... but this costs a
significant amount of money.

When to hire professional services?

If your circuit is so complex that it requires a multi-layered PCB (circuits shown here are not complex at all)

If you plan to use SMD components, or your PCB design requires "narrow" or thin circuit leads (not used here)

If you need mass production of PCB (2 boards or maybe 4 if you're building one extra sim for a good friend is not mass
production)

If you don't want to DIY or think you don't have the skills to DIY (read further and you might change your mind)

If you take a DIY road, this guide will show you how to do it. It is not that hard at all and this is rather cheap solution that results in
almost "professional-like" PCBs. You can even do a "silk" layer and protection film if you want. Don't be afraid to try, and don't
despair if you don't succeed at first try. Next chapter will help you not make too many mistakes, so you'll be able to produce nice
looking and functional PCBs.

THINGS YOU'LL NEED

In order to successfully finish PCB production, you're going to need certain items available. Following is a list of those items:

Laser printer (black&white, no need for collor printer)

Printer paper (I'm using the paper for Color laser printers, it must be thicker/heavier than normal paper, and needs a glossy
finish)

Old iron (you can borrow mom's iron, it won't be damaged in the process)

2 pieces of pertinax or vitroplast board (160x100 mm) with coper on one side (pertinax is cheaper and easyer to drill holes,
vitroplast is hard to drill but it is almost transparent which makes troubleshooting the circuit easyer)

Acetone and "lint free cloth" for cleaning the board

Hydrochloric acid HCl (or Muriatic acid, cheap chemical found in stores, mainly used for unclogging the drains, don't use
comercial products for drains!)

Hydrogen peroxide H2O2 (3% solution is most common, but you should use stronger, 10-12% solution as used for dying a
hair)

PLASTIC (PVC) dish big enough to fit the board (here you'll mix your etching chemicals, be sure it's PLASTIC)

Plastic dish big enough to fit in the previous one (here you will have warm or hot water to speed up the etching process.)
You don't need to use the second dish, but the etching process is significantlly faster if you do!
Safety equipment (surgical gloves or similar, protection glasses, old clothes or some kind of protective apron). Hydrogen will
bleach clothes, and acetone leaves staines also.

ETCHING SOLUTION IS HIGLY CORROSIVE, TAKE CARE WHEN DISPOSING!


AVOID PORING INTO METAL DRAINS AND PIPES!
DISOLVE WITH LARGE AMOUNTS OF WATER PRIOR TO DISPOSING!

TONER TRANSFER METHOD

1.
2.
3.

4.
5.
6.
7.

8.
9.

Print out the file containing MIRRORED circuit paths.


Cut the picture to match the size of board, or cut the board to match the size of picture.
Be sure to have a smoothest coper as possible. If you need to, use the finest water sand paper, and sand the coper side of
board. When you are done, clean the board using acetone and lint free cloth. Coper surface needs to be clean and flat so
toner will stick and survive the acid.
Let the iron heats up (the temperature should be close to max, and if you're using new type of iron, TURN OFF the
moisturizer or empty the water tank to be sure). Put the iron on coper side to heat it up a little.
Take the printed paper and put the printed side on coper. Be very careful because coper is warm and toner will stick to it
almost instantly.
Use the iron to press the paper down to coper. Don't go left-right yet as you'll move the paper and smudge the toner.
At some point, check if toner has sticked to coper by carefully lifting the paper corner. If the part of paper with circuit lines
wont come up, you're free to continue pressing and this time press it good, you can even go sideways with iron like you're
ironing the cloths. While you're pressing and ironing, the lines of toner will become visible through the paper. When you
pass all the lines, turn of the iron and go to next step.
Go to the sink and let the water flow. Put the board under and let the water peal the paper from it (soak the board well).
When the paper starts to peal, you can gently help it by pooling it of the board.
Use your fingers or an old tooth brush to peal of all the paper, and be careful not to damage the toner on lines with
excessive force.

This is a link for video clip showing the process explained above:

http://www.youtube.com/watch?v=QQupRXEqOz4

DIY ETCHING THE PCB


1.
2.
3.
1.

4.
5.
6.

Take the bigger PVC dish and fill it with hot water.
Fill the smaller PVC dish with 200ml of acid and 50ml of hydrogen, and finally put the board in, circuit lines facing you, so
you can see the progress. (ACID/HYDROGEN RATIO CAN VARY, try it and see what works best for you)
Carefully take the small dish and put it in big one, so the hot water can heat up the etching solution and speed up the
process.
You can gently move (like rocking the cradle) the smaller dish as it floats in order for acid to pass over coper side of board.
Depending of strength of hydrogen used, you should see some progress after a couple of minutes, and everything should be
done in 10-15 minutes max.
Take out the board and rinse it with water, use acetone to clean the toner.
Repeat the process with another board, and add more hydrogen if the process is slow. Best results are achieved by using
fresh solution after each board.
When finished, dispose the remaining solution keeping in mind that it will corrode metal parts. BE CAREFUL!

You can see the video clip on http://www.youtube.com/watch?v=MJ-I_6kgcRg , or you can find many more video guides about this.

AMC V1.5

PARTS LIST
Part name
ATMEGA8535-16PU

Quantity
1

Info
micro controller

DIL40

40 pin socket for ATMEGA chip

MAX232

chip for serial communication

DIL16

16 pin socket for MAX chip

LM2940CT-5

1A Low Dropout Regulator

heat sink for TO220

narrow heat sink for LM2940 regulator

BC547

transistor

18.432 MHz

crystal

1N5231

5.1 V zener diode

10 uH
10 K ohm multi turn
trimmer

1
1

10 uH inductor coil choke (looks like a resistor)


pins should not be in a row (type A), use one that
has pins like a triangle (type B)

10 K ohm linear
potentiometer

270 degrees, linear potentiometer for position


feedback

Picture

Part name
LED

Quantity
3

Info
simple light emitting diodes,
2 x GREEN, 1 x RED,
size doesn't matter,
use standard or small

Reset switch

tactile switch, used to reset the AMC board

1000 uF / 16V

electrolytic capacitor, higher voltage values can


be used, but it increases the size of component

10 uF / 16V

100 nF / 63V

22 pF / 63V

1.2 nF / 63V

47 K ohm

39 K ohm

15 K ohm

10 K ohm

4.7 K ohm

1 K ohm

470 ohm

270 ohm

220 ohm

power jack, 2.1/5.5 mm ,


male

PCB mount power jack, male type

power jack, 2.1/5.5 mm ,


female

ON CABLE power jack, female type

DB9 connector

90 degrees, PCB mount, female DB9 connector

ceramic capacitor, 0.1 uF, choose by size but


keep the F value

1/4 W, 1% tolerance, metal film type resistor. Use


1% tolerance, it's better!

Picture

Part name
Molex pcb 2.54 / 3 pin

Quantity
4

Info
Molex or Nylon connector with 3 pins for PCB
mount

Molex cable 2.54 / 3 pin

Molex or Nylon housing for 3 pins. Used to make


Rx/Tx connection on AMC

Pins for Molex connector

12

Pins are soldered on cable and pushed into


housing to form a female connector

Molex pcb 2.54 / 8 pin

Connector used for LCD connection. Other parts


will be stated in DSMhb part list

Molex pcb 2.54 / 10 pin

Connector used for DSMhb connection. Other


parts will be stated in DSMhb part list

2.54 pin header, straight

~50

single row, double row, even the triple row


combination exists, make your own combination

4 way dip switch

for configuration of AMC features

LCD 16x2
DEM16217SYH-PY

Displaying informations related to AMC. Must


be compatible with HD44780.

computer jumper

2 for DSMhb, 4 for AMC

8 pin female header


6 pin female header

1
1

Used to insert "bridge" connector when "flashing"


AMC

Picture

PCB LAYOUT
Print out the following picture and use it for toner transfer method!
IT IS WISE TO CHECK IF HOLES ON PRINTED PICTURE MATCH THE SPACING ON COMPONENT PINS!
Simply place the DIL40 socket to its place in picture and check if pins and holes match. There's been cases when durring the
printing process, image has been scaled down, so pay attention prior to toner transferring.

MIRRORED PICTURE READY TO BE PRINTED ON GLOSSY COLOR PRINTER PAPER

PICTURE WITH INFORMATION FOR PLACING AMC COMPONENTS

Layer marked with YELLOW colour is component layer. It shows the upper side of board. You can see finished board
on next pages, so use it as a reference. Be carefull with components orientation, check twice!

PLACING THE ELECTRONIC COMPONENTS


Use the following picture as a guide how to properly place the electronic components. Pay close attention how you're placing
polarity sensitive co,ponents, such as capacitors, diodes, transistors an specially integrated circuits!
Examples:
Component name and info
Electrolytic capacitor always have
"negative" pin clearly marked. If capacitor
is "fresh from store", it should have
"positive" pin longer. On PCB upper layer,
"+" sign is marked.
Ceramic capacitor are polarity insensitive!
Transistors are placed by looking at the
shape of housing. Mark on PCB shows the
top view of transistor, so place it like that.
Notice the flat side and the round side of
body.
Diodes have a line mark around the body
and this line os closer to one end of the
body. Even the "glass" ones have the line,
just look closer.

LE diodes have one lef longer if new, and


have one flat spot on the body. Longer leg
(anode) shoud be connected to "positive"
voltage through a resistor, and shorter leg
(cathode) on which side is a flat spot on
the body of diode should be connected to
"ground".

Most important are integrated circuits.


They are clearly marked and it is of vital
importance that you don't place them
wrong.
Even the IC socket have visible mark for
proper orientation, so if you're using IC
sockets (and you should), place them
properly or it might mislead you later
when you are inserting the IC.

Real picture

Mark on PCB

Take a look at following pictures and use it as a reference:


AMC component side of board (yellow colour layer)

AMC printed circuit side of board (green colour layer)

Before you continue to programming section, you must find out how to connect your LCD. As mentioned in parts list, you should
chose an LCD that is compatibile with HD44780 LCD chip. Most LCDs found on the market are good choice, but you should
check the datasheet for the LCD you have. Following picture shows how to connect the LCD and AMC board:

LCD pinout table (check your LCD datasheet!)


LCD pin
L+
L1
2
3
4
5
6
11
12
13
14

It is better to connect backlight diodes pins directly to external PSU!

Usage
Backlight + (anode)
Backlight - (chatode)
Vss ground terminal
Vdd supply terminal
Vo supply for LCD
RS
R/W
E
DB4
DB5
DB6
DB7

In order to sucsesfully program the AMC, you need to insert "five wire bridge board" that makes connection between MOSI, MISO,
SCK, Reset and GND pins on AMC board. This bridge board can be made on a peace of "perf board", or you can just conect five wires
between appropriate pins. This connection is used only durring "flashing" the micro-controller. Take a look at following pictures:

five wire bridge and short 3 pin cables


for Rx and Tx connectors

Connect the COM port of PC running PonyProg2000 with programming port of AMC board using straight serial cable, set all four dipswitches to OFF position, conect "short 3-pin cable" to Rx sockets on AMC board, and continue with the next chapter.

Connect the 9V DC power supply to AMC, and you should see two GREEN LEDs glowing.
LCD connected to AMC should show black squares in top row, which is OK since AMC is not programmed.

PROGRAMMING THE AMC


Atmel micro-controller needs to be programmed (FLASHED) before the AMC board will serve its purpose. There are many different
ways of transfering the program code into the micro-controller (MC) but we will use "PonyProg" software. In order to use this
software, you need to download it from http://downloads.sourceforge.net/ponyprog/PonyProg_V207c.zip (version for Windows!).
After succesfull instalation of programming SW, you will need a SERIAL COMMUNICATION PORT on your PC. If you have an older
generation PC, this port is found on the back side of PC case (see fig.1). On newer PCs, there's a chance that you wont have
integrated communication port, and you must use USB to SERIAL adapter (see fig.2).
fig.1

fig.2

If you need USB to SERIAL converter shown in fig. 2, it is recomended to use one that is based on "FTDI chip" (this chip is inside, so
you probably wont be able to see it, but check for it on the product package or in product specificaion found online.

It is highly recomended not to use "Prolific chip" type of adapters, or very cheap ones from unknown manufacturors!
These adapters are not working properly with PonyProg SW!

In some cases, a serial port connector can be found somewhere on the motherboard. It is a classic serial port, but you need to plug
extension cable with metal bracket and mount it on PCs rear panel (see fig.3). Check your motherboard manual before opening the
PC case.
fig.3

Before going further, we need to check the settings for serial port (COM port) on our PC.
Using "Hardvare or Device Manager" search for "Ports" and highlight the one you want to use (if more than one). Right click on it
and choose "Properties". Use the fig. 4 and match your settings as shown.
fig. 4
All MS Windows have similar COM port settings page.
You need to set only the basic parameters, there's no need to
go into advanced settings.
Just select the proper COM port number if you have more
than one.
If you have a PCI modem card installed you should see COM3
in your list - don't use this!
If you need to use USB to SERIAL adapter, it will probably be
shown as COM4, COM5, ...
Remeber this COM number! You'll need to set it in PonyProg
later!

The last hardware part you'll need to perform the programming is the serial cable. This cable is called STRAIGHT SERIAL CABLE or
SERIAL EXTENSION CABLE (see fig. 5 for detailes).

fig.5

Notice one male, and one female connector!


Male connector goes to AMC, and female connectors goes to PC running PonyProg SW!

Continue to next chapter and programm the AMC.

PonyProg2000
Asuming you have managed to setup the
"Pony" application, start it and click OK in the
welcome screen.

In the menu bar, click on SETUP, than CALIBRATION.

In the popup window click YES. After a couple of seconds, you should
see Calibration OK notice window. Click OK and procede to next step.

Click on SETUP, than INTERFACE SETUP, select


"SI PROG API" radio button, and chose the COM
port number that you are using. Click on PROBE
and after a couple of seconds, you should see
TEST OK notice window.Close the setup window
by clicking OK.

Click on COMMAND in the menu bar, and than SECURITY &


CONFIGURATION BITS, and click READ. Settings are read from
AMC. You will see the window with factory default bits checked.
Without going into detailes about these bits, just follow the next
step.

You will need to set the bits (fuses) in proper way, so


match the selection of checkboxes as shown on the
picture:
Click on WRITE, wait for process to finish, and click
on READ to confirm the results. Click OK to close
configuration window.

Click on COMMAND menu item and chose PROGRAMM OPTIONS.


Match the settings as shown in the picture and click OK.

Download the AMC firmware zip archive named PWM_AMC15_2DOF_v1 firmware.zip using following link:
http://www.x-simulator.de/forum/download/file.php?id=613
Extract the files from archive. We will be using the file for 18 MHz crystal.
In FILE menu item chose OPEN PROGRAMM (FLASH) FILE...

Browse for the firmware file PWM_AMC15_2DOF_V1_CRYSTAL18.HEX and select it, than click OPEN.

File will be loaded and you can see "raw" FW data. Click on
COMMAND than chose PROGRAMM.
You'll see a window with information related to erasing ,
writing and verifying the data. Durring this process, RED LED on
AMC board will be ON.
When the process is finished, you'll see "Program succesfull"
message box, and AMC LCD should show the info about the
firmware version. CLick OK to continue.
To be sure that flashing process is done properly, you can do
the "read" proceure again.

As soon as the "program" (WRITE) procedure finishes, the red LED will go OFF, and you should see the starting of AMC program
code, and finaly there should be FW version visible.

Now you should remove the bridge board, and turn ON dip switch 1, to be able to see tha status data.

You can press the "reset" switch to test the AMC starting
procedure.
If you can see status data, and other information on LCD, you
can proceed with connections for feedback potentiometers,
and calibration of potentiometers travel.

BASIC TESTING AND CALIBRATING

Setting the KP values

Motion Control parameters:


The motion control scheme of the motors consists of Proportional servo code that controls the acceleration
and the positioning of the motor. In many cases the default setting of 3 times the proportionality constant (Kp)
might not be enough to give fast motion, or even reaching the destination position. For this reason you must
increase the Kp until you find the motion of the motor fast and precise in positioning. Just be careful increase
one at a time the Kp values as they are multiplied by the error factor and might end up with too little servo
stabilization area and endup having your motor overshooting the destination position and bouncing forward
and backward in a try to position itself. This unbalance can be disastrous if you let it run this way for a while,
since each overshooting can be bigger from the previous and it can produce mechanical
problems. Depending the type of simulator you may need to assign different Kp
parameters for each motor. In my Joyrider I use Kp=7 for the Y-axis and Kp=5 for the Xaxis, since the travel of each axis is a little asymmetrical. To manually set the Kp setting for
each motors you have to set the 2nd DIP switch to ON position and then power-on or reset
the AMC board.

Since the setup of Kp parameters require that the AMC has 2-way
communication, you have to also use a second molex cable to connect the two
TX connectors:

HyperTerminal use:
For entering the Kp parameters of the motors you have to use the windows HyperTerminal to have access in
the simple user interface of AMC. This terminal user interface uses the same com port on the AMC, which is
used for receiving motion data. No more need to flash different firmware to change the Kp parameters!
HyperTerminal is hard to find (or get it going/running) if you're using MS Vista or W7, but you can use
Putty or TeraTerm to achieve the same results. Any working terminal client application will work OK, as
long as it has "serial port"communication feature available.

Here is an example screen shot:

The steps to start and use the Windows


HyperTerminal are:
1. Open HyperTerminal.
2. Enter a name for the terminal window (I
called it AVR)
3. Select the COM port you are using
4. Set the bits per second as 115200 and
Flow Control to None
5. From Menu, select View, Font, and
increase the system font to size 12.
6. Now set the DIP2 switch to ON position
and power-on the AMC1.5 board.

The following will appear on the terminal:


Welcome to AMC1.5 motor KP acceleration configuration!
By Thanos (TronicGr) (Crystal 22.1184Mhz)
Previous stored Y= 3
Previous stored X= 3
Enter new value for Y-axis KP (3-30):

Enter the Kp parameters you need for each axis


motor by typing the number and then pressing
enter. It will accept values from 3 to 30.

TIP: For SimForceGT motion its recommended to use the same Kp parameter values for both motors or else
the motion might not be synchronized! But you can repair a slow motor in SimForceGT motion simulator by
increasing a little its Kp until it matches the faster motor!
Enter new value for Y-axis KP (3-30):7
Enter new value for X-axis KP (3-30):5
Y-axis KP=7
X-axis KP=5
Save changes to internal epprom memory? (y/n):

It will then ask if you want to save the changes you made
in the internal epprom memory so they can be used
each time you power the AMC automatically You can
press y or n here, and press Enter.

If you press y this will show on the terminal:


In this case the parameters are written in the memory.
If you press n this will show on the terminal:
In this case nothing will be written in memory.

New Data is stored!

Procedure is aborted!

Another message will also show that indicates you switch off the DIP2 to continue the normal operation of the
AMC. It will also suggest to remove the 5-wire programming clip cause the circuit of the ISP programmer pulls
up the DIP2 data line if left connected resulting in leading the AMC into setup mode each time it power up:
Switch off the DIP2 or remove the programming 5-wires clip...
ote: The first time that you run this firmware you will see that the Kp values for both Y,X axis are 255 (FF).
This is normal. If you cycle the power or reset the AMC board, an internal safety check I installed will save
automatically the default values of Kp=3 for both Y,X axis. This is the same internal safety check that prevent
you from entering values smaller than 3 of bigger than 30 as Kp parameters as they are the absolute limits inside
that the software can operate.
Calibrating the potentiometers travel
We came to the point of connecting the feedback potentiometers. As you probably know, pots have tree pins and it is of vital
importance to connect them properly to AMC. Next picture will help you do it the right way:

When you find a way to mount the potentiometers and connect the pot and motor
shafts together, you might have the need to change the wiring so the travel of pots and
motors are synchronized. If this is the case, you should only swap + and - pin on pots,
leave the middle "washer" pin as it is!
I'm using 270 degrees cheap potentiometers, because they give enough info for the
whole circuit to work properly. You could use multi-turn potentiometers that give you
much more precise information for moving the motors, but they are more expensive
and eventually you'll need to replace the pots as they get warned out. If you decide to
use multi-turn pots, you'll need to deal with gear ratio to achieve the proper pot/motor
travel and mounting the gears is more complicated than just mounting the pot.
As mentioned before, AMC LCD shows the status data. In top row of LCD there are four groups of numbers. For calibrating the
pot/motor travel we will use the third and fourth group.

The idea is to have the number change from 0 to 1023 while


pot is traveling from one to the other end. Multi-turn trimmer
located on AMC board is used to adjust the full travel.

This concludes the information regarding the AMC circuit,


continue to learn about DSMhb.

DSMHB V 1.2B
PARTS LIST

Part name
74HC08

Quantity
1

Info
Quad 2-input AND gate

DIL14

14 pin socket for 74HC08 chip

IRFZ44N
IRFL44N

N-Channel MOSFET

IRF4905

P-Channel MOSFET

BC546

transistor

LE diodes

2 x RED,
2 x GREEN

1N5819

Schottky diode

1N5245

15V Zener diode

100 uF / 63V

Electrolytic capacitor

3.6 K ohm

1/4 W, 1% tolerance, metal film type resistor

2.2 K ohm

1.5 K ohm

680 ohm

160 ohm

Picture

Part name
2 pole terminal block

Quantity
4

Info
For connecting motors and motor power supply

3 pole terminal block

For connecting mosfets

Molex pcb 2.54 / 10 pin

Connection to AMC board

Molex cable 2.54 / 10 pin

Molex housing for 10 pins.


Only 8 are used.

Pins for Molex connector

16

Pins are soldered on cable and pushed into


housing to form a female connector

Picture

PCB LAYOUT

Print out the following picture and use it for toner transfer method!
IT IS WISE TO CHECK IF HOLES ON PRINTED PICTURE MATCH THE SPACING ON COMPONENT PINS!
Simply place the 10 pin molex connector to its place in picture and check if pins and holes match. There's been cases when
durring the printing process, image has been scaled down, so pay attention prior to toner transferring.
MIRRORED PICTURE READY TO BE PRINTED ON GLOSSY COLOR PRINTER PAPER

PICTURE WITH INFORMATION FOR PLACING AMC COMPONENTS

Layer marked with YELLOW colour is component layer. It shows the upper side of board. You can see finished board
on next pages, so use it as a reference. Be carefull with components orientation, check twice!

Take a look at following pictures and use it as a reference:

When you finish etching the DSMhb board, it would be wise to thicken the leads for motor power (pcb lines going from mosfet
terminal block connector to motor terminal connectors). The best way of doing this is to place solid copper wire to follow the thick
pcb lines, and fill it with solder. It can be tricky to achieve this, but be patient and you'll make it. Another way is to melt down
enough solder wire on to thick PCB traces, so at the end it looks like youve used the copper wire Ive mentioned. The final result
should look similar to following picture:

Be sure to remove all the FLUX residue left after soldering! Easiest way to do this is by using various products found on the
market. These products are good but often pricy, so as an alternative, you can mix acetone and alcohol and achieve the
same results. Main thing is that you need to be sure that there are no flux residue left, because sometimes flux can cause
short circuits!

Motors draw a significant amount of current,


so it is wise to mount heat sinks on mosfets,
and even use the fan to blow hot air from
mosfet heat sinks. Be careful when mounting
the heat sinks, and check that they are not
touching each other. The easiest way is to use
"L" type heat sinks (One for each mosfet). Use
80 mm PC fan, and mount it on top of
mosfets.

ORDER TO PLACE COMPONENTS ON PCB


Following is a step by step instruction on how to properly do the mounting of DSMhb components. You dont have to follow this
procedure exactly, but the most important thing is about MOSFETS. They are very sensitive to static electricity, so be careful how
you handle them. If you can, use antistatic bracelet or touch some grounded metal object to discharge yourself.
First thing to do is to place the lower height components, like for start, the wire bridges:

Then place the Zener diodes:

Next is placing the resistors. To avoid the trouble of holding them during soldering, bend a little their legs and cut them.

Next thing to place is the Schottky diodes. Pay attention when you place the ones that are crossing the wire bridges. Place them a
little bit further (higher) from the PCB, to be sure theyre not touching the wire bridges.

Next place the status LEDs, the SIP header for the jumpers, the IC base and the transistor bases as well. You dont need to use the
bases for BC546 transistors, but it is a good idea so you will be able to replace them easily if needed. Next are the Terminal
Connectors, the Molex header and last the big capacitors.

After you are ready, prepare the Mosfet legs by bending them to fit in the terminal connectors sockets and screw them as hard as
you can! During this procedure, be sure to discharge the static electricity off your body, by touching often a grounded device: i.e.
the computer case
Dont forget to also place the transistors in their base sockets too!

If you are not using loads that draw more than 5Amps, you can skip placing aluminum coolers on the mosfets, but if you are going
for large loads that draw up to 25Amp its more than important to use aluminum coolers bolted on the mosfets and if possible, using
some silicon paste between the contact to allow better heat transfer. You should use 8 aluminum coolers pieces bended in 90
degrees but must be careful to not let each other contact as the mosfets are sitting on different potential each other and any such
short circuit, will blow them off!!

As you can see in the photos, I used just one bolt with a plastic distance holder, which holds the pieces pretty strong against the
mosfets. Between the mosfets and the heat sink pieces I used polysynthetic silver thermal compound (particularly the Arctic Silver5)
that is usually used in computer CPU coolers!

CONNECTING THE WHOLE CIRCUIT


OK, you have finished the boards, programmed the AMC, mounted the feedback pots, and now it's time to put it all together.
Use the following schematic to connect everything together:

When you mount your motors to simulator frame, try to isolate it by using non-conductive materials. This way you wont
have to open the motor housing and deal with internal wiring to separate ground leads from housing.
You should consider using safety circuit breakers (fuses) for motor supply lines. It is good to start with lower values for fuses
(10Amps), and increase it later if needed when all other things are tested. This depends of many things, including type of
motors used, frame construction, racer weight, ...

CREDITS AND VERSION INFORMATION

All the information found in this guide can be found at http://x-simulator.de.


All credits regarding X-Sim software goes to Martin Wiedenbauer - sirnoname.
All credits regarding AMC-DSMhb electronics goes to Thanos - tronicgr.

Version

Editor

Change

1.0

*Thanks to Martin Wiedenbauer for creating and sharing the X-Sim software with the world!

Date

Das könnte Ihnen auch gefallen