Navigation

    Navigation

      15) Pressure sensor steering

      Skate and snow - boarders who have had a go on my twin wheeler comment that it would be good to steer it by tilting deck or pressure sensors under feet.
       
      I bought some pressure FSR-01 sensitive resistors. These have a very high resistance which falls to about 2K Ohms when you press on them with your thumb. I made a voltage divider circuit using a 5K Ohm resistor for each and fed the resulting voltage into an analog input pin of the Arduino board that also decodes the wireless nunchuck data.
       
      Sensors went under (1) Heel of left foot and (2) ball of left foot.  Mounted under the griptape.
       
       
       
       
       
       
       
       
       
       
      Make a recess for the soldered terminals where they join your hookup wire else this forms a ridge under the griptape. Sensor itself is very thin.
       
       
       
       
       
       
      Principle of the software for this: (derived by trial and error)
       
      Left foot on deck.
      Check both sensors giving a reading of >100 on the 0 - 1023 scale (i.e. your foot is on the board)
      Bring board level using the nunchuck remote control for now.
      Configure software so that whenever NO steering commands are being sent from the nunchuck (or your control system), i.e. you are balanced and comfortable, it measures the RATIO of the values coming from the 2 sensors and averages them over time (rolling average). This gives you a baseline value for when you are moving straight ahead.
      For me the ratio comes out at 1.1 (a little more force on heel than ball of foot).
       
      When this averaged ratio deviates more than 0.2 below , turn left, when it goes more than 0.2 above, turn right.
       
      This way it "learns" the normal position and stance of the rider and within reason will accomodate changes in weight of rider (as using a ratio of the 2 sensor readings, i.e. heel value divided by ball of foot value, not the absolute values). If you don't do this "learn the baseline ratio" routine, you find that next time you get on it, your position will be slightly different, ratio will be different and it will turn one way all the time. This is why you can use a fixed baseline ratio of say 1.1 to begin with but it is actually more user friendly to learn your baseline position each time.
       
      Then for safety I have it so that if BOTH sensors reading below 100, cut the power to motors.
      (This means you can lean on tiptoes for example and since 1 sensor still giving a high value, board will keep working in a tight turn).
       
      You can also write the software so that when the "dead ahead" limits of -0.2 or +0.2 from (baseline averaged ratio) are exceeded, the rate of turn is variable according to the instantaneous ratio you are now developing by leaning forward or back on toe or heel of left foot (set some limits else may turn too fast and surprise you).
       
      This works really well now. I tip it level, trim balance point with my wireless nunchuck, give it 3 or 4 seconds to learn my baseline forces on each pressure transducer, then I can turn off the nunchuck and put it in my pocket! It will just carry on using pressure sensors alone to steer.
      To get off it I roll entire left foot outwards which takes the pressure off BOTH sensors and this stops the motors.
       
      NOTE 2012:
      I eventually made this work properly in my twin wheeler with pneumatic tyres (see front title page for photos).
      I used larger diameter - approx 2cm, sensors with a disc of rubber glued over them (cut from an inner tube), the original sensors were too small.
      With flat shoes it could be made to work fairly reliably.
       
       
       
       
       
       
       
       
       
       
       
      Comments