|
YAL: Yet Another LegWay
Allen Foster and
Harold Jarvie posts showed me that it
was possible to build a LEGO-only self-balancing robot, inspired by the famous
Steve Hassenplugs LegWay.
Here are some details of my implementation, using two regular light sensor to
monitor YAL inclination.
The code is a simple PID algorithm
implemented in BrickOS, direct translation of
Allen Foster code. The input comes
from front and back light sensors difference, the output is applied to both
motors.
Yal works best with diffused overhead lighting and doesnt like at all lateral
lights (windows)
Here are some movies (Quick Time, 0.5 to 1Mb)
Even Better : Frédéric Sivas single light sensor version
Frédéric modified the code to make YAL work using a single light sensor: a
RIS-only self balancing robot!
Here is Frédérics modified
code
Slightly less stable than its 2 sensors brother, it is nonetheless quite
convincing, as shown in this movie (AVI, 1Mb)
Congratulations, Frédéric!
Philo
Many thanks to John Hansen, whose
BricxCC and Cygwin/BrickOS
installers made BrickOS palatable to average Windows users like me !
|
|
Message has 6 Replies: | | Re: YAL, Yet Another LegWay
|
| (...) Very nice, Philo. Looks very stable. I guess the next job is to get it to respond to the LEGO remote ;) You could even implement forwards/backwards by having the remote shift a weight on the LegWay!! ROSCO (21 years ago, 7-Feb-04, to lugnet.robotics, FTX)
| | | Re: YAL, Yet Another LegWay
|
| (...) I built one of these yesterday, and it works surprisingly well! I like the very simple design. Like Steve H's original LegWay, it requires very few parts. Although it is a little tricky to put it together. I found that the performance of the (...) (21 years ago, 7-Feb-04, to lugnet.robotics, FTX)
| | | Re: YAL, Yet Another LegWay
|
| (...) Hey Philo, I was just looking over your code, and I think if you change this line: pid = (Kd * errdiff + Kp * err + Ki * errint) /3000l; to something like this: pid = (Kd * errdiff + Kp * err + Ki * errint) /3000l + ForwardOffset; then when (...) (21 years ago, 9-Feb-04, to lugnet.robotics, FTX)
|
14 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|