Showing posts with label UltraSonic. Show all posts
Showing posts with label UltraSonic. Show all posts

Saturday, June 29, 2013

Larger Arduino robot platform

I started to build a larger platform for my robot. The old platform has three levels and is quite packed with sensors and cables. Since most cables are connected to the Arduino board, I need to dismantle most of the robot when I make changes. Also I wanted to be able to make distance readings in all directions
The old robot is packed with sensors.
I made cardboard templates for most of the hardware to be able to play with layout a bit easier. I decided to make the robot round-ish but ended up making it an octagonal-ish. With centered wheels so it will turn around its center. 
The third wheel is placed on one side and weight is distributed accordingly.

Plywood with cutouts for wheels and cardboard templates for parts
Parts:
  • Plywood 30*30 cm
  • Raspberry Pi Model A
  • Arduino Duemilanove
  • LiPo battery
  • H-bridge 7.4V  3300
  • Power converter
  • 2 * 6V geared motors
  • Servo
  • 2 * IR Sensors Sharp GP2Y0A02YK0F
  • 2 * Ultrasonic sensors HC-SR04
  • Compass HMC5883L
  • Accelerometer and Gyro MPU6050
  • USB-Hub

Before dismantling the old robot 
Lots of parts and cables, My Raspberry Pi model A to the right
The old robot was dismantled in order to find more precise measurements for drilling.

Testing layout with real hardware instead of cardboard
I intend to make distance measurements in all directions. I have mounted two IR-distance sensors and two ultrasonic sensors on a piece of wood. It is going to be placed on top of a servo. An unsolved problem is that I must be able to shut the sensors on and off independently since I have noticed that they interfere with each other.
The new two directional sensor IR and ultrasonic
Most parts are assembled and I have glued the support for the third wheel as well as the servo.

Now waiting for the glue... to be continued...


Wednesday, June 19, 2013

SLAM with imperfect sensors

SLAM from 5 positions joined into a best belief map. Red is particle filter position likelihood estimation.  Green lines are Sonar and yellow are IR distance readings. Rectangles + line shows old and current poses. Circles are 10 cm apart.
I have been very sparse with my blogging but I'm actually getting somewhere with my SLAM attempts. I can now combine sensor-readings from multiple location and the robot moves between poses.

The sensor-readings consists of IR and Ultrasonic distance sensors on a servo taking readings 1 degree apart. resulting in 170 distance readings per pose. I have a compass but I'm not using it right now. These sensor-readings are used to estimate the new position using a particle filter.
Robot with LiPo battery. IR-sensor and Ultrasonic sensor on a servo in the front.
My biggest problem right now is that the sensors behave a bit uncertainly, not just noisy but also depending on material, angle and size of the object you get different readings. I have tried to mediate this by combining the IR with the ultrasonic.

IR has small angle but is sensitive to reflective, transparent and luminescent materials. It also behaves badly on striped materials. And my IR sensor also works ok between 20 and 100 cm.

Ultrasonic sensor has wide angle 15-20 degrees, is quite precise, works on most materials that I know of but is sensitive to steep angles.

Saturday, May 25, 2013

Combining sensor input into maps

Combined heading from compass sensor with distance readings from ultrasonic (green) and IR  (red), black lines are robot headings
Today I started to try and combine several measurements from different sensors into a single picture. I scan the environment using the ultrasonic sonar and IR distance sensors and draw a picture of the robots environment. Currently I do not account for position.

The ultrasonic sensor has really wide angles of 15 degrees making it ideal to scan the environment fast. It also has better range than the IR sensors around 2 meters while the IR sensor starts to give inaccurate readings after a meter or so.

The compass gives really crappy values, but I started on an algorithm to correct it based on linear mapping. I measured 45 degree angles and it seems to work OK. All sensors have a lot of noise on them, some of which I can remove using multiple measurements and making sure to add delays after using servos and motors. I'm thinking of moving all sensor calibration to the Rpi board in order to better calculate noise distributions.

Compass Calibration 


Saturday, April 13, 2013

Playing with robot component layout

Today I started to think of different layouts for my robot. I intend to put lots of stuff on this one, that means I quickly ran out of space. Therefore the layout will require at least 3 storage's of components. 

On top camera and electronic compass
Nothing is connected so far, I have tested different components separately. For these images I just put stuff on top of each-other to get a feel for the space requirements and possible problems.

Middle level, USB hub with wifi, Raspberry Pi Model A, and batteries
One of the main concerns is interference on the electronic compass circuit. That must be tested together with other components. Another concern is that I think I might run out of Arduino pins, so I'm prepared to use two boards for this robot. My third concern is battery consumption, the RPi needs to be powered, so the plan is to power the USB hub from batteries. For that I need to 7805 circuit that has a decent ampage...
Bottom level, H-Bridge, Arduino 1, Arduino 2 with 433 MHz radio and speaker.
A speaker for the localization-trilateration of the robot.
Distance Sensors,HC-SR04 and Sharp IR sensor for mapping

Now its time to drill holes and connect the different components...

Friday, March 15, 2013

Ultrasonic transducers ordered



Ultrasonic Wave TCT40-18R from dx.com
Last night I ordered a pair of Ultrasonic Wave Transmitter and Receiver heads. These are driven at 40kHz compared to the 4.8kHz I run the current radio beacons at. My hope is that I can use these to improve the accuracy of the radio beacons. The idea is not to measure distance to an object but to measure distance between two specific entities, the robot and a radio-beacon.

I have tried using two HC-SR04 units and tried measure the distance between them but the echo cannot be detected before the trigger has been activated.


A schematic for ultrasonic range finder from micro-examples.com

I intend to build one sending circuit for the robot and one receiver circuit for the radio-beacon with these. I found the above schematics from micro-examples.com with PIC example code. That circuit looks easy to connect and I just need to divide it into two parts. The code needs to be adapted to Arduino but that sounds even more easy, PWM at 40kHz, delay to avoid false readings and wait for the response... easy as pie. I can probably use the pulseIn Arduino function or a interrupt trigger.

USB-HUB

Not really related but I also ordered a 4-port USB HUB with individual switches for the new workshop. I hope that will save me from the wear and tear of pulling those USB cable out and press them in all the time.