Thymio helicopter

Simple helicopter

This construction uses the two wheels of Thymio II to drive two lateral helicopter rotors:

runningheli.jpg

The rotors can be controlled in Thymio's purple basic mode.
The interesting aspect of this construction is that the two rotors are activated separately and the vehicle appears to fly, i.e. it moves in all directions and tilts. By using the accelerometer and other sensors one can thus control the rotors intelligently and playfully, for example:

  • If the helicopter tilts laterally, which can be measured with the accelerometer, one can make one rotor (the lower one) turn faster than the other so as to compensate
  • If the helicopter tilts forward, both rotors can be made to rotate faster
  • The rotors can be stopped when the helicopter is on the ground, using the ground sensors
  • Sound can be used to imitate the helicopter noise (not recommended for parents :-)

Here are some details of the construction, which on the whole is quite simple.

The structure without Thymio II, to get a better view :

structure.jpg

A detailed view of the transmission from the wheels to the rotors, which is done in two steps: first a multiplication, because the wheel speed is too low, then the horizontal to vertical transfer.

mechanism.jpg

To make the rotors turn only when the helicopter tilts forward, here is a minimal code:

onevent acc                   # when the accelerometers are read
    if acc[1]<-3 then               # check that the accelerometer measuring thymio's forward tilt sees something (negative)
        motor.left.target=-acc[1]*40  # acceleration * 40 = wheel speed
        motor.right.target=-acc[1]*40
    else                            # otherwise set wheel speed to zero
        motor.left.target=0
        motor.right.target=0
    end

Helicopter design…

This second model follows exactly the same principle as the first but is based solely on the parts in the LEGO Technic 8258 construction kit. The result is quite "design"…:

moving-heli.jpg
full-view-heli.jpg
front-view-heli.jpg
cabine-heli.jpg
bottom-heli.jpg

This helicopter can be programmed like the previous one. With a bit more advanced programming one can get…. a take-off like this one:-)


Disclaimer: Thymio is only a way to animate this construction. The take off seen in this video uses special effects (fishing line). Thymio is not powerful enough to fly and the Lego parts are not designed to be propellers.

Here is the code which was used for this demonstration:

var status = 1
var rampe_status = 0
var vitesse = 0

onevent temperature
   if status==1 then
      call leds.top(0,0,0)
      call leds.temperature(0,0)
      call leds.prox.v(0,0)
      call leds.bottom.left(0,0,0)
      call leds.bottom.right(0,0,0)
      call leds.circle(0,0,0,0,0,0,0,0)
      status = 2
   else if status==2 then
      call leds.top(0,32,0)
      status = 3
   else if status==3 then
      call leds.top(0,0,0)
      status = 4
   else if status==4 then
      call leds.prox.h(1,0,0,0,0,0,0,0)
      call leds.bottom.left(32,0,0)
      call leds.bottom.right(0,0,0)
      status = 5
   else if status==5 then
      call leds.prox.h(0,0,0,0,0,1,0,0)
      call leds.bottom.left(0,0,0)
      call leds.bottom.right(32,0,0)
      status = 6
   else if status==6 then
      call leds.prox.h(1,0,0,0,0,0,0,0)
      call leds.bottom.left(32,0,0)
      call leds.bottom.right(0,0,0)
      rampe_status=1   # start a slope of increasing speed
      status = 7
   else if status==7 then  #from here (status 7 and 8) blink left-right
      call leds.prox.h(0,0,0,0,0,1,0,0)
      call leds.bottom.left(0,0,0)
      call leds.bottom.right(32,0,0)
      status = 8
   else if status==8 then
      call leds.prox.h(1,0,0,0,0,0,0,0)
      call leds.bottom.left(32,0,0)
      call leds.bottom.right(0,0,0)
      status = 7
   end end end end end end end end 

onevent buttons       
   when button.center == 1 do
      status = 0
      rampe_status=-1
      call leds.top(0,0,0)
      call leds.temperature(0,0)
      call leds.prox.v(0,0)
      call leds.bottom.left(0,0,0)
      call leds.bottom.right(0,0,0)
         call leds.circle(0,0,0,0,0,0,0,0)
   end
   when button.forward== 1 do
           call leds.circle(31,31,31,31,31,31,31,31)
        status = 1
   end

onevent prox  #juste pour faire cela toutes les 100ms
   if rampe_status==1 then   # slope of increasing speed
      vitesse = vitesse + 10
      motor.left.target  = vitesse
      motor.right.target = vitesse
      if vitesse > 600 then
         rampe_status=0
      end
   end

   if rampe_status==-1 then 
          vitesse = vitesse - 10    # slope of decreasing speed
       if vitesse <0 then
         rampe_status=0
      else
        motor.left.target = vitesse
        motor.right.target = vitesse
      end
   end
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License