Tuesday, February 14, 2017

Jacob Marks: Demystifying Computer Architecture for High School Students with Yale's Ventures in Science... And a Little Help From Gumstix


Interview with Jacob Marks:  
It’s a Processor!
Yale Undergraduates Bring Computer Architecture and Design into the High School Classroom with Geppetto D2O
By Keith Lee
03751c8.jpg
image: yale.learningu.org


Computer systems and embedded technology are playing a larger and larger role in our day-to-day lives.  From smartphones to smart homes, we’re putting computers everywhere.  As these systems become more and more complex, training the next generation of innovators gets increasingly difficult.

The first step, of course, is to convince High School students that degrees and diplomas in computer science are attainable goals.  Today, kids can usually pick up any device and start using it right a way.  But to them, the inner workings of computers may be a complete mystery.  So how do we break that barrier and demystify computer hardware?

Well, a handful of Yale undergraduates may be onto something, and they’re using Gumstix boards and Geppetto to do it.  Jacob Marks, a Yale senior and president of the Ventures in Science student organization, along with his colleagues designed a lesson plan to help young students engage, both intellectually and manually, with the inner workings of computer hardware and architecture. I asked Jacob some questions about it and he told me all about Ventures in Science, ‘It’s a Processor’, and his experiences.

Jacob and ‘Ventures in Science’ Take on STEM Education


“Ventures in Science (ViS) is an undergraduate organization at Yale, started five years ago by a bunch of students who wanted to connect undergraduates with scientists in industry,” Jacob says. “[...] In the past few years, ViS has refocused its efforts on educating the leaders of tomorrow about science and its role in law, technology, policy, and culture. When I became president of ViS, I realized we could further advance our objective by increasing scientific literacy and exciting children about science.”

To this end, he and his team started teaching middle school kids about the scientific method with paper airplanes. “My team led students as they experimented with different designs and materials, trying to throw their airplane the farthest. In just an hour, students learned about hypotheses, trials, controls, and variables.”

From there, their involvement in science education continued in the form of demonstrations at Science on Saturdays, a popular lecture series for kids at Yale, reaching out to students from dozens of New Haven schools.

IMG_5829.JPGJacob is a student of physics, mathematics and philosophy with a keen interest in quantum computing technologies.  But he confesses that his exposure to computers and technology was very limited in grade school. “I remember spending elementary and middle school computer classes learning to type with Mavis Beacon, and (more frequently) an “educational” computer game called Oregon Trail,” he related to me,  “When I started college I had never written a line of code, and I couldn’t tell ROM from RAM.”

This continues to be a typical sentiment in public schools.  For whatever reason, computer science and technology tends to get only the most cursory treatment.  Kids are encouraged to use computers in and out of the classroom for word processing, research, and edutainment but most often everything beyond the keyboard and screen is left a mysterious, black box of parts to many kids.

After being exposed to subjects like cryptography, and a software engineering internship at Reservoir Labs, and realizing how many other people’s pre-university computer science background was near zero he decided to make it his goal to “expose - and excite - as many students as possible about the subject.”

In order to tackle that challenge, he and his team developed a lesson plan called “It’s a Processor” for High School students. “ ‘It’s a Processor’ was the beta-test of a new interactive curriculum to teach kids about digital logic and computer architecture. Analogies and demonstrations help illustrate how all of the hardware components in a computer come together to perform computational tasks.”  

The title refers to more than just computer processor.  “The name ‘It’s a Processor’ points to the process of learning itself, self-consciously acknowledging that this one event is only one small part of a complete education in computer science,” He told me, “We wanted students to walk away with a basic understanding of computer architecture, but more importantly we wanted them to leave feeling inspired to dig further into the theory and practice of computer science.”  This certainly a noble aspiration for inspiration, which deserves a stronger foothold in our children's’ education.

IMG_2426.JPGThe Workshop

The ‘It’s a Processor’ drew in students from 7 different public schools, none of whom had ever seen the inside of a PC.  “For many, this was their first time seeing logic gates, and holding a processor, but they all caught on quickly. It was truly a pleasure working with these students!” The computers built during the event are all being donated to Wilbur Cross High School, “the largest public school in New Haven, and one of the most lacking in resources.”

