E7277604 6c23 47bf ac65 f58458506baf

invention

Magical Marble Sorting Machine Revisited

by alexpikkert

Published on December 1, 2016

This project is an updated version of the original magical marble sorting machine, published in april 2015.(See http://littlebits.cc/projects/the-magical-marble-sorting-machine

It uses a real color sensor (Adafruit TCS34725) instead of sorting marbles based on their weight.

the new version now sorts four different colors instead of three and it also counts the number of marbles per color, using the Number+ bit.

I used a lot of information from the "color sensor How To guide" on the forum from JackANDJude. Thanks!

See http://discuss.littlebits.cc/t/color-sensor-how-to-guide/22898

 

Duration: > 24 Hrs.

How To Make It

1

the box I made a wooden box with a removable top cover and an open front. on the top cover I glued white cardboard. (I reused the box from the original magical marble sorting machine). Dimensions WxDxH 310x190x80 mm.
6e8ea7de 782f 48db 8d2a fa820b3d2ae9

2

the marble selector I made a cardboard selector to send the marbles into their storage lane. Dimensions WxDxH 74x33x20 mm with a sloped surface inside. The selector is glued on the circular servo accessory. I made it as small as possible, adding too much weight on the servo made it jitter a lot...
58147673 82f5 455d a6f0 efa33a04f696

B3c77596 e74c 4c40 b9c3 5f41541cac22

3

the kick mechanism I made a wooden & cardboard cyllindrical device, glued to the circular servo accessory. When the servo is activated, it catches a marble and kicks it into the cardboard selector from step 2.
F8bbd31b 93de 4f95 9b15 cace992e657f

4

the color sensor ramp I made a wooden ramp with the TCS34725 color sensor inside. The marble, catched inside the kick mechanism lands on top of the sensor so ot can measure the color. It has a small piece of clear plastic on its surface to avoid blocking the marble on the hole where the sensor is located. The color sensor is connected with the SDA,SCL, GND and VCC connections on the front of the Arduino.
F201b008 f8a3 4d0e bb7a f7c043a060dc

458beadb 7c54 4bed 81e0 cc4969dc192c

5

the storage lanes for the sorted marbles Made from white cardboard, each lane just wide enough for the 25 mm marbles. Mounted with a slope so the marbles slide into the lanes.
34c5ff83 eb9f 4706 9f65 7069847dec76

6

the marble warehouse For the warehouse (where the unsorted marbles are stored) I used a cylindrical cardboard container from MyMuesly and added a cardboard spiral to its outer surface with a small fence to keep the marbles in place.The spiral is glued on a number of litle wooden cubes.
7bfc24fc 1249 4116 bd21 d291e6693cb4

8de2211b f5ab 47ba b87a c5a48c1b62c2

7

the marble pointer and counter Berhind a white cardboard background the number+ bit and a servo are mounted. The servo is connected to a hand pointer which makes the same moves as the marble selector. This servo is connected to the circuit via a dimmer to adjust the angle of the hand pointer. The counter remembers the amount of marbles per color and is reset when the final counting procedure is activated via the remote control.
4875b8b3 1ab9 4e32 8043 863c75d5f607

435735f4 c6c5 43e7 837d a0af524fd688

8

the Arduino The Arduino bit and the remote trigger sensor are mounted on a vertical mounting plate behind the marble warehouse.
A0ed8095 d8e9 4a46 bdde ed0576d66fcd

9

the mp3 player The mp3 bit is loaded with a bell sound and is mounted inside the main box together with the synth speaker on a upside down mounting board.
E5f6cbeb 7c1d 42a0 b04d cf3d56ad4595

10

reading the colors The color sensor reads three values of each marble, red, green and blue. Depending on the value of these colors the marble selector is pointed to a certain storage lane. When there is no marble detected, the selector moves to a halt position. I wrote two small programs for the Arduino, the main program detects and sorts and counts the marbles, the second program is only used to detect the three color values from the sensor and show them on screen. This was neccessary because the communication via the arduino screen monitor conflicted with the main program. I nearly bricked my Arduino when I tried to combine this with the main program.
Ace0fd6e d772 4bfd b6b2 4f0840f8cc33

Related Projects

Darth Vader's Glove

So, you want to be Darth Vader? It’s time to take your cyborg chassis to the next level. The next time an inferior imperial office...

IFTTT - Littlebits CloudBit Clock/Desk security system

This is a clock/desk security system that you can make with a LittleBits CloudBit and a few household Items.Have your desk pr...

#BitOlympics Field Hockey: “Automatic” goal alarm

The crowd states its joy with a vigorous scream! Made by a group of 8-9 years old kids with no previous experience with little...