Glide wheel AS (EV3)
 NXT and EV3   Started by martin   2017-04-14 12:39:29 -04:00   Comments: 14    Viewed: 452

  1. martin
    martin Member
    My project is Rotary inverted pendulum

    This my issue:

    When I couldn't find "Glide wheel RX and motor control", I choosed "glide wheel AS" for detected angle's of PF Motor. But this sensor has only one cable which can connect to EV3. Then I had problem for connect "PF motor xl" to EV3, so I made cable for connection to EV3, according this website

    My problem is: I could not detect angle of PF motor with this Glide wheel AS. And the EV3 can deteced this sensor only Port 1 & 2 & 3 & 4. Then i cannot used this sensor as encoder in simulink (port encoder is A ...D).

    Could it possible to give me idea to solve this problem?
    martin, 2017-04-14 12:39:29 -04:00
  2. setht
    setht Member Staff Member
    setht, 2017-04-18 09:30:15 -04:00
    martin likes this.
  3. martin
    martin Member

    You right. But I could not find the block of GlideWheel-AS in simulink library which can use it.
    Do you know it?

    martin, 2017-04-19 04:37:40 -04:00
  4. setht
    setht Member Staff Member
    Please have a look at the product page for the sensor you purchased, the GlideWheel-AS. If you scroll down to "Software Libraries and Drivers" you can see a list of the platforms we support. Among these are the LEGO MINDSTORMS EV3 Home Edition, NXT-G, NXC, RobotC, ev3dev, and MonoBrick.

    In the customer-submitted blog post you can see he or she is using "MATLAB/Simulink." If you are interested in replicating this you can follow that blog post.

    If you are uncertain as to whether or not the sensor itself is working, could you please try the supplied example program with the custom block? Earlier you said "And the EV3 can deteced this sensor only Port 1 & 2 & 3 & 4." Does this mean you were able to get readings from those ports? The custom block, sample program, and instructions for installing them are available on our product page. You should be able to put a LEGO wheel and axle on the GlideWheel-AS and rotate it by hand to see the readings change.

    I Googled "simulink lego ev3 nxt" and found this website, which might be useful for you. Please note that this is supplied by MathWorks, not Good luck!
    setht, 2017-04-19 10:33:52 -04:00
    martin likes this.
  5. martin
    martin Member
    Hello again,
    Unfortunately i read data sheet of  the GlideWheel-AS. and also i contacted with who did this project with simulink. He said , he didn't used the this sensor. and also i could not able reading data from the GlideWheel-AS in simulink.
    And now i dont know what should i do!

    martin, 2017-04-19 10:41:32 -04:00
  6. setht
    setht Member Staff Member
    I'm glad you were able to get in touch with the original creator!

    It doesn't look like Simulink is supported under the "Software Libraries and Drivers" section. Instead let's try using the EV3 block and EV3 sample program.

    Keep it simple. Start with the "Read AngleSensor Value" program. Connect your GlideWheel-AS to your EV3, then download and run the program. Use a LEGO wheel and axle to rotate the sensor. You should see the numbers on screen change. Then you can look at the other EV3 programs in that file for more examples on how to use it.
    setht, 2017-04-19 11:15:01 -04:00
    martin likes this.
  7. martin
    martin Member
    Thank you for your quick reply.
    I tried:
    In simulink libary, EV3 doesn't have block which can define the GlideWheel-AS with port 1,2 ,3, 4. I created a simple Simulink Program which just used the Encoder block with port A,B,C,D , and display the value in the screen. ( just connect the Encoder block to a "Screen " block).
    Rotate the sensor with an axle but i can not get any measurements. 

    martin, 2017-04-19 11:35:22 -04:00
  8. setht
    setht Member Staff Member
    setht, 2017-04-19 11:38:09 -04:00
    martin likes this.
  9. Deepak Patil
    Deepak Patil Administrator Staff Member Richmond
    GlideWheel-AS is a I2C device, use the I2C read API from Simulink to read two bytes of angle value from the sensor. 
    (User Guide will describe which bytes you need read).


    Deepak Patil, 2017-04-19 11:39:19 -04:00
    martin likes this.
  10. martin
    martin Member
    martin, 2017-04-19 11:40:49 -04:00
  11. martin
    martin Member
    I read this datasheet. But they didn't say anything about Simulink/Matlab.

    martin, 2017-04-19 11:42:38 -04:00
  12. martin
    martin Member
    But the problem is:
    The website said we can use as encoder !!!
    But in simulink/Matlab, they don't have any blocks which related encoder with port 1,2,3,4. They have only encoder blocks with port A,B,C,D.
    martin, 2017-04-19 11:45:33 -04:00
  13. Deepak Patil
    Deepak Patil Administrator Staff Member Richmond
    The GlideWheel-AS is connected to EV3 as I2C device, and Simulink/Matlab has I2C APIs.
    Please refer to I2C table (on page 3 in the User Guide) and read those bytes using Simulink/Matlab API.

    Deepak Patil, 2017-04-19 12:01:35 -04:00
  14. martin
    martin Member
    Thank you for your help and guidance. I will try it.

    martin, 2017-04-19 12:06:33 -04:00
  15. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!