Bibi the quadruped

Posted on 25/03/2012 by robodve
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

This is my 3rd robot and I thought now it was time to make one that walks! For this robot I used the Keil uVision4 compiler evaluation version. I also used the STM firmware library from ST.com which is called STM32F10x_StdPeriph_Lib_V3.5.0 This lib has a ready to go project structure which can be opened with the Keil compiler. A number of fixed files are required to make it work. Their names and where to put them can be seen in the image here:   These files you must put in the directory STM32F10x_StdPeriph_Template In ...


Bibi the quadruped

This is my 3rd robot and I thought now it was time to make one that walks!

For this robot I used the Keil uVision4 compiler evaluation version. I also used the STM firmware library from ST.com which is called STM32F10x_StdPeriph_Lib_V3.5.0

This lib has a ready to go project structure which can be opened with the Keil compiler. A number of fixed files are required to make it work. Their names and where to put them can be seen in the image here:

 

These files you must put in the directory STM32F10x_StdPeriph_Template

In the KEIL compiler you must open the project located one dir higher in the folder MDK-ARM.

My files / sourcecode I'd like to this project but does anyone know how??

I would like to thank the maker of robot Cane, I used his algoritm/design to make my robot walk. Before that it looked awfull haha!

Some background info on the code. In main after setting all timers for their pwm modes (servo's for legs and knees as well as the pan servo) and interrupts I go in an infinite while(1) loop. Here the robot takes one step, checks a FLAG which indicates wether there is an obstacle detected or not and if so it executes a piece of code to avoid it.

The glowing of the body I do with bright green leds connected in parallel to a channel of TIM2. In an irq routine I increment /decrement a variable which I use for dutycyle and so the leds dim on and of in a peaceful manner.

The ultrasonic distance sensor works as follows: in the main function infinite while(1) loop I trigger a measurement simply by bitbanging a pulse of 10uS high. The sensor issues 8 ultrasonic 40khz pulses. TIM15 is configured in input capture mode on both edges. The echo (response) pin of the sensor I connect to one of the TIM15 input channels. On rising edge I reset the CNT register of TIM15. I also configure the other channel to monitor if the TIM15 overflows. I have it running on 1Mhz so 1 count is 1 uS. Since the sensor goes no further then 500cm of distance aka 29000 uS (so 29000 counts), an overflow means we have a bogus value. Als a value between 29000 and 65535 is invalid so I check for that as well. On the falling edge of the echo pulse I readout the capture value. This number is the pulse HIGH time in uS. Divide this by 58 and you have the distance in CM! Last, I compare the distance just measured to a treshold valua and set a FLAG variable if it is over the limit. In the main program while(1) loop I check for this flag to see if we need to do an evasive manouvre or not!

The making of the mechanics and make it work took me a lot of time.

The acrylic body I designed myself using a CAD program. I used the so called FAB-LAB initiative from MIT, known in my city Utrecht as protospace.nl to make the body. They have a laser cutter which on certain days anybody who wants to design stuff can use. GREAT that something like that exists!

Enjoy my robot. I will go develop it further, I'm thinking of mounting a camera but since I know nothing about this I still did not start... I want to experiment with line flollowing or object tracking.

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

update 26-3-2012: added the sourcecode. You require Keil uVision4 and the STM firmware lib mentioned in my description above

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Walk with 4 legs (2 DOF) and scan the environment. If an obstacle comes close (treshold programmed) the robot searches for a new direction to go.

  • Actuators / output devices: 8x 9G servo's and 1x pan servo for ultrasonic distance sensor
  • Control method: autonomous
  • CPU: ARM cortex M3 STM32F100RBT (aka VLDISCOVERY board)
  • Operating system: none, just C language
  • Power source: 4x AA cells for CPU 4x AA cells for servo motors
  • Programming language: C
  • Sensors / input devices: HC-SR04
  • Target environment: indoors, flat surfaces
LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post