Monday 21 March 2016

VEX IQ Ball Sorter Project

For every Bett show, Rapid's Education Manager Chris Calver (right) builds a display robot to show the capability of the VEX EDR and VEX IQ robotics platforms. This is his build blog for the Bett 2016 model. 


For Bett 2015, I built a ball transporter system from VEX IQ to demonstrate some of the autonomous capability of VEX IQ. The ball transporter was inspired by an 80s Tomy toy called Big Loader - a cyclic system where balls were passed from one vehicle to another around a track.



For 2016, we had some grand ideas about the Bett VEX IQ autonomous display, but time was against me and with a 7-month-old daughter to entertain, my evenings and weekends were pretty full. And so I found myself just over a week away from Bett without an autonomous display model or a sensible plan! I cleared 2 days in my diary and got to work ...

I had already decided that I wanted to use the new coloured balls from the VEX IQ range as the focal point. I had also decided that I wanted to incorporate some 3D printing into the design and came up with the idea of building a VEX IQ train that ran on a 3D printed track. I knocked up a test locomotive and got to work designing the sections of rail using Autodesk Inventor. Once that was done, it was time to do a few test prints and see if the loco would move on the track. The gauge I was working in was pretty large and even using our UP BOX 3D printer which has a large print area, I could only print one small section of track at a time.

Once the first few straights and corners were off, I got testing and after many failures and redesigns of the loco, I had to concede that I wasn't going to be able to hit the deadline. Having wasted a day, I needed to come up with something else quickly and before long had settled on a simple ball sorter.

The Armbot


The Armbot

Motors: 3 - rotate, shoulder and elbow

Sensors: 1 Bumper switch. Current sensing and integrated encoders are used on all motors for positional control


My colleague Dave had already built up a standard VEX IQ Armbot from an IQ Starter Kit using the standard instructions. I had planned to use this to unload  my ill-fated train so thought I could incorporate it into this model. To make it easy for the Armbot to handle the small plastic balls, I replaced the claw with a bucket. The bucket itself is not motorised: instead it is tipped as it hits the hopper of the second part of the system ...


The elevator robot

The Elevator

1 - controls both conveyor and elevator

1 Bumper switch to detect when Ball Sorter is in position. Note: the elevator shares a Brain with the Silo


This is a really simple robot that runs off just one motor and a bump switch. At the bottom it has a large hopper for collecting the balls delivered by the Armbot. In the bottom of the hopper is a conveyor made from tank treads which moves the ball towards the elevator. The elevator is linked mechanically by gears to the conveyor and so used the same motor for power. Again, tank treads are used as the belt with connectors spaced evenly around its length. These act as the paddles that lift the balls inside the elevator body. I did at first try the rubber intake flaps that come with the tank tread kit, but these were too flexible and made it hard to collect the balls at the bottom of the elevator.

When the balls reach the second tier of the model, they are ejected from the front of the elevator and are placed into another hopper ...



The Ball Sorter

Motors: 3 - Ball release, ball feed and lateral movement

Sensors: 2 - Colour sensor, touch LED


This is the business end of the model, the part that actually sorts the balls into their separate colours. The ball packs contain red, orange, yellow, blue, green, purple, black and white balls. I only wanted to use the colours so put the black and white to one side.

Firstly, I made a chute with a colour sensor at the end. The colour sensor is placed just above a trapdoor which is controlled by a motor. At this stage, I just wanted to calibrate the colour sensor to be able to detect each ball colour. To do this, I ran the ROBOTC debugger so I could see live data from my colour sensor. I then put all the red balls in one at a time, noting down each of the hue values returned. I then did the same for all the other colours with the aim being that I would be able to set a minimum and maximum hue value to represent each colour. Anything between each of these minimums and maximums could be considered a match.

Here is a nice little clip VEX posted of the ball sorter in action:



I noticed that the reds gave very similar readings to the orange, so with little time to work on a solution I discarded the reds to avoid any errors. The below table shows the thresholds which were set for each colour. Notice that each has quite a large window of possibility which helps reduce errors.


With the thresholds set, I could now do some reliability tests. Using the Touch LED to display the detected colour, I put a few hundred balls through and tweaked the thresholds until it was completely reliable for each colour. 

