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

NoLimits + SimTools + Arduino... where do I start?

Discussion in 'Miscellaneous' started by roboscan, Aug 26, 2014.

  1. roboscan

    roboscan New Member

    Joined:
    Aug 8, 2014
    Messages:
    4
    Balance:
    334Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform
    Hi,
    I have acquired an old 2DOF motion platform that I would like to make a "virtual coaster" from. Ideally I would like more directions of motion, but this is what I have so this is what I am using.

    The platform is hydraulic. In its current setup, there is an analog joystick (the kind used in an old flight simulator arcade game cabinet) connected to the valve controllers and the platform moves relative to the joystick position.

    My goal is to have an Arduino replace the Joystick and have SimTools take the data from NoLimits Coaster simulator, send it to the Arduino which in turn will send the position information to the valve controllers.

    (Incidentally, the valve controllers are ProValve 200 modules from WhiteOak (now owned by High Country Tek). They take a 0-5v or 0-10v analog input to control the valves. A linear potentiometer sends position feedback to the ProValve 200.

    I've already created a small circuit board to smoothout the Arduino "analog outputs" for 0-5v analog output... now I need to know where to go next in terms of software for the Arduino.

    Can anyone offer me any advice / direction / next steps?

    Thank you very much!

    Jay
  2. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    pictures and as many specs as you can provide will help as well.
  3. roboscan

    roboscan New Member

    Joined:
    Aug 8, 2014
    Messages:
    4
    Balance:
    334Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform
    These are the ProValve 200 valve controllers:
    IMG_20140808_153911.jpg

    I have pics of the hydraulics and feedback components on my phone which I will upload in another post from the phone.

    Platform design has universal joint in center, two pistons; one for tilt and one for roll. Each piston is rigged to a bracket that transfers motion to both the platform via connecting rod and to the linear feedback pot via another connecting rod.

    Pump is a large hydraulic motor that runs continuously, of course, while platform is in use. Each piston has two valves ( one for in, one for out) that are both controlled by a single ProValve 200 which combined with the linear pot creates a servo mechanism.

    PV200 is designed to control a single piston in two directions by switching on and off, the dual valves. Analog input is compared to the feedback resistance and the PV200 activates to correct valve till the piston ( and the feedback pot) move to the correct position.

    This particular setup is somewhat self-contained thanks to the PV200s. My input need only to be a voltage... I do not need the arduino to handle feedback... I just need it to know where the platform is "supposed to be" and send that corresponding voltage.

    Of course, if writing (or modifying existing) code for the arduino to do this proves more complex than just adding some hardware that can handle the switching of the valves by the arduino and connect the feedback pots directly to the arduino as well, bypassing the PV200s altogether, I'm amimable to that. I can't imagine that would be simpler, however.

    J
  4. roboscan

    roboscan New Member

    Joined:
    Aug 8, 2014
    Messages:
    4
    Balance:
    334Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform
    Here are some more photos and details as promised.

    This first picture is an overview of the platform from the top.
    overview.jpg

    This is an overview of the mechanism(s) on the bottom of the platform. The platform was turned up sideways when I took this picture. (the top of the platform is on the right of the photo) You can see in this picture the u-joint in the center, the tilt piston and connecting rods on the foreground-right and the roll piston and connecting rods in the background-left.
    IMG_20140812_152104.jpg

    Here is a closeup of the roll piston - you can see where it connects to the swivel bracket where it transfers the direction of motion. Also, under the piston, you can see the linear potentiometer (position feedback) - you can't see it, but there is a connecting rod worked into the linkage that allows it to slide up and down the linear pot when the platform tilts or rolls (respectively).
    IMG_20140812_152251.jpg

    I have fully gone over and analyzed the current setup. The valve controllers (ProValve 200) have a built-in feedback loop system. According to the specs, the input is supposed to be 0-5v or 0-10v - I tried connecting my computer to the PV200s to see their configuration settings (done through a COM port) but I couldn't connect - I may have made a bad cable - so I can't see what analog voltage it is currently setup for... however there are some issues with the current setup.

    Issues with the current setup (besides the fact that it is manual and I want to control it with a computer)
    As I mentioned earlier, the current setup is completely manual - there's an analog joystick and the platform moves in relationship to the joystick. The electronics in the joystick are simply 2 100K pots - one for tilt, one for roll. The major problem is that whomever wired this thing initially, ran +24v (directly from the PV200 power supply) to the pot and then the sweeper is connected directly to the PV200 analog input. As you can imagine, the range on the pot is VERY SMALL. (if GND is on one end of the pot and 24v is on the other - only the first 20% of the movement is useful.)

    Since I can't log into the controllers to see their current settings, I don't know if they are set for 5V or 10V, however in testing, I noticed that it is all the way in one direction at .4 volts and all the way in the other by 1.5v. Basically, it takes only a small fraction of movement on the joystick to complete the full range of movement on the platform. An even larger problem with this situation is that I think the linear feedback pot's response (though connected to the same 24v power source) is a bit longer than the range of movement on the stick... thus attempting manual movement with precision is nearly impossible currently.

    Clearly there are limitations with the current setup. I am not sure if the limitations are in the PV200 or the fact that this whole thing is (I believe) wired incorrectly because of the 24v input to the pots. - Plus, I don't know how old these components are, so the joystick pots could be warn, too. - But my plan is to automate the thing.

    So as I said earlier - My hope was to just use the Arduino to feed "position voltages" into the PV200 and let the PV200 do the work of making sure it is in the right spot. However... there is another possibility: The ProValve 200s also have a Forward and Reverse override input. Basically, you supply a voltage to these inputs and it simply turns on the appropriate solenoid.

    Now I am wondering if I should just use the Arduino to perform switching and feedback (run the linear pots directly into the Arduino instead of the PV200) and just use the PV200 to take the low voltage input from the Arduino and control the valves - the same way someone might use an h-bridge to control a motor.

    Anyone have any thoughts?

    Thank you!
  5. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok so your looking for a sketch to run on the Ard for testing the PV200. Shouldn't be too hard for the Ard Guys here.

    Basically you need to drive one of the Analogue port of the Ard to virtually represent the pot that the joystick controls. If Im correct I can quickly throw together a test code that will allow you to drive at least one side of it. Which will give you an output from 0v - 5v being 2.5V equalling the centre position and this will relate back to 0 - 255 giving 8 bit resolution. On another note maybe feedback pots can be used to track the position of the platform to help with timings.

    Ok a second code , maybe attaching feedback pots to the sim to read its positions and code to read in the position value and check the actual position and move the sim in the right direction, the only issue here is over all speed , driving it via this pin causes it to move at one speed ? and how many volts needed to drive this pin ? and could we possible drive this pin with a varying voltage ?

    Sounds doable for sure.
  6. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    This is a closed loop controller, so this is really doable,
    I would invest in the free software they provide and buy a usb cable listed on their page so that you maybe able to set them up properly and maybe via usb (serial) commands we can control them directly, worst case looks like we can set the target for position with 5v or even a simple circuit can be built to raise this to 10v's
    Actually could drive this with a K8055 too.

    Interesting indeed.
    Opps forgot link : http://www.hctcontrols.com/products/accessories/sam_software.htm
    • Informative Informative x 1
  7. roboscan

    roboscan New Member

    Joined:
    Aug 8, 2014
    Messages:
    4
    Balance:
    334Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino, Motion platform
    Hey Eaorobbie, thank you for your input.

    I downloaded the software for the PV200 and attempted to connect to no avail last week. (I made my own serial cable and though I swear the pins tested correct, maybe I screwed up... I am waiting for a cable to arrive from HCT.) I did speak with their Tech support and for one thing, there is (unfortunately) no serial CONTROL of the PV200... you can only use the serial connection to monitor the controllers and to change some settings (ie 0-5v / 0-10v, etc.)

    The analog inputs can be either Voltage or Current controlled (there are 2 sets of inputs). The current setup is using the voltage pins. Also, not that it makes that much of a difference, but after further inspection, the feedback "linear pot" (as I've been calling them) are actually transducers - but the end-result is the same.

    I already made some basic circuits to smooth out the PWM Arduino outputs and my next step is to test sending some basic "voltages" to the PV200s and see what I get. I haven't had time to test over the last 2 weeks, but I did install some 8-pin industrial connectors to the platform's control box so I can interface any external electronics while leaving the platform alone moving forward.

    In theory, if I can have the Arduino send voltages (as you said 0v forward -> 2.5v center, etc..) I don't see why it would not just do what it's supposed to (providing I can figure out all the other calibration kinks).

    That K8055 board looks promising if I can't get what I want right from the Arduino!

    I do some programming - though I don't have that much experience with Arduino - so my hope is that I can adapt some existing sketches that work with SimTools to output the voltages that I need. Whatever I've seen so far, appears to incorporate the feedback positioning and PWM outputs to control positioning - however thanks to the PV200, that "hard work" is already being done for me. In effect I need a "simpler" program than what I've seen.

    LASTLY - SPEED:

    You brought up a good point about speed... the PV200 is capable of putting out specific amperages on the valve outputs - my understanding is that on some hydraulic valves you can control the speed of the piston by varying the current being supplied to the valve - I dont' know if these valves work like that, but I also know that the PV200 also has PWM output. In effect, I guess the valve controls speed by opening and closing the valves really fast - and at varying speeds.

    Not to state the obvious, but because the current setup has been controlled via joystick, I assume the PV200s are simply opening and closing the valves as fast as necessary to move the piston to the target joystick position... If you move the joystick slowly, it moves slowly simply because it's continuously reaching it's target position along the way. Of course, if you move the joystick faster than the piston can keep up, you would see a lag and eventually the piston would reach target position. So the Arduino software (in use) can't just say - "oh, I'm tilting right, output 5volts" it would have to send out proportional voltages over the time that the simulator calls for. I haven't, yet, looked that closely at existing sketches - so I wonder if the existing sketches are doing that or are they using some other kind of move - check position - move some more - check position - stop loops to control speed? If that is the case, I, again, wonder if it would in fact be easier to try and just send an "open loop" analog signal to the PV200, or avoid the PV200 altogether and let the micro-controller do all the work??

    (Side note: this platform may not actually be fast-enough for the simulation I'd like to achieve, but that is something I will worry about if / when I actually get it working with the simulator - its the one I have for now :)).

    Thanks, again.

    Jason
  8. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok Jason , sounds all good to me, I have built a simular code for control of a joyrider system, which ran via 2x air cylinders , have to did the code back out and we can work from there.
    Need to make sure they are configured to 0-5v and the rest is pretty easy to put together.
    Once I have the code can produce a basic wiring diagram to help hook 'em up.

    First test if the closed loop program it has will work for you, best scenario I feel, I noticed in docs they even talk about PID settings and timing that can be adjusted in it closed loop, so I feel we could get it running then maybe tune it better.

    I will post back.