1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tronic's AMC motor motion-controller with pwm/servo output

Discussion in 'SimTools compatible interfaces' started by tronicgr, Aug 30, 2007.

  1. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi,

    Do you mean they won't follow the profiler command position? Then perhaps you need to reverse the + - cables of your motor since you can't reverse the hall effect sensors polarity easily as it can be done in potentiometers...

    The type of magnet also takes some part in making the motion a little non linear some times. Try putting the hall effect head more close to the magnet plate. Test by hand (without motor power) that the travel of the hall-effect sensor outputs the proper range for the degree of banking/pitching you want without getting back reversed readings!!

    Regards, Thanos
  2. knob2001

    knob2001 Member

    Joined:
    Dec 3, 2008
    Messages:
    56
    Location:
    Madrid, Spain
    Balance:
    24Coins
    Ratings:
    +0 / 0 / -0
    Hi thanos!!!

    I'm testing the pololu, and i think there's a little mistake on this diagram on the first page of this topic:
    download/file.php?id=10&mode=view

    The pinout for connecting the AMC to the Pololu board, according to the 1.5 version of your AMC, must be:
    Vcc - Gnd - PWM2 - NC - PWM1 - NC... and so on
    The diagram says:
    Vcc - Gnd - NC - PWM2 - PWM1 - NC...

    Could it be wrong? The second motor will not receive any pulse data.

    I have some problem right now becouse the 12v attached to the inputs of the pololu is somehow outputed tought the +5v and gnd pins of the other part of pololu's pinout, sending back to the AMC... and there's no shortcuts. Anyway, when i have the time to sit down i will find what happens there.

    The good news, and without a LCD to test it, is i was able to change the Kp in terminal... so the AVR keeps data.
    Just a couple of questions...
    the string AB~255~~y~~x~ is valid with the pololu too?
    Is there any way to test the profiler without the sender? Sometimes i have dead times at my work and i don't have a joystick there...

    Regards and thankyou, like always.
    Oscar
  3. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Yes, it is the same. This string transmitts only position data, and has nothing in common with the type or model of h-bridge.

    regards
  4. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0

    Hi Oscar,

    Well, that schematic was made when the AMC1.4 existed that was gone through some revisions, to the next AMC1.5 version, to both serial module and motor pinout for compatibility with IDC connectors... I mention somewhere in the thread the exact reason I swapped these two pins. If you just follow the pinout names you will be fine.

    I often test my AMC on Profiler2.0 without any joystick attached!!! Try X-sim2 !!!!!!!! Its sender doesn't require joystick, not even the actual game you choose in the plugins! You can fake sender and just use the offset bars in the math section to move your axis...

    Regards, Thanos
  5. knob2001

    knob2001 Member

    Joined:
    Dec 3, 2008
    Messages:
    56
    Location:
    Madrid, Spain
    Balance:
    24Coins
    Ratings:
    +0 / 0 / -0
    Hi!...

    Exactly what i need... but, where is the link for that file? I tried to find it but seems to be something for beta testers only... any chance to become one of them? :tape: I will keep my mouth closed about the secrets behind the x-sim2. :yes:

    Thanks like always.
    Oscar
  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi everybody.

    I have finally figured out a simple way to convert the PWM signals of AMC1.5 to proper voltages that can be used as input for heavy duty industrial actuator drivers.

    The present circuit will attach directly to the existing motors connector and will use only the two PWM signals and the ground. Since it will output 0 to +10V, it will need an external power source that can be between +15V and +20V.

    PWM_to_10v_analog.pdf
    PWM_to_10v_analog_layout.pdf

    PWM_to_10v_analog_layout.gif


    A special firmware was written for driving this little circuit. The motion is proportional and still uses the potentiometer feedback for position control. It uses true 10-bit PWM signal and the input for each axis is true 10-bit. That means that will work only in x-sim2 profiler2.0 USO with each axis declared as 16-bit and divided by 64.
    profiler2_output_USO_16bit_AMC.gif

    I will not share the firmware just yet, not until I have some good news from Monast testing it on his Proportional Directional Control valves for a pneumatic setup he is making. Here is the datasheet of his proportional valves:

    PDF_EN_MPYE_EN.pdf

    So, if there is someone else out there that has access to some heavy industrial Variable Frequency drives (VFD) for AC motors, post here the datasheet to see if we can use it there too. One requirement with current circuit is that the driver should take input in such way that the 0V would full speed to one direction, 5V stop position, and 10V full speed to the other direction.

    Analog_bidirectional_10V.GIF

    But I might do a revision later for -11V , 0 , +11V input VF drives.

    Any comment is welcome!

    Best Regards, Thanos
  8. Briut

    Briut New Member

    Joined:
    Dec 14, 2008
    Messages:
    7
    Location:
    Lithuania
    Balance:
    425Coins
    Ratings:
    +0 / 0 / -0

    Attached Files:

  9. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0


    Hi Briut,

    I suppose that your VLT 2800 can take as input 0-10V too. In that case you can use the circuit I made without modification. But I'm not sure if it can output in the range of 4-20mA yet, I have to make some tests first.

    Can you describe me what effect in motor direction has the following voltages / mA values to your VLT 2800?

    A. 0V / 4mA
    B. 5V / 12mA
    C. 10V / 20mA

    This is important, as most of the manuals don't describe if you can reverse the motor with just the analog input or its just used as speed control level!!!

    Analog_voltage_current_comparison.GIF


    Best Regards, Thanos
  10. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0

    Hi Briut

    I looked again the VCL2800 datasheet and it seems you can connect the above circuit (0v-10V output) that I gave, by connecting it to terminal 53.

    VLC2800_analog_input.gif

    But if you still need to use the current loop input method you can use the next circuit (schematic):
    PWM_to_4_20mA_analog.pdf

    Its tested and the current output 4-20mA is ok !! (I'll do PCB circuit later)


    @all
    I have good news from Monast. The 0-10V circuit and the modified AMC firmware I gave him, work fine!!!!! He will use his proportional control valves on a motion system the next days so I guess I'll publish by then the modified AMC firmware for analog output. The really nice thing is that now we have a way to interface to large industrial AC motors and their Variable Frequency drives without need for specific bus protocol etc. Virtually all VFD drives with analog input will work with this simple interface!

    Best Regards, Thanos
  11. premutos

    premutos New Member

    Joined:
    Jan 29, 2009
    Messages:
    12
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi

    I have a problem with my AMC i have eqipped it with a 24MHZ Crystal and will program it but the program time is 1 Hour and die after write and verify the message programm failed appears when i program it with the beta firmware then i can programm sucessfully but it wont work either. All leds are working but the lcd only make black quaders like it is unprogrammed. I use a USB to RS232 from Digitus with FDTI Chip und have it in Serial Printer Mode. I have downloaded the Ponyprog programming videos and have programmed it like in the video. I dont now what i make wrong.

    thx
  12. premutos

    premutos New Member

    Joined:
    Jan 29, 2009
    Messages:
    12
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Ok it is sucessfully programmed and working i can programm it in Hyperterminal, only the LCD Display is not working i will check the cabels. Is there a way to test the AMC without the H Bridge ???
  13. Deniskappa

    Deniskappa New Member

    Joined:
    Apr 9, 2009
    Messages:
    13
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Tronic Hi! My name Denis.I finished my simulator, I need your help, you will be truly grateful. Unfortunately they are not good with electronics and can not build a (better) just like yours. As you can see from the photos, the engines are at 24 volts, are engines of old wheelchairs that throw in a landfill. I have recovered and tested and work perfectly.I have ordered the K8055 of Velleman, when I asked at the forum told me that a relay card or H-bridge as your. I do not know what to buy, you can help me? I have two units (see photo) for the on-off of the engines controlled by a joystick (photo) where I can set the speed. Can I use one of these connected to the k8055 for controlling my motor. If it were possible, how they should be connected? With much gratitude, Denis.

    Attached Files:

  14. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0

    Hi,

    Here is a simple circuit you can build to test the PWM output of the AMC1.5 board:

    PWM_to_5v_analog_signal_tester.pdf


    There are two options:
    1.Use either some leds and resistors, to be able to see the leds light in turn indicating the direction of a motor.
    or
    2. Convert the PWM to analog voltage and read it with a multimeter using an simple RC filter...!

    Have fun!

    Regards, Thanos
  15. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Denis,

    May I ask you a few questions?

    1. The joystick is ANALOG? I mean if you get variable speed on the motors or just on-off??

    2. The Motor Controller I see in the photo is the one that was used on that wheelchair that the motors came off??

    3. Can you measure what voltage signal (from joystick) your wheelchair motor controller needs to activate either motor?


    I was thinking that you could use the PWM signals from my AMC1.5 controller (converted to analog voltage) to set the speed of each motor and use simple potentiometers fixed on your motors as position feedback! This way you may not need to also construct a h-bridge (DSMhb-1.2)

    I don't think you can use K8055 although is has analog voltage output. It lacks position feedback!!!

    Regards, Thanos
  16. Deniskappa

    Deniskappa New Member

    Joined:
    Apr 9, 2009
    Messages:
    13
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Tronic and thanks for the quick and precise response! The Joystick (photo) can modulate the speed of the engine by pressing the MODE button and setting the speed, but that before then operate the lever then the speed will be constant and on-off. The motor controller was dismantled by the same wheelchair and is of the same manufacturer. As you see in the photos I've also added a unit to control actuators or motors other than the two main engines. This unit is still manageable by the joystick. In internet I found this article to interface the joystick to the PC. If you read it you definitely understand more than me. However reading I saw that the ability to handle the commands from PC's. One last question: I have to throw the VM110? I bought for nothing? I also have 2 elettrics actuators 24 volts, may work with VM110. I want to make as simple as possible since they are not very good as you. Thanks for your attention. With admiration. Denis

    Circuit interface between a PC and a wheelchair The joystick is equipped with the wheelchair sends
    information on a digital data bus to a control unit for
    command of the engines. The electrical specifications and the protocol
    communication of the data bus (called DX BUS) not
    are known and the manufacturer of the control system
    wheelchair (Dynamic Control) is not made available to
    provide for research purposes. The only possibility of
    interface directly to this channel of communication
    with the control system of the engines was to make
    a reverse engineering specifications and the protocol.
    Another possible solution consists in replacing
    the control system of the engine with a stage
    power developed ad hoc and controlled by an interface
    communication standard. Whereas these solutions
    complex to implement and risky for the reliability of
    system, it was decided to use another
    approach to take control of the wheelchair and in particular to interact indirectly with the data bus
    of the control system of a wheelchair. In particular, analyzing the circuits inside the joystick
    the wheelchair, it was noted that it was possible to separate the system in order to isolate the gear from the joystick
    rest of the board. Analyzing only the handle and the electrical signals present on it was discovered
    which they were made up of tensions continue directly proportional to the position taken by the leverage
    two forward-backward and right-left. The presence of a connector that connects the signals from
    joystick lever to the rest of the circuit is an access point to interface with the control system
    the wheelchair. It is therefore thought to make a board that will replace the joystick lever
    simulating tensions continue to be produced and that it was controlled by a computer through the door
    Serial RS-232. In order not to squeeze the lever joystick control of the wheelchair was chosen to
    develop a portion of the circuit tasked to interpret the signals produced by the tension lever
    joystick and communicate to the computer, again via the RS-232, the position of the lever itself. The software
    control may use the information received from the circuit to see the position of the lever and
    Illustration 2: Inside the Joystick of wheelchair
    highlighted in red on the lever connector
    Illustration 1: The wheelchair Otto Bock Rabbit
    therefore given by the command and control the wheelchair based on other information in its
    possession (eg, presence of obstacles, commands from other devices, etc..).
    The circuit is capable of operating in two different ways: in
    automatic mode circuit law periodically the position of
    lever and send it to the computer and controls the motion of the wheelchair with the
    lever position communicated by computer, in manual mode the
    circuit reads the position of the lever, sends commands to the computer and the
    movement of the wheelchair itself with the position of the lever just
    detected, the commands sent from the computer and are therefore ignored the
    presence of the circuit appears transparent to the user, because the
    wheelchair driving normally with the joystick, as if the circuit does not
    was present. The transition between the two modes is done with the
    press a button and the mode of operation is
    indicated by two LEDs of different colors. The transition from mode
    manual to automatic is possible only through the use of that
    button, while the change from automatic mode to
    manual may be in three ways: by pressing the button with a
    command sent from the computer or if your computer does not send
    commands for a time longer than a timeout set to 2
    seconds. The communication protocol between PC and the circuit is very
    simple and based on a plot of fixed-length binary (4 bytes).
    The main components of the interface circuit pushchair are:
    ● A microprocessor Microchip PIC18F452, which were used for communication modules
    serial conversion of the analog-digital (ADC) and Serial Peripheral Communication
    Interface (SPI).
    ● Two modules for the digital-analog conversion (DAC) Microchip MCP-4822, connected to
    microprocessor via the aforementioned interface SPI.
    The ADC modules are needed to see the position of the lever of the joystick and convert it to digital in
    to be treatable by the microprocessor, the DAC modules are needed to simulate the tension
    analog necessary to command the wheelchair.
    The chip comes with a clock running at 4MHz, and a control cycle every 20ms, allowing
    detect the position of the lever and control the wheelchair 50 times a second.
    Each control cycle consists of the following steps:
    1. Read the values in the ADC input and calculate the absolute position of the lever along the two
    guidelines. (forward-backward and right-left).
    2nd PC to communicate the values calculated in step 1.
    3rd If the mode is automatically put on the DAC output in the last command received from the PC.
    4th If the mode is manual, put on the DAC output values calculated in step 1.
    5th Read eventually send the data from your PC.
    6. Check the expiry of the validity of the timeout commands.
    7th Check pressure of the button.
    8th Update mode of operation according to events detected in sections 5, 6 and 7 and communicate
    with a two-colored LEDs.
    Illustration 3: The joystick of
    wheelchair and the button to change
    mode of operation of
    circuit with the two LED signaling



    Really sorry For the post too long, but I wanted to be precise because you realized thanks to a little dream!

    Attached Files:

  17. knob2001

    knob2001 Member

    Joined:
    Dec 3, 2008
    Messages:
    56
    Location:
    Madrid, Spain
    Balance:
    24Coins
    Ratings:
    +0 / 0 / -0
    Hi!...

    I received the SS495 hall sensors ;D and tested it with the HD magnet (i will post a lot of updates under my usual topic), but i have a question regarding the crazy data i got from them.

    As far as i can understand, the 10k trimmer attached to the Aref of the Atmega will give the voltage reference, so i can restrict the analog to digital values (1024 max). The problem is that the data displayed on the LCD when i move the SS495 over the magnet (not matter if i move it closer to it) is some kind of crazy, jumping around a value instead of remain fixed, like if the sensor had too much sensitive.

    I haven't connected it to the PC, so maybe the firmware will read those values and quantifie them???
    Since i'm using the same setup of you, what resistance value do you use for that pot? (more or less, of course)

    Anyway, pretty small those SS495, which is something perfect to fit in the joyrider!!!

    Thanks and regards like any time we ask for help. :cheers:
  18. Mambo

    Mambo New Member

    Joined:
    Aug 5, 2008
    Messages:
    168
    Location:
    Czech Republic
    Balance:
    288Coins
    Ratings:
    +1 / 0 / -0
    Do you have it in right way (magnetic field, try it with normal magnet sometimes HDD magnets are wild :D )? viz pictures in http://www.aholubi.org/clanky/pete_hall_senzor.pdf or have SS495 min. power suplly ?
  19. knob2001

    knob2001 Member

    Joined:
    Dec 3, 2008
    Messages:
    56
    Location:
    Madrid, Spain
    Balance:
    24Coins
    Ratings:
    +0 / 0 / -0
    Hi!...

    Thanks Mambo... but i'm a little worried becouse without any pot or sensor connected, the values of both channels are jumping forward and backwards (more or less from 360 to 406) while the other two remains fixed at 128. Some kind of noise i think i have on the line, maybe bad capacitorr?... but for now just ask a little to see if someone had the same on his AMC.

    Regards
    Knob2001
  20. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Oscar,

    Maybe the wall transformer you are using is not that good quality and give ripples that are magnified from the LM2940 regulator.

    Try another power supply for the AMC board, perhaps a switching power supply can give you less noise. I have used in the past a 5v/1A switching power supply from a ZIP drive, and now I'm using an 9V / 1A switching power supply from an IP surveillance camera with no noise interferences at all.

    The other two values (128) are the incoming position data from the computer, and its normal to be static if not connected to the x-sim profiler to receive new positions.


    The SS495 are a little sensitive devices and are perform better if you keep them in a strong directional magnetic field all the time. As you can see on my photos it is mounted only a 1mm away from the HD magnet and I only rotate the magnetic field direction NOT its strength, by increasing or decreasing the distance between them.


    Regards, Thanos