Now I needed to make an automated feed to send the balls from the hopper and down the chute to the colour sensor. This was achieved using a single motor with a sprocket with four rubber flaps attached. Rather than have a sensor to detect when the hopper is empty, the program uses a time-out system. If the colour sensor does not receive a ball for a set period of time, it assumes the hopper is empty and returns to the Elevator to collect more balls. 

Finally, linear motion slides were used to give the side-to-side movement. A single motor drives the whole unit along using a rack and pinion system. The robot accurately positions itself using the motor encoder before releasing a ball into the correct tube. 

The ball sorter

The Silos

4 - 2x door motors, ball dispenser and signal to Armbot

Sensors: Touch LED to show status, Bumper Switch to detect Armbot


The balls are sorted into silos which are made from lengths of clear acrylic pipe. At the end of the pipes is a door which is hoisted by two motors. This door keeps the balls in the silos allowing them to fill up in their correctly-sorted into colours. Periodically, the door opens to let the balls roll out onto the ramp below. A roller with rubber intake flaps ensures against over-filling, by dispensing only a small amount of the balls to the Armbot at any one time.


The Silos
Once the balls are dispensed, a signal is given to the Armbot by a motor which hits the Armbot's Bumper Switch. Once the load has been dumped at the hopper, the Armbot signals its return by hitting another Bumper Switch underneath the ramp and the cycle begins again.

All programming written using ROBOTC 4.0 for VEX.

http://www.rapidonline.com/vexiq 


Thursday 10 March 2016

Bigger, better and just a little more Jammy

The second Ipswich Raspberry Jam took place on Saturday February 27th and the verdict was unanimous amongst visitors, organisers and speakers alike - more, please!

Suffolk can be sleepy at times but this was an event that showed how this part of the world has fully woken up to the power of the Raspberry Pi. After the success of their inaugural event last summer, organisers the Ipswich Makerspace found a bigger venue, the Waterfront Building, University Campus Suffolk, and were still able to sell it out, with over 140 people of all ages attending.

Mind Controlled Racing at the Ipswich Raspberry Jam

Guest speakers included Dave Roxburgh, who showed how to use the Raspberry Pi to write extensions for Minecraft and in-world Minecraft games; Matthew Applegate, founder of Suffolk's Creative Computing Club and an advocate in coding in education; and Jason Alexander, a wildlife and photography blogger who uses the Pi in nature projects such as bird-box webcams. One of the star attractions was the Mind Controlled Racing, a slot car racing track which uses the power of players' thoughts as the fuel to propel the cars.

"We expected a good mix of adults and children would attend so we put on something for everyone", said Stephen Chalkley of the Ipswich Makerspace. "There was a talk on coding with Minecraft and we had some Raspberry Pi’s they could practice on, which was very popular with the younger kids. We had a mini-careers session with three of our guest speakers motivating the older children to think technical. For adults, there was a great wildlife photography presentation and the opportunity to talk technical, something that probably bores their friends and family!"


"We managed to pack a lot into the day but the highlights have to be the mind-controlled racing cars, the Minecraft talk, and robots, robots, robots. Another great day, and we will be doing it again. I have to thank University Campus Suffolk for the venue and support and Rapid for sponsoring us."

Dave Roxburgh during his talk on Minecraft
Chalkley himself gave a talk about the Ipswich Makerspace, which aims to help people get the most out of technology either as a career or as a hobby. "We are giving them a place to go with tools and equipment they couldn’t justify buying themselves, such as a 3D printer, or electronic test equipment." If you are interested in finding out more about the Makerspace you can join their mailing list.

Events like this show how the maker movement is spreading electronics skills to people who had never previously picked up a soldering iron. As Chalkley says: "There really has never been a better time to get involved with technology, whether you want to stream live video from a bird box in your garden, automate your home or simply have fun by building a robot or a quadcopter."

Rapid was delighted to sponsor the event, which took place in the midst of a rather busy period for the Raspberry Pi community. Two days later the Raspberry Pi 3 was released, and the following weekend saw the Pi Party, a two-day event celebrating the 4th birthday of the Raspberry Pi.