Shop OBEX P1 Docs P2 Docs Learn Events
Questions about Stingray Chassis Kit and C++ programing — Parallax Forums

Questions about Stingray Chassis Kit and C++ programing

iguardianliguardianl Posts: 4
edited 2013-01-28 22:57 in General Discussion
Hello I had a few questions regarding the Stingray Chassis Kit that im hoping someone will help me answer.

1. Does the chassis kit now ship with orange wheels instead of blue wheels and am I able to change that?

2.I have a boe bot with a board of education on it and a p basic stamp I am wondering is there anyway I can convert this to be programed in c++?

3. Im looking for the cheapest way possible to program the stingray with c++ and was wondering did anyone have any suggestions I was thinking about the arduino board but if I could use the board off my boe bot from the question above that would be cheaper but im not sure if I can use any of it or if its possible.

Thank you for your time I appreciate any and all help.

Comments

  • SRLMSRLM Posts: 5,045
    edited 2013-01-27 09:54
    2. No, you cannot program the BS2 with C++. You're restricted to Basic for the Basic Stamps.
    3. I won't comment on "cheapest", but you can use the Parallax Propeller with PropellerGCC to program in C++. To control the Stringray you need some additional hardware besides the processor (notably 2 motor controllers).
  • iguardianliguardianl Posts: 4
    edited 2013-01-27 14:16
    thank you for the reply.

    How would the board of education work shield, along with arduino board, and then the would the only problem be the power supply?

    I was googling and came across this as a possible way to power the motor using the arduino uno. I know fairly little about electronics would this work with the above set up?
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-01-27 18:12
    iguardianl wrote: »
    would this work with the above set up?

    Would what work?
  • iguardianliguardianl Posts: 4
    edited 2013-01-28 03:14
    sorry maybe something to this effect? http://itp.nyu.edu/physcomp/Labs/DCMotorControl

    im not sure how the motors plug though if they do like the servos or otherwise.
  • iguardianliguardianl Posts: 4
    edited 2013-01-28 12:50
    ok forget everything I said above last question Will the arduino uno and board of education shield work for this robot thats all I need to know sorry for all the babbling.


    I know I still need motor controllers power supply etc.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-28 14:07
    Any microcontroller will work, although working with ardunio quite a bit lately, I would say it isnt a good choice. It barely has enough power to read two wheel encoders and create the needed pwm signals for motor control. The propeller with propgcc would be a much better platform to grow with. I would recommend a propeller quick start board, or a propeller project board, they are both $25.

    As for a cheap motor controller go to STMicro's web site and request a sample for an l6205 DIP IC. This chip will handle both of the stingrays motors, and only needs a few cap/diodes/resistors to get working
  • ercoerco Posts: 20,256
    edited 2013-01-28 17:01
    Any microcontroller will work, although working with ardunio quite a bit lately, I would say it isnt a good choice. It barely has enough power to read two wheel encoders and create the needed pwm signals for motor control.

    That's a dangerous statement to make, even in a Parallax forum. :)
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-28 18:12
    Hey im just being truthful, In order to get 2 encoders and 2 wheels working you need to use 4 of the 6 PWM capable pins, and both of the pins which accept interrupts, yes thats right there are only two pins on an uno that do interrupts, so you cant even have two, two channel (i.e quadrature) encoders with out a little bit of hackery, and if you need more than two quadrature encoders than your just SOL. Im sure something like an Arduino Mega or an Arduino Due none of this would be an issue. An uno will do motor control and is fully capable of being the brain for a small desktop BOE Bot type robot, but I have feeling that if you are going to get a sting ray, you'd probably want something semi sophisticated, even if your a newb like me you can see the value in wanting a controller that will grow with the things might want to add to a stingray.

    I actually enjoy using Arduinos, if you already know C its a very simple fast way to get things done, but its not good for everything. I would say any interrupt based 8 bit CPU without an dedicated hardware for quadrature decoding isnt a good idea, Imagine 140 count encoders at 100 RPM, at full resolution this equates to reading 56,000 interrupts per second. While an Arduino or other 8 bit controller may handle something like this just fine, these interrupts will really throw off any determinism in your main loop. Just sounds like a bad idea when theres another choice that has many more cores which allow for 100% deterministic timing.

    If you really dont want a propeller, and you want to use C, try an ARM solution, or even the Arduino DUE which runs Ardunio on an ARM mCU. Please just dont rely on an Uno to be the main brain for a sting ray!
  • ercoerco Posts: 20,256
    edited 2013-01-28 19:15
    Please just dont rely on an Uno to be the main brain for a sting ray!

    It's a good thing I wasn't aware of all of those limitations when I got amazing navigational repeatability out of a lowly BS2 and Pbasic, or I never would have tried! :)

    http://www.youtube.com/watch?v=PX0IhUqnwrk
  • Mike GMike G Posts: 2,702
    edited 2013-01-28 19:55
    yes thats right there are only two pins on an uno that do interrupts,
    On the other hand the pin change interrupts can be enabled on many more pins. For ATmega168/328-based Arduinos, they can be enabled on any or all 20 of the Arduino's signal pins; on the ATmega-based Arduinos they can be enabled on 24 pins. They are triggered equally on RISING or FALLING signal edges, so it is up to the interrupt code to set the proper pins to receive interrupts, to determine what happened (which pin? ...did the signal rise, or fall?), and to handle it properly. Furthermore, the pin change interrupts are grouped into 3 “port”s on the MCU, so there are only 3 interrupt vectors (subroutines) for the entire body of pins. This makes the job of resolving the action on a single interrupt even more complicated.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-28 20:31
    Erco this is no knock to smaller micros what so ever. Ive seen you do some fantastic stuff using a Bs2 to its max, along with custom hardware. The point is you have a pretty good handle on things and you specifically design your projects taking in to account what you will have to do on a Bs2 to make things work right.

    The reason im pointing out the problems with the UNO to the original poster is because I don't want to see him waste a lot of time with a micro that isnt as capable as people think it is, I probably wasted about 2 months with before I decided it wasn't right for me. Its not that the limitations I listed cant be overcome with some simple 74HC4060 counters or something along those lines, its more of a question of why take the path of most resistance with such a nice robot chassis. With a prop the OP can expand to 360 degree of ping sensors, multiple pan and tilts, a few laser range finders, even some simple machine vision. If the OP just has one or two goals in mind like line following or dead reckoning im sure an arduino uno or bs2 will suit him just fine, but if he wants to really build the sting ray up, eventually those smaller micro's aren't going to cut it anymore. The sting ray kind of strikes me as as a platform for those who have big plans to combine a lot of different technology's together.
  • ercoerco Posts: 20,256
    edited 2013-01-28 22:57
    No problem, rw. Different strokes for different folks. My point is that you can do a lot with any of the many modern processors out there. As Mike G pointed out, there's always another way to skin a cat. What's "best" is very subjective.
Sign In or Register to comment.