IMG_5831.JPG1 - Getting Warmed Up

The workshop starts with a quick, 20-slide high-level presentation.  First it reviews the nature of electricity, describes digital logic, and then moves on to deconstruct computers into its various hardware components and architecture.  Explaining these more detailed features to the uninitiated can be a real challenge.

Often, when it comes time to describing the inner functions of the computer, educators will use the brain and central nervous system as an analogy to compute systems, but is this the right approach when you’re talking to high school students?  

“It’s true that the computer is often anthropomorphized - and the human-computer analogy is very strong,” Jacob agrees, but “[...] While children understand the roles that the ‘brain’ and the ‘nervous system’ play in a human, the connections between these various body parts are somewhat complicated and can be hard to visualize. To really appreciate the way that they work together, one would need a basis in biology and physiology.”

His team opted to use a beautifully hand-rendered “Computer as a City” example.  It relates memory to storage facilities, external ports to shipping docks, and buses to... well, buses.  Admittedly, this sounds much easier to assimilate than the organic CNS example. So where did this come from?

Computer as a City color with labels.png
IMG_2484.JPG“I first came up with the idea when I heard data buses described as ‘information highways’, and thought it would be interesting to map the parts of the computer onto different urban features. Then our graphic designer Dana Smooke ran with it and turned it into both a teaching tool and a work of art. The finished product was even better than we had hoped - and the kids loved it!”

2 - It’s a Computer

The kids had an opportunity to check out, up close and personal, what goes into the workstations at their school and at home.  Able to touch things like the motherboard, RAM modules, SSDs and power supply, they got to assemble their own “city”.  “[...] the tactile act of holding the internal components in their hands helped make computers more tangible. ‘It’s a Processor’ turned a ‘black box’ into hardware that they recognize and appreciate.”  After all the demystification of computer hardware and architecture is the primary goal of the workshop.


IMG_2448.JPGIMG_2456.JPG

IMG_2437.JPGBut desktop computers weren’t the only things these kids got their hands on.  Gumstix partnered with ViS at Yale, and donated ‘Pepper DVI-D’ single-board computers (SBCs) for the students to investigate.  The Pepper DVI-D is a 10x7 cm SBC with Ethernet, HDMI, USB, audio and a bootable SD card slot -- everything a barebones system needs -- connected to an ARM Cortex-A9 SoC.  Each group was given a Pepper to connect, boot, and play with, adding to the haptics of the experience.  “ Working with the sleek and light-weight Pepper board took away the potentially intimidating scale of a massive HP-like motherboard.” With peripherals connected and SD card loaded, the students were able to observe a working Linux environment on a tiny, unobtrusive device.


IMG_5832.JPG
IMG_5830.JPG

3 - Grand Finale: Geppetto

GepAndGumLogo_NoD2O_Orange.png
IMG_2489.JPGGeppetto is a web application from Gumstix that allows users to build their own embedded computers from the ground up in minutes without using complex tools.  While this tool is ideal for small to medium size tech companies and startups looking for a fast path to market, its intuitive design proved helpful in driving home the day’s experiences.  “All of the students loved using Geppetto!” shared Marks, “I walked them through a brief tutorial on the projector screen and then they each had a chance to play around with it on their own. The kids were so drawn into Geppetto that we actually had to get more computers so that they could all explore the framework at once.”

IMG_2494.JPG“The most valuable feature of Geppetto [for the lesson] was definitely the “show-price” capability. The students got really into seeing who could design the cheapest motherboard that had specific components,” he shared, “The blueprint view also helped them as they attempted to fit as much as possible onto a board without having to extend it. [...] the students really loved the opportunity to design custom motherboards, moving beyond the limitations of pre-made hardware.”

The team wrapped up the session with Geppetto’s 3D preview, a feature that shows you a close approximation of your board’s appearance before you even order it.  It’s rendered in real time in your browser so you can rotate, zoom, and even export the model as an .STL file.  “Geppetto was the perfect finale to our event. Its 3D viewing capabilities allowed the kids to concretely identify the abstractions of Computer as a City with the physical components of the computer they had just constructed.”

Bringing It Home

When asked about how the whole session went, he told me about how the students felt about the experience:
FullSizeRender.jpg

