Wednesday, October 9, 2013

Experiment Bioroid! Step by step instruction to build your own Bioroid!


Experiment Bioroid! - a robot controlled toy for small creatures like rats, hamsters, guinea pigs, lizards, or other small pets. The creature is located under the transparent shield, the clear hemisphere, on the yellow circle. The hemisphere is connected to the base by neodymium magnets.

The yellow circle is a pressure sensitive surface. By using three omni-directional wheels, the  robot moves in the same direction as the animal. Experiment Bioroid! is like a vehicle for pets.

For safety, the robot has infrared sensors that stop the toy when it is close to an obstacle. To resume movement, the pet must start walking in another direction. The toy also stops when the creature is in the center of the yellow circle. 

Bill of Material:

1. Blue base of the robot from Mattel Mindflex


2.  Clear hemisphere from Superplexus

3. Plastic sheets 3mm thickness
4. 3x trapo omni wheels
5. 3x RC Servos HS-322HD
6. 3x Force-Sensing Resistors - 0.2" Circle
7. Arduino UNO
8. Arduino UNO proto shield
9. 3x Sharp Infrared distance sensors
10. 0.1" (2.54mm) Right Angle Male Double Row Pin Header
11. 3x 10k resistors
12. 50x N42 Neodymium Magnets Dia 3mm x 1.5mm Thick
13. 8mm Wide Angle LED 0.5 watt
14. 0.1" (2.54mm) Crimp Connector Housing
15. Female Crimp Pins for 0.1" Housings
16. 4x AA Battery holder
17. Toggle Switch
18. Wires
19. Velcro Sticky Back or 3m VHB


Now DIY!

Using "Dremel circle cutter" cut two plastic circles
177mm Diameter for pressure sensitive surface
155mm Diameter for bottom base

In my case I build my own circle cutter

to make perfect circles please use following setup and check video for details.





Modify servo for continuous rotation
take apart servo and remove small tab from the large gear

make the following setup

upload  a code to arduino with myservo.write(90);
then stop the servo by rotating pot
glue servo shaft with small amount of super glue.
do not insert pot shaft as it was before. just place pot diagonally into servo cavity
Assemble servo.



RC servo to base mount
draw the next drawing on a bottom base
 


Align servo like on the pic using a ruler and pencil rod 

Super Glue it



Wheels to servo
sandpaper wheel
Super Glue each wheel to servo horn (included with each  HS-322HD servo)
use center tool(m3 bolt with tape/spacer) to align horn on center.




IR distance sensor
Super Glue it.

Neodymium Magnets
Drill 2.9mm holes
use 5 magnets for each hole in blue base and hemisphere.
glue only the last magnet to hemisphere.   




Electronics
Just duplicate my circuit analogously to hi-res pics








Friday, December 14, 2012

Liquid level processing with OpenCV & Python





import numpy as np
import cv2
import math

cap = cv2.VideoCapture(0)
cap.set(3,640)
cap.set(4,480)

while True:
    ret, img = cap.read()
    if img is None:
        break
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    edges = cv2.Canny(gray, 100, 120)
    lines = cv2.HoughLinesP(edges, 1, math.pi/1, 20, None, 2, 480);

    dot1 = (lines[0][0][0],lines[0][0][1])
    dot2 = (lines[0][0][2],lines[0][0][3])
    cv2.line(img, dot1, dot2, (255,0,0), 3)
    cv2.imshow("output", img)
    length = lines[0][0][1] - lines[0][0][3]
    print (length)
    key = cv2.waitKey(10)
    if key == 27:
        break

cv2.destroyAllWindows() 
cv2.VideoCapture(0).release()

Wednesday, December 12, 2012