Wednesday, June 18, 2014

House App Competition and Vectorization!

House App Competition and Vectorization!

House App Competition

Results are in: PiPlotter has won the Congressional STEM Challenge within California's 7th District! It's been an awesome experience working with the app, image manipulation, and video presentations. While this is only the first year of the challenge, I hope many more students will get to experience the competition and app building process.

Vectorization

As you may be able to tell from the pictures that PiPlotter currently outputs, it is still thinking in terms of a raster. The image input finds the edges and traces a path where the pen should go, but that path is stored as lines from pixel to pixel, creating a jagged line effect.

The solution? Take these paths and turn them into lines/curves flowing through them. While I don't have any build for this ready at the moment, I have some rough ideas on how to implement this.
 - Here is a concept for the algorithm / process I will need to make for the pixel interpretation
 - Here is a great documentation of Potrace's bezier calculations that I will likely use as inspiration.

Wednesday, May 7, 2014

May 7: Version 2.0 and Competitions!

It sure has been a while Matt, what have you been up to?

In the past month, I have accomplished:
  • Servo lifts pen off paper
  • Raspberry Pi accepts connections and DrawData over local network
  • A completely fresh Android App allows for pictures to be transformed into line drawings and vector data

 On April 11th, I took part in my high school's Engineering Challenge. It was a fun experience having my project judged along with around 100 other awesome teams and projects.

The PiPlotter received an amazing 173.75 / 175 and won first place in the overall competition. After the Engineering Challenge, I kept making forward progress with my code and finished another complete "final build" yesterday. Today I entered my finished product into the House Student App Competition.




Sunday, April 13, 2014

April 13: 1st Working Build and Presentation

My pen plotter has been fully built! There are still lots of improvements to be made, but this is just the first build. My presentation was Friday, and many people were impressed by the creativity and hard work.

Saturday, March 22, 2014

Mar 22: Source Code on GitHub

Source Code Posted on GitHub

I've been focusing mostly on the software aspect of the project for the past few weeks. If you wish to read up on my source code, it will be periodically posted on my GitHub page (https://github.com/MatthewMerrill/).

Sunday, March 16, 2014

Mar 16: Wheels finished!

Well... okay halfway finished - Hobbytown only had 1 of the 2 bolt+locking gear pieces I needed, and the other location only had a longer version. Another will ship in Tuesday, but this wheel is ready to go!

Saturday, February 22, 2014

Feb 22: Basic Rundown Video Uploaded!

Basic Rundown Video:

Here is a video explaining the basics of the physical aspect of the project. In this video, I...
  • Disprove the Wadsworth Constant
  • Explain the easel rig and how the components will be placed.
  • Show off the stepper motors doing their thing
  • Announce the arrival of those amazing sugary chocolate egg things

 Motor Component Explanations:

Thursday, February 13, 2014

Feb 13: Parts Arrived and Bézier Curve Rendered!

Electronic Parts:

The parts came in the mail Monday! Was very excited to test out the raspberry pi and got a "Hello World!" working in no time! No problems with the parts so far, everything has been looking up. I'll try to edit and post the unboxing / basic project explanation video sometime over the weekend.


Bézier Curve:

For the past couple days, I've been pondering how to tackle the problem of "tracing" a Bézier curve. After a few minutes on wikipedia, I realized that Béziers are a lot more straightforward than I had originally thought!

 The basics of a Bézier is to draw lines between the ends and the controls, then find a point at percentage "t" out. From these points you draw a line and continue out, etc. and repeat the process until you are left with one final point, which represents the position on the Bézier "t" percent of the way to the other end...

Wikipedia's "Constructing Bézier curves" has some great examples of how exactly this is done. The one that inspired me the most is this one.

After a couple of minutes and well under 50 lines of programming I cranked out the render seen above.

Thursday, February 6, 2014

Feb 6: Ordered Parts!

Just ordered the electronic parts for the project!

Here is a list of all the parts I think I will be using:
  • Electronics:
    • Raspberry Pi Model B
      • 16GB SD card
      • Wall/USB 5V 1A transformer
      • USB/Micro-USB cable
    • 2 Stepper Motors
      • 2 Motor drivers (mine came with the steppers)
    • Servo Motor
    • Breadboard
      • 6V 2A battery case for motor power supply
      • M/M and M/F jumper wires
  • Other Materials
    • Easel
    • Notepad 
    • Pen
    • Pen holding/lifting rig (still in design process; this may be the last part I assemble)
My parts arrive sometime next week; I'll post an unboxing video when all of them arrive!

Saturday, February 1, 2014

Feb 1: The Idea

Hello! This is where I will post info and pictures of my Pen Plotter building experience.

My concept is based a lot off Ytai's IOIO pen plotter (See Right For Video), but will use a Raspberry Pi Model B instead of the IOIO board. This was a tough decision to make, but I decided in the end that using the Raspberry Pi would provide more support resources for programming, had a wider selection of libraries for the GPIO, and seemed easier to learn and set up.

My design consists of a smaller easel and notepad, but follows the same "V Plotter" setup. My plan is to have an Android tablet send an SVG to the Raspberry Pi via some intricate wifi broadcasting and LAN network programming. The Pi will then trace the file by telling the Stepper motors how to change the string length and the servo motor when to lift the pen off the paper (this is your real-world application for hanging-weight problems ;)).
An example of an Scalable Vector Graphic. An SVG uses path information to tell the renderer where to draw lines and fill in shapes instead of using the pixel by pixel data structure used by most other image file types. This allows an SVG to be drawn and scaled to any size without loss in quality. Open this file in a new tab, and zoom in and out to see how image quality is never lost.