“After the event, we asked the students to take a short survey about our interactive activities and demonstrations. Their responses were mostly positive, but some of the students suggested that we make the activities EVEN MORE hands-on. We definitely hope to do so in future iterations.

IMG_5840.JPG“‘It’s a Processor’ was a huge success in that it helped get kids interested in computer architecture. But there is still so much work to be done refining our curriculum and learning to express concepts as effectively as possible. This is absolutely an ongoing process. The next step is to bring this to a wider audience by working with both middle and high schools all over connecticut.”

“It brought me great joy to see how the team was able to use our Geppetto system in the curriculum to bring the students right into the process of device creation,” said Gordon Kruberg, M.D., C.E.O. of Gumstix, Inc.  “We at Gumstix are proud to support the It’s a Processor curriculum and look forward to seeing more smiling faces from student inventors as they begin to understand that they can control their own futures.”

For more information or the Ventures in Science curriculum contact Jacob Marks at jacob.marks@yale.edu

IMG_2470.JPGRelated Links:


Photos from the ‘It’s a Processor’ workshop provided by Jacob Marks and the Ventures in Science Student Society with written permission from participants.  

The ‘Computer As a City’ artwork contributed by Dana Smooke.

Keith Lee is the Gadget Guru at Gumstix.  He has a Master’s degree in Computer Engineering From the University of British  Columbia and enjoys making, tinkering with, and designing gadgets of all kinds whenever possible.
Twitter: @gstixguru




Friday, November 4, 2016

How I Got My Dragonboard 410C Airborne

I was recently a guest on 96Boards OpenHours to demonstrate how the Aerocore 2 for Dragonboard 410C can be used to quickly and easily build a working quadcopter.   I even powered it up and tested it out indoors live.

If you want to see what happened, check out the YouTube video. The test flight happens at around the 40-minute mark.


Drones are awesome and not that hard to set up.  You can follow along with me if you're building your own.  Once you've got your rig put together, then you can start adding software to the Dragonboard -- or Any 96Boards CE SBC -- to turn it into a self-piloting, obstacle-avoiding, object-following marvel of automation... or whatever it is you plan to do with it.

To find out more about the Aerocore 2 for Dragonboard 410C, you can read my previous post or watch this promo video

The Parts

 The first step in building your quadcopter is to make sure you have all of the hardware you'll need.  Here's what I had on-hand:



You know you work somewhere cool when you can assemble a drone from hardware lying around the office.

The Prep

To keep this post brief, I'm going to glaze over the following steps.  They're fairly straightforward and unrelated and ubiquitous in MAV deployment so there are plenty of instructions available on the web.


  1. Assemble your drone kit.
    • Do not attach the rotor blades yet. You really don’t want your drone unexpectedly taking flight in the middle of your office/house/garage.
  2. The 12V battery connector and regulator on the Aerocore can handle the main battery’s output but there is no built-in connector on the drone or the battery.  
  3. solder-highlight.png
    • You can solder some jumper wires onto one of the motor power terminals on the base plate of your drone (circled in green here)
  4. Make sure you’ve flashed your Dragonboard with Linux. Linaro’s Debian 16.09 was used for this demo.
  5. Build QGroundControl.
  6. On your dragonboard 410C install the necessary packages
    • $ sudo apt-get update && sudo apt-get install python-wxgtk3.0 python-pip python-numpy python-dev libxml2-dev libxslt-dev gstreamer1.0-tools
    • $ sudo pip install pymalink
    • $ sudo pip install mavproxy
  7. Bind your satelite DSM receiver with your radio

(UPDATE:  Since the original project was completed, something about the pymavlink pip package has changed and will no longer install dependencies correctly.  therefore, add python-lxml to your apt-get command before installing pymavlink and mavproxy)

Put It All Together

Now the fun stuff can begin!  It's time to get everything hooked up and ready to fly.

Step 1: Attach your boards

With this thing going up in the air, you won't want your hardware sliding around at all so it's good to put some thought into how your boards are mounted.  The chassis I'm using doesn't have what I'd call a universal mounting system, so I made my own.  The box for an Intel Edison turned out to be just the right size and very sturdy.  I've already been using one on the rover in my RTK project to house a Beaglebone Black.

