Color Sorter
waujon21
Posts: 2
We are trying to build a color sorter with the activity bot 360, using the BlocklyProp software. The sample code from the tutorial does not work. Yes, everything is hooked up right, corresponding to the code. Why isn't it working. The parts being used are the Propeller Activity Board WX, ColorPal Rev A, and two Feedback 360 High Speed servos. We are also not using the Parallax mechanical design for the color sorter, we are using the Arduino mechanical design for this build. https://howtomechatronics.com/projects/arduino-color-sorter-project/
Comments
When you say it does not work, you need to be more specific. What exactly does not work?
There are 2 reasons that it doesn't work:
1.) That web page is for an Arduino which uses different command and a different microcontroller.
2.) That project uses a STANDARD servo not a continuous rotation servo.
This is a BlockyProp version of the same thing but you will need to 2 standard servos such as these:
http://learn.parallax.com/tutorials/language/blocklyprop/candy-sorter-blocklyprop-project
https://www.parallax.com/product/900-00005
All of Parallax's servos including the Feedback 360 are made by Futaba which in infamous in the world of Radio Control or R/C.
waujon21, have you been able to do other BlocklyProp projects with your ActivityBot to confirm that your setup is working correctly?
the software in that tutorial uses standard servos https://parallax.com/product/900-00005 not the 360 feedback servo.
Ok, looking at the blockly code in the OP I see that he is not using the candy sorting tutorial.
But I think he should be using this block and set the angle he wants the servo to turn to:
The servo 360 reference is here:learn.parallax.com/support/reference/propeller-blocklyprop-block-reference/servo
One issue will be that the servo assumes that the position it is in when powered up is zero degrees. So it will be important that the servo is initially positioned to zero degrees before turning power on and after each movement it should return to zero.
Tom
We understand that info. We wish to know exactly what is not working so we can narrow down the problem. Are the servos not reacting the way you want? As has been mentioned, the servos on the Servo 360 are continuous rotation servos, unlike the servos that are used in the Arduino tutorial. While it is possible to rotate the 360 servo to a certain angle, it takes some more programming and setup..
A common technique to find the zero position of a stepper motor is to slowly move it until it hits a 'hard' stop.
You could also use a 'limit' switch or a light sensor for the "home" position.
https://homofaciens.de/bilder/technik/rotary-encoder_006.htm
The leftmost gear has a metal tab that is almost pointing up and about to enter a light sensor which is that black block in the upper right of the gear.