Anyone using the SX Micro Controller?

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Anyone using the SX Micro Controller? Joe 05-17-2007
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Joe on May 17, 2007, 5:15 pm
Hello,

I started a project a couple months ago for a sensors class I'm taking
this quarter. It is a two wheeled balancing robot that uses a SX Micro
Controller and a IMU Sensor for sensing its angle to gravity. I am
still working on the getting power to the MC and sensor but the entire
mechanical platform is built.

I was wondering if anyone else had used the SX for this purpose? Does
anyone have any tips on this type of robot? Do you think it is
possible to program a Kalman Filter with assembly language?

Hope everyone is having a nice day,
Joe McKibben


Posted by Dale T Stewart on May 17, 2007, 10:15 pm
Hi

A while ago I bought a SX kit from Parallax but I never used it - they
are the main distributors for Scenix. Parallax have a free compiler for
the SX although unfortunately it is BASIC. I think there may be some
free Ebooks at their site.

There may also be a forum there that could help.

Also there is another site that sells C compilers. One of these can
generate code for BOTH PICmicro and SX. It is reasonably priced.

Is it possible to replace the SX with a PIC? That would be a major
advantage because of the huge amount of resourcews available to you,
although from what I understand the SX is a PIC clone.

Although I am not familiar with the Kalman filter, there would be
algorithms available in C, and this could be ported.

One of my teachers at Wollongong TAFE technical college built an
inverted pendulum with Lego, but it was controlled with a PC I think.
It uses fuzzy logic or PID. I have C the code for it somewhere, and can
mail it to you.

geek_mail@hotmail.com

His solution is elegant, and was demonstrated to the neighbouring
University of Wollongong who were impressed.

Cheers

:-]

Dale Stewart





Joe wrote:
> Hello,
>
> I started a project a couple months ago for a sensors class I'm taking
> this quarter. It is a two wheeled balancing robot that uses a SX Micro
> Controller and a IMU Sensor for sensing its angle to gravity. I am
> still working on the getting power to the MC and sensor but the entire
> mechanical platform is built.
>
> I was wondering if anyone else had used the SX for this purpose? Does
> anyone have any tips on this type of robot? Do you think it is
> possible to program a Kalman Filter with assembly language?
>
> Hope everyone is having a nice day,
> Joe McKibben
>

Posted by D Herring on May 17, 2007, 10:50 pm
Joe wrote:
> I started a project a couple months ago for a sensors class I'm taking
> this quarter. It is a two wheeled balancing robot that uses a SX Micro
> Controller and a IMU Sensor for sensing its angle to gravity. I am
> still working on the getting power to the MC and sensor but the entire
> mechanical platform is built.
>
> I was wondering if anyone else had used the SX for this purpose? Does
> anyone have any tips on this type of robot? Do you think it is
> possible to program a Kalman Filter with assembly language?

You might be surprised how far a simple control loop gets you (even
before Kalman). Apply negative feedback with just enough overshoot to
recenter the wheel base...

Depending on how many states you model, the Kalman filter boils down to
a handful of additions and multiplications. You might even be able to
code this in basic; you just need to get the feedback loop going in the
tens of Hertz (an order of magnitude faster than the natural frequency
of the pendulum).

Have fun,
Daniel

P.S. It's a good idea to have fall bars extended in front of and behind
the robot. For when the battery gives out.

Posted by Joe on May 18, 2007, 11:39 am
> Joe wrote:
> > I started a project a couple months ago for a sensors class I'm taking
> > this quarter. It is a two wheeled balancing robot that uses a SX Micro
> > Controller and a IMU Sensor for sensing its angle to gravity. I am
> > still working on the getting power to the MC and sensor but the entire
> > mechanical platform is built.
> > I was wondering if anyone else had used the SX for this purpose? Does
> > anyone have any tips on this type of robot? Do you think it is
> > possible to program a Kalman Filter with assembly language?
> You might be surprised how far a simple control loop gets you (even
> before Kalman). Apply negative feedback with just enough overshoot to
> recenter the wheel base...
> Depending on how many states you model, the Kalman filter boils down to
> a handful of additions and multiplications. You might even be able to
> code this in basic; you just need to get the feedback loop going in the
> tens of Hertz (an order of magnitude faster than the natural frequency
> of the pendulum).
> Have fun,
> Daniel
> P.S. It's a good idea to have fall bars extended in front of and behind
> the robot. For when the battery gives out.

Cool thanks,

I would switch to a PIC, but I dont think I have the time to start
over with the controls design. I would still have to implement a PID
loop for the actual balancing. The Kalman Filter is to combine the
Gyro and Accelerometer Outputs into a good clean, zero drift signal
that the PID loop can use. Thought about the fall bars, I hope to add
a self charge ability to the robot later on so it never runs out of
juice.

Thanks,
Joe McKibben


Posted by Dale T Stewart on May 20, 2007, 2:01 am
I think my teacher just used pots connected to the Lego gear train or
wheels... and it works *really* well, nothing fancy, (apart from the
fuzzy logic or PID, whatever he used)like I said - elegant.

Yeah I am pretty sure it is tethered to a an old PC and programmed in
Borland C++ using mostly C code.

:-]

Dale

Joe wrote:
>
>>Joe wrote:
>>>I started a project a couple months ago for a sensors class I'm taking
>>>this quarter. It is a two wheeled balancing robot that uses a SX Micro
>>>Controller and a IMU Sensor for sensing its angle to gravity. I am
>>>still working on the getting power to the MC and sensor but the entire
>>>mechanical platform is built.
>>>I was wondering if anyone else had used the SX for this purpose? Does
>>>anyone have any tips on this type of robot? Do you think it is
>>>possible to program a Kalman Filter with assembly language?
>>You might be surprised how far a simple control loop gets you (even
>>before Kalman). Apply negative feedback with just enough overshoot to
>>recenter the wheel base...
>>Depending on how many states you model, the Kalman filter boils down to
>>a handful of additions and multiplications. You might even be able to
>>code this in basic; you just need to get the feedback loop going in the
>>tens of Hertz (an order of magnitude faster than the natural frequency
>>of the pendulum).
>>Have fun,
>>Daniel
>>P.S. It's a good idea to have fall bars extended in front of and behind
>>the robot. For when the battery gives out.
>
>
> Cool thanks,
>
> I would switch to a PIC, but I dont think I have the time to start
> over with the controls design. I would still have to implement a PID
> loop for the actual balancing. The Kalman Filter is to combine the
> Gyro and Accelerometer Outputs into a good clean, zero drift signal
> that the PID loop can use. Thought about the fall bars, I hope to add
> a self charge ability to the robot later on so it never runs out of
> juice.
>
> Thanks,
> Joe McKibben
>


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy