Showing posts with label buddybot. Show all posts
Showing posts with label buddybot. Show all posts

Saturday, May 21, 2016

BuddyBot Update and Parts List

In this post I will show the latest updates to BuddyBot and also give a list of parts that I used to build him.  You can use this parts list to build your own Swift based robot.

This weekend we added a couple new sensors and changed BuddyBot’s look a little bit.  The MaxSonar range finders work great unless BuddyBot is coming up on an object at too large of an angle.  To help the sonar range finders we added two IR Obstacle Avoidancesensors.  We also had an issue where BuddyBot always wanted to climb on the dog pillows and he ended up tipping over.  To stop this we also added a tilt sensor to detect when BuddyBot attempted to climb something.

Lets start off by seeing some new pictures of BuddyBot:




I did not include any new videos on this post because the new sensors simply enhanced BuddyBot's earlier functionality and did not really add anything else.  You can see videos of BuddyBot in the BuddyBot gets obstacle avoidance post.


I will say that I am not too fond of the IR ObstacleAvoidance sensors.  I might be doing something wrong but in order to get two of them to work I need to power one of them on, let it initialize and then power the other one on.  If I let them both power up with everything else they both constantly detect an obstacle.

The tilt sensor works well when the rover is running inside the house however I did have to set it to detect at a higher tilt then I originally wanted because the vibration of the rover itself set it off occasionally.  When I ran BuddyBot outside, the rough terrain constantly set the tilt sensor off.

I did add both sensors to the SwiftyBones Component library.  I also rewrote a large portion of the SwiftyBones_BuddyBot code.

A couple of people have asked about the components that make up BuddyBot so they could build one similar to it.  With that in mind, lets look at the components of BuddyBot.

BuddyBot’s Components

The following images has BuddyBot’s components labeled:








Here is the component list:

1X Battery Pack  (Recommend having a spare)
2X Mini Boards (1 Pack) for LED and Button 
100 Ohm resistor  (one for each LED)
10K Ohm resistor for button
1K Ohm Resistor and 3.3K OhmResistor for MaxSonar Range Finders

You can either solder some of the components (like the LED and Buttons) or attach them all to the solder less breadboard.  I have the Kendal 937D Soldering Station and really like it.  Trust me, if I can use it to solder then anyone can because I am not very good at soldering but I am working on it J.

I printed off a lot of parts and you can find the parts on Thingiverse thing:1580488.  I have the Monoprice Maker Select 3D printer and it is AWESOME.  If you are looking for an entry-level 3D printer I would absolutely recommend this printer.  It has been nothing but terrific for me.

You can use this blog post to setup  your BeagleBone Black with Swift.

I use my SwiftyBones library to program BuddyBot

Finally you can find the current code for BuddyBot on the SwiftyBones_BuddyBotgithub page.

If you have any questions about how to build a BuddyBot, please ask.

BuddyBot’s Future
I asked my daughters what projects they wanted to work on this summer since I was not planning on writing any books over the summer.  My oldest said that she wanted to build robots again.  BuddyBot was created so I would have a good working robot as a base for our projects and also a good library for her to work with.

Now that school is just about over I plan on turning the creative aspect over to my daughters.   Over the next week or two I will be showing them how BuddyBot was built (the component and electronic aspect of it) and also going over how he was programmed.  At that point I will discuss various upgrades we can do depending on if they want to expand BuddyBot from a hardware and software point of view (more Sensors) or from simply a software point of view (expand on his programming).  Some of the ideas I came up with are:

  1.  Adding another MaxSonar Range Finder to detect if BuddyBot approaches a ledge or stairs
  2.  Adding some sound detecting sensors so BuddyBot can move toward sounds
  3.  Adding a path sensor so BuddyBot can follow a path
  4.  Update the code so BuddyBot will try to reach the other end of a room while avoiding obstacles
  5.  Have them design some parts to print for BuddyBot


I have also started designing a new robot that I will work on while my daughters work on BuddyBot.  I will use Swift with SwiftyBones for this new Robot as well because I am finding that Swift is a great development platform for robotic development.

Sunday, May 15, 2016

Buddybot gets Obstacle Avoidance

BuddyBot, the first robot programmed in the Swift programming language with SwiftyBones, just got some more upgrades.  The first being a second MaxSonar_EZ2 range finder so it can decide which way to turn when it detects an object in front of it.  The rest of the upgrades were cosmetic like a new top tray that holds the breadboard in place, two new indicator LEDs so it now has three and a new start button.   You can see the earlier posts on BuddyBot here:


The first robot programed in Swift with SwiftyBones
BuddyBot - The Swift robot gets its first upgrades

If you are interested in making your own BuddyBot or if you just want to see what parts were used you can see this post:  BuddyBot update and Parts List

Here are some new pictures of BuddyBot





When I added the second MaxSonar_EZ2 range finder I put one on the left side and one on the right side.  This allows BuddyBot to determine if the left or right side is closer to the object in front of it and then determine which way to turn based on which side is closer.  It is a very basic system, which could use some more logic, but it is definitely a start.  You can see several videos of BuddyBot with the new obstacle avoidance system below.










  
One thing with the MaxSonar_EZ2 range finder, or any small sonar sensor like this one, is when the robot approaches an object at too large of an angle, the sonar sensor will not register the object.  With this in mind, I think I will want to add an infrared obstacle avoidance sensor to assist the MaxSonar range finders.  The IR sensor I am thinking about using is this one.  I currently have one of these so I am thinking about giving it a try next weekend.  What I will do is when the IR sensor detects an object then I will use the sonar range finders to determine which way to move.

I am also thinking about using a sonar sensor to determine if BuddyBot is near a ledge or step.  I am thinking that if I use a sonar sensor, facing down, in BuddyBot’s nose then I can determine if it is at a ledge or a stairway.  I could take the range when the BuddyBot first starts and if the range increases significantly then it has approached a ledge.


I did not make any changes to the SwiftBones library for this upgrade however I did make significant changes to the BuddyBot code.  You can see the changes on BuddyBot’s GitHub page.

Sunday, May 8, 2016

BuddyBot - The Swift robot gets its first upgrades

BuddyBot, the robot programmed in the Swift programming language just got its first upgrades.  The first thing you may notice is I printed out a couple of new trays to hold the components so it looks better.  Secondly I added a MaxSonar_EZ2 range finder so it can detect obstacles in front of it and turn.  Right now it simply turns right when it gets close to an obstacle. 

Here is the new BuddyBot


The following video shows my daughters playing with BuddyBot.


I created a new github page for the BuddyBot code.   

I also just added a component library to the SwiftyBoneslibrary and I used some of those components to build this version of BuddyBot.  You can read about the component library on the wiki page.


I think the next upgrade is going to be a second MaxSonar sensor.  Rather than having one sensor in the center I am thinking about putting two sensors on the front, one on the right and one on the left, so BuddyBot can make decisions on which way to turn rather than always turning right.  This means I will need to print out a new tray that will hold two sensors.