Some zip ties, screws and risers quickly transformed the cardboard box into a mounting bracket for my Dragonboard.  A touch of shameless self-promotion and it's ready.

Board goes on brackets, Aerocore on board.  I used a bit of electrical tape to hold the receiver in place and was ready to wire it up.

Pro-Tip:

MAVs tend to have alarm buzzers, used to indicate low battery and signal loss.  This is very important when in flight, but when you're setting everything up it can be really annoying.  Thankfully, the buzzer on the Aerocore 2 has a bypass circuit. After soldering a 2-pin header on the underside of the Aerocore, directly underneath the buzzer, you can use a jumper to deactivate the alarm.  For obvious reasons, I don't recommend hard-wiring the alarm bypass.  The picture to the right should help you find the two vias to connect.


  Step 2: Connect Wiring

One benefit of using a box as a mounting bracket is that it has proved to be the ideal place to hide excess wiring.  I cut a small opening in the bottom of the box and fed all of my wires in and through.  I got my hands on a webcam and managed to squeeze its base and cable in there too.  I labeled the following image so you can see where the various connections are.

Not having previous experience with MAVs, I had no idea what order to hook the electronic speed control PWMs in.  It took me a while, but I figured it out.  I put together an infographic for the rest of the amateur MAVers so that you don't have to struggle like I did.

Step 3: Software

The final pre-flight step is to configure your software.  There are three steps:
  1. Flash PX4 firmware to the MCU
  2. Start data pipeline on the Dragonboard
  3. Calibrate on-board sensors

QGroundControl makes programming and configuring your drone a snap.  Open up the program and go to the setup tab (Selection_065.png).  Along the left-hand side will be a button labeled “Firmware”. When you click on this button and then connect the Areocore 2 MCU’s “stm console” via USB, QGC will guide you through the flash process.
microcontroller-console.png

The rest of the pre-flight work can be done over WiFi on the Dragonboard. Going wire-free will also make calibration a little easier.

Disconnect the USB cable from your Aerocore and connect the battery. Once the MCU and Dragonboard boot, SSH into the Dragonboard and enter the following command:

mavproxy.py --master=/dev/ttyMSM1 --baudrate 115200 --out xxx.xxx.xxx.xxx:14550 --aircraft MyCopter
Where xxx.xxx.xxx.xxx is the IP address of your PC.

Once the MAVlink command interface comes up on the Dragonboard, QGC should be able to connect to your drone. If it does not connect correctly, you may have to add a UDP connection to QGC’s settings.  The setup screen should look simmilar to the following screenshot:

drone_setup.png

If this is the first time your Aerocore has been configured, the cicles that appear green in this shot will be red and you will not be able to deploy your drone until they all appear green.

Configuring your drone and calibrating the sensors is very straightforward thanks to the self-explanatory interface in QGC.  Click on each item along the left-hand side in turn -- apart from “Firmware”, which you have already done -- and follow the on-screen instructions.  Once all the lights are green, you’re ready to fly.

The final, and completely optional steps are getting the camera feed from the Dragonboard to QGC, and attaching a Pre-GO GPS module.  

Adding a GPS module is very easy.  Once it’s connected, it will work right away.  Connect it to the 5-pin molex connector next to the DSM satellite receiver connector.  Power down your drone and plug the module in using the included cable, and it's ready.  I added mine last thing right before the live test flight and it worked with no set-up required.

The video streamer, like the MAVlink proxy, is a single command on the Dragonboard:


gst-launch-1.0 uvch264src initial-bitrate=1000000 average-bitrate=1000000 iframe-period=1000 \
   device=/dev/video0 name=src auto-start=true src.vidsrc ! video/x-h264,width=1920,height=1080, \
   framerate=24/1 ! h264parse ! rtph264pay ! udpsink host=xxx.xxx.xxx.xxx port=5600


With both the proxy and the video feed running on the Dragonboard, your flight screen will look something like this:

in-flight.png

If you have added a Pre-GO GPS module, your drone’s location will appear in the navigation map seen here in the inset. You can switch the primary view between the video stream and the navigation map by clicking on the inset in the bottom left-hand corner.

 

And There You Have It...

You now have yourself a working drone.