Upgrade to Pro — share decks privately, control downloads, hide ads and more …


E41f2132a57510b5d3aae6649eca3deb?s=47 Tommy Falgout
April 04, 2019


Why on God's green Earth, would you build a robotic Clippy made out of LEGO?

Details inside.


Tommy Falgout

April 04, 2019



  2. Agenda u Background u Inspiration for Robo-Clippy u Hobby Electronics

    u Experiments and failures on the path u h/w & s/w solutions u Azure Cognitive Services u Google AIY Kit u Demo
  3. WARNING: We’re about to get into the weeds, up in

    here. EVEN FOR ME.
  4. Tommy Falgout u 20+ years as Unix/Linux developer u Graduated

    from Tulane University in CompSci u 8 years at Nortel u Developer on SMS (aka Text Messaging) u Found love for automation u 1 year at failed startup (checkbox met) u 9 years at Yahoo u Worked in DC/Network/Video/LiveStream automation u Broadcast Obama inauguration with 100k streams u 2 years at Microsoft u Hired as Technical Evangelist now Cloud Solution Architect
  5. Extra-curricular activities u Guest Trebuchet Expert on Nickelodeon’s “Dude Perfect”

    u https://www.imdb.com/name/nm9305352/ u Built u Electronic Applause-o-Tron u LEGO Train set around my office u Whiskey Chandelier u Multiple Trebuchets u Organized u Board Member of TheLab.ms (Local Makerspace) u LEGO Contest for Texas Society of Architects u SlingFest (Local version of Punkin’ Chunkin’) u Classes u “How to solve a Rubik’s Cube” u “Kubernetes and Waffles”
  6. RoboClippy Inspiration I.E. WHY ON GOD’S GREEN EARTH WOULD YOU

    DO THIS?
  7. None
  8. Credit: https://www.instructables.com/id/Animate-a-Billy-Bass-Mouth-With-Any-Audio-Source/

  9. https://www.amazon.com/gp/product/B07657LKNZ/

  10. None
  11. Goal: Use Azure AI in an OCP P20 Hackathon

  12. Requirements Resources u Portable u Utilize Microsoft AI u “Wow”

    factor u LEGO u Makerspace u Used LEGO retailer u Friends u OSS u Arduino u Raspberry Pi
  13. QED

  14. Arduino u What is Arduino? u Arduino is an open-source

    electronics platform based on easy-to-use hardware and software. u Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. u Benefits u Easy to understand and create u Cheap-ish u Good IDE u Write code in C/C++ u Large ecosystem u Works with Azure IoT u Many I/O ports
  15. Raspberry Pi u What is Raspberry Pi? u The Raspberry

    Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote teaching of basic computer science in schools and in developing countries u Benefits u Ports: USB, HDMI, SD Card, Audio jack u Cheap-ish u Can run Linux, BSD, Win10 IoT Core u Write code in whatever u Full networking, CPU, Memory stack u Works with Azure IoT u Downsides u Fewer I/O ports u Less focused on motor controls
  16. Important Questions u How do you make RoboClippy? u How

    big should RoboClippy be? u How do I build RoboClippy? u Materials? u Articulation? u Portability?

  18. RoboClippy Mark I

  19. Status u Cute, but uses a competitor u Definitively, not

    a paperclip u Eyebrows wiggle, but only manually
  20. Uncanny Valley u From Wikipedia: The concept of the uncanny

    valley suggests humanoid objects which appear almost, but not exactly, like real human beings elicit uncanny, or strangely familiar, feelings of eeriness and revulsion in observers.
  21. Uncanny Valley u From Wikipedia: The concept of the uncanny

    valley suggests humanoid objects which appear almost, but not exactly, like real human beings elicit uncanny, or strangely familiar, feelings of eeriness and revulsion in observers. u Surprise! Same goes for paperclips
  22. RoboClippy Mark II

  23. Status u More like a paperclip! u Flimsy, clumsy body

    u Difficult to articulate
  24. Animatronics done wrong is nightmare fuel

  25. RoboClippy Mark III

  26. Status u Eyebrows articulate! u But very basic. One side

    goes up, other goes down u Doesn’t look natural u No fine motor control
  27. LEGO Mindstorms

  28. Proprietary interfaces = Difficult hacking u Was designed to only

    interact with LEGO power supplies. u LEGO Motors Uses 9V. USB uses 5V u LEGO connectors have weird wiring u Whitepapers have been written on LEGO Motor specs u https://www.egr.msu.edu/classes/ece480/capstone/fall10/group02/do c/Brouker%20Application%20Note.pdf u Cabling is not standard
  29. Almost like CAT 5. But not

  30. Not all motors are created equal u Servo motors –

    Good for broad movements u Apply voltage -> turn left/right u Can control torque u Pulsate back and forth u Stepper motors – Good for fine movements u Apply voltage -> go to position X u Use Pulse-Width-Modulation (PWM) for communication u Cannot control torque u Able to stay completely still
  31. Controlling multiple PWM motors u I2C PWM Driver Board u

    I2C = two-wire Protocol controlling low-speed devices u PWM – Pulse Width Modulation
  32. Controlling the Servos u Use I2C Driver Board to send

    PWM signals to motors u Each motor has a different address u 3 Motors u Mouth u Left Eye u Right Eye
  33. Arduino Code

  34. RoboClippy Mark IV

  35. RoboClippy Mark IV

  36. Status u Great structure! u Mouth articulates! u Eyes articulate!

    (using stilts + motors) u Lacks a ”soul” u Soul of a New Machine?
  37. Making RoboClippy “alive” u Goals u Move mouth when speaking

    u Simulate Clippy’s Voice u Articulating eyebrows
  38. Azure Cognitive Services u Speech u Speech to Text u

    Text to Speech u Speaker Recognition u Speech Translation u Vision u Video Indexer – Used for my Ring Doorbell u Face Detection u Image Classification – Used for Whisk(e)y recommendation u Knowledge u Search u Language
  39. Calculating volume u Fact: Speakers usually use two wires. u

    Assumption: Measure the voltage, calculate volume, right?
  40. Calculating volume u Fact: Speakers usually use two wires. u

    Assumption: Measure the voltage, calculate volume, right?
  41. Sound is a wave u Measuring sound at any point

    only gets you a snapshot. u Varies greatly on frequency u Most microphones measure -2.5V to 2.5V u Arduino measures 0V to 5V u Missing half the data!
  42. Step-up Converter u From Wikipedia: A boost converter (step-up converter)

    is a DC-to-DC power converter that steps up voltage (while stepping down current) from its input (supply) to its output (load). u TL;DR: Convert -2.5V to 2.5V to 0V to 5V
  43. Step-up Converter

  44. RoboClippy Mark IV

  45. Status u Needed 2 audio out u Speaker u Arduino

    u Audio splitter wasn’t working (reduced current by half) u Wasn’t easily portable u Took 5-10 minutes to hook up each time u Arduino is powered by USB connected to computer u Sometimes drew too much current (potential laptop killer) u Flakey results
  46. Google’s AIY Voice Kit

  47. Google AIY Voice Kit

  48. Making RoboClippy “talk” u How do we know when start

    listening? u How do we know when to stop listening? u What’s the quickest way to respond? u How can we best utilize Azure?
  49. Speech Recognition u Python library for speech recognition u Provides

    online and offline engines u Microsoft Bing, Google, IBM, Snowboy, CMU Sphinx u Combined with Snowboy, does a good job of capturing speech u PR to Replace Bing Speech API with Azure Speech API u https://github.com/Uberi/speech_recognition/pull/389 u https://github.com/Uberi/speech_recognition u Tried offline T2S. u Took about 1 minute for 5 second audio clip u SaaS model is the way to go!
  50. Snowboy u Hotwork Detection u E.g. “Alexa”, “OK Google”, “Hey

    Clippy” u Record and download your own model for free u https://snowboy.kitt.ai/hotword/27993 u https://snowboy.kitt.ai/
  51. RoboClippy Mark V

  52. Status u MUCH more extensible! u Hybrid solution u Use

    Google h/w for audio u Use Azure PaaS for speech u I2C for Motor control u Raspberry Pi for orchestration u Decoupled laptop from RoboClippy u Power + Control (ssh + python) is now remote u 5 easy-to-connect wires (4 for I2C, 1 USB for power) u Written in Python now OSS u https://github.com/lastcoolnameleft/robo-clippy
  53. Behind the scenes u Wiring u Repurposed Apple USB cable

    for motor power u 2 wires for controller power u 2 wires for controller signals u RaspberryPi u Listens on microphone u Uses speaker u Coordinates with Azure Cognitive Services
  54. Technologies u Raspberry Pi 3B+ u Azure Cognitive Services –

    T2S/S2T u Google AIY RPi kit – Voice Hardware-Attached-on-Top (HAT) u LEGO - structure u I2C PWM Driver – Servo manipulation u Snowboy – Hotword detection u Python 3 – Glue code https://github.com/lastcoolnameleft/robo-clippy
  55. DEMO TIME!

  56. Next Steps u Where do I go from here? u

    Will RoboClippy become Skynet? u Coordinate with MS Marketing? u Do I need to replace Google AIY Voice kit or is the inter-op cool? u Do I integrate LUIS for NLP?
  57. Social Media u RoboClippy at Bricks and Minifigs u Steven

    Sinofsky (Clippy Creator) Retweeted RoboClippy videos
  58. Summary u Learned WAY more than I expected u Electronics,

    RPi, Arduino, Sound, NLP, T2S, S2T, I2C, PWM u Builders love a challenge u LEGO RoboClippy skeleton was done in a few hours u You have more resources available than you expect u People are both horrified and excited about Clippy’s resurgence u Embrace it
  59. Thank you!