Experiments with the ESP8266

IMG_3363

I’ve been meaning to jump on the Internet of Things bandwagon, but I’ve just been a bit turned off by the price point. I built a simple temperature logger for my fermentation fridge using a Spark Core, but the experience was not that straightforward…or as straightforward as I wanted it to be for using in the classroom.

Then the ESP8266 came around, and then it got Arduino support and then I couldn’t keep away. I’ve been tinkering with the idea of creating a super easy to use Wifi connected device that would allow my students to more or less flip a switch and start collecting sensor data wirelessly. The lesson would result in creating active data visualizations, not the details of creating this wireless data streaming device. The ESP8266 looked like it could provide a cost effective solution to this little challenge.

So I snagged a few ESP8266s from eBay and got them out of the bag yesterday. I tried to use the little ‘carrier board’ that came in the $7 eBay kit, but couldn’t get code over. Tracing the board back, I found I wasn’t able to manipulate a few pins I’d need to ground for programming then disconnect…so I soldered up a pretty shoddy little protoboard and connected it to a breadboard. A big thanks to Alasdair Allan on the Make Magazine blog for an article that got me through building this board and programming the board.

I got the data pushing out to data.sparkfun.com easily enough using some example code by Liam Marshall on Hackaday.io. The code went over in no time, and connected directly to the network instantly. I was super surprised…I expected a bigger struggle. I actually has less trouble with the ESP8266 then the Spark Core. (Which I still have configured to pump data directly in to Google Sheets instead of a service like Phant.)

Now that the data is streaming, it is time to start creating the ease of use component…which is the hard part for sure. I’m going to aim to create a simple Python front end that will pipe the SSID and password into the code and reprogram the board. Alternatively, I might simple try to pump the data over serial into precompiled code to avoid running into programmer issues. Once I can get it to a ‘plug it in and tell it the SSID and password’ point, I’ll start thinking about where to collect the data. Likely I’ll set up a Phant.io install and collect the data that way.

Check out the data stream here.

See the code below.

3D Printing Rockets

Recently, I was given the chance to run a series of all day projects with some of my students. This gave us all day to focus on big projects, start to finish. Following the theme of ‘Aerial Explorations’, we took to the sky to explore flight.

Perhaps the most interesting project to come out of these experiments was the 3D printed model rockets. The idea was simple…print basic rockets that would accept a small model rocket engine, and see if they’d fly. I took inspiration from the ‘disposable rocket‘ by Thingiverse user kebes22. I was worried that this minimal two piece design was the consequence that the small engines couldn’t launch solid plastic rockets. Presumably the off the shelf rockets are made of thin cardboard for a reason…

Disposable Rocket by kebes22 on Thingiverse.

 

However, after some back-of-the-napkin calculations, I decided that the rockets would launch just fine. Likely the additional mass would act pretty significantly against the thrust, but we weren’t attempting to go into orbit, simply trying to take flight!

We turned to Tinkercad as our design tool of choice. This was mostly because my students had the greatest experience with it. If I were using this project to introduce students to 3D design and printing, I likely would have used 123D Design instead. 123D Design has features that make designing with specific dimensions much easier. And, the cylindrical model of a rocket lends this to a perfect example case for the revolve tool, that is often times a bit confusing to students new to CAD.

Designing in Tinkercad

We used 1/2A3-4T rocket engines from Estes (who has some great teacher resources), from Amazon in a bulk pack. Using the 13mm dimension for the diameter, we left a cavity in our design to accept the rocket engines. In Tinkercad, I instructed students to make a cylinder with the same dimensions of the engine, then had them define it as a hole and instructed them to make sure to place the component in the center of the rocket. Students also design ringlets for the launch pad guide rod to connect to. However, in the long term, adding the guide after the print would be easier. Perhaps as simple as a drinking straw, or even a stirring straw from the breakroom would work better.

The instructions were very limited, as I wanted to allow the students to be creative with this project. However, any level of aerodynamics, or rocketry lessons would be easy to attach. The lesson can even be expanded to attach to Kerbal Space Program and KerbalEdu for interactive video game based simulations. (I found the demo of Kerbal Space Program supplied plenty of content for our one day lesson.)

Finally, we printed the rockets on the Printrbot Simple Metal. The prints took no more then 30 mins each printing at 0.25mm layers at 65mm/sec speed. The prints weren’t beautiful at that speed and resolution, but they were functional!

All of our rockets ready to go!

The launches were all successful! They all took off to a height of around 100-150′ before returning to earth. For safety, I kept all students a good 50′ from the pad unless they were at the pad launching their rocket. I connected the leads to the engine, then gave the nod to the rocketeer, stood back and allowed them to launch. Launching at a sleight angle downwind ensured no rockets returned back onto anyone’s head.

Ready for take off…

 

We have take off!

 

 

 

 

 

Home brewing on the small scale

This year I’ve decided to dive head first into home brewing. To get back on the horse, I’ve built a new small scale 1 gallon all grain system. This has a ton of pros; its small enough for my tiny kitchen, it is quicker and cleaner, cheaper per batch and makes it easier to brew lots of batches. That being said, I’m still working out the system, but it is coming along pretty well.

3 Vessels

The system isn’t a brew in a bag setup, but sort of a miniature all grain set up. I built the mash tun out of a 2 gallon beverage cooler with a stainless mesh bottom made from a hose. Nothing crazy, but I haven’t had any stuck mashes, and I can hold temp pretty well (+/-2 degrees) during an hour mash (as long as I preheat the tun). I’ve got two 30 qt kettles, one liquor tank and one for the boil. I want to add valves to these kettles at some point in the future, but for the time being, this works perfectly. The mash comes out looking great, and hitting preboil volumes and gravity no problem thanks to Beer Smith.

1 gallon brew

The 3 vessels.

 

IMG_2450

The mini mash tun, fitted with a ball valve holding steady at 154F.

 

Recirculating Chiller

My sink is hopelessly small. I couldn’t fit a bucket, let alone a kettle. I decided to build a wort chiller nice and simple. Some 3/8″ copper hose very loosely wrapped and connected into a small Harbor Freight submersible pump. I load up a bucket with about 2 gallon of the coldest tap I can get, and I’m usually around 75F in 15 minutes. I’m really happy with how this came out, it was a fun little thing to build.

IMG_2471

The chiller set up, sitting in the boil and sanitizing.

 

 

1 Gallon Jug Fermenters

I’ve been fermenting each batch in 1 gallon jugs, and have had no issues getting into a strong ferment. Everything after that has been the struggle. At first, I built a little temp controlled water bath with an aquarium heater and left that to keep the temps around what I thought was 68F, but turns out was way too warm, more like 75. The first two batches came out wonderfully vegetal. The next two batches were pulled mid ferment from this hot bath, but I think the damage was done. Now, the temps are rising and it is easy to maintain 64F ambient in the house. I’m likely going to move into 2 gallon buckets shortly. I worry that the 1 gallon jugs don’t supply enough head room, both for krausen and for aeration. I’m still experimenting with the fermentation, but hopefully I’ll have that locked down soon.

IMG_2482

The product, just after pitching. Lots of cold break still settling.

Moving Forward

Getting this new system up and running has been a blast. I’m still getting the hang of it, but it has been easy and not heartbreaking to ruin a few batches as I figure out what the hell I am doing. I love the approach of brewing often, and brewing experimentally. I’ve been trying anything and everything, meticulously controlling variables, digesting as much reading material as possible and getting absorbed into the hobby like never before.

notebook

Keeping track of all the numbers.

 

new hops

Experimenting with these new southern hemisphere hops. The galaxy’s look and smell wonderful.

 

IMG_2479

Brew buddy Poppy, ensuring no squirrels mess with the brew day.

 

 

Getting artsy with gift giving & laser cutting.

Over the last few months, I’ve been making lots of gifts between birthdays and the holidays. For these gifts, I turned the the laser cutter to make some unique and goofy gifts.

Jewelry:

The jewelry I’ve made has become more an experiment in post processing then in design or fabrication. I’ve been using very basic shapes (mostly from the KG Flavor and Frames font series), or the traditional monogram style to create basic shapes in wood and acrylic. Then it was off to spray painting, washing, laquring, masking, etc. I’m still no where near finished with this. I’ve really enjoyed the experimental design with attention to detail nature of making jewelry.

Layering wood and acrylic.

Layering wood and acrylic.

Experiments with masking.

Experiments with masking. I liked the result of leaving clear acrylic masked to make ‘windows’.

Showcasing some of the finish products

Showcasing some of the finish products

Making Maps:

This project is certainly the most challenging I embarked on. I attempted to extract map data from OpenStreetMap to use as vector lines to create a thin street mesh that can be layered onto a contrasting based board. In the end, I feel defeated to the monster pile of vector data that my computer was not quiet able to handle. I simply raster engraved it. Hopefully I will lock this process down later and will have some details to share.

Detail of the engraving.

Detail of the engraving.

The mess of vector data

The mess of vector data

Laser engraving in action

Laser engraving in action

The engraved result on baltic birch.

The engraved result on baltic birch.

The final map framed and ready to be hung.

The final map framed and ready to be hung.


Medal Rack

My father spends more time running races then not, and he has amassed quite the collection of medals that ends up hanging off of post next to a vanity mirror in his bed room. Under the wise suggestion of my mother, I made him a rack for the medals to live on. The box is simple dovetail joint in 1/4″ red oak boards. 3 dowels are off set from one another on the top to create a cascade of medals on display. This project was a ton of fun, but I ended up completing it quite close to the buzzer and the rush left plenty to be desired. I would love to try to remake this again, but the joinery was so simple that I think I would use hand tools to do it in the future. (Feel free to download the Sketchup model. The joints are not designed with any kerf in mind, so it isn’t perfect.)

The model designed in Sketchup.

The model designed in Sketchup.

Red oak medal rack with laser cut dove tail joinery.

Red oak medal rack with laser cut dove tail joinery.

The completed rack, hung and displaying medals.

The completed rack, hung and displaying medals.

Various Boxes

I’ve learned recently that it is all about presentation. So I made some ornate little dove tail boxes on the laser cutter. These are generally generated with Makercase, and some edits are made to fit the various gifts. I’ve found these are no nearly as useful in the grand scheme of things. Some funk foam would go a long way to keep things from bouncing around in the box.

A mini pétanque set needed a better home then a tin tube. This box looks pretty, but the balls move a bit too much...not to mention the pea sized cochonnet.

A mini pétanque set needed a better home then a tin tube. This box looks pretty, but the balls move a bit too much…not to mention the pea sized cochonnet.

Jewelery box works great, but could use something to keep the piece in place.

Jewelery box works great, but could use something to keep the piece in place.

In Summary:

The laser cutter is such an amazing tool. With a bit of goofy design, and lots of experimentation, you can make some really inexpensive & unique gifts. I’d love to hear any feedback! I’ll be rolling out details on some of these projects in the future, so check back!

Intentionally Vague Projects (or, Leaving Room To Be Surprised)

Starting this school year with a new lab, in my first year at the helm, I’ve set off to make some easy projects for both my students and myself to get into the swing of things. Our first project this year was using the laser cutter to cut out wooden letters to create name plates. This is an easy to design, easy to cut project that is fairly quick (or so I thought).

IMG_0628

While I could have put together a shiny, lego-esque manual of how to design, how to cut and how to assemble their name plates, I opted to offer little more in the way of expectations other than make a nametag. (Other than it had to be designed in Tinkercad and submitted in .SVG format to be laser cut.)

IMG_0634

The cutting was a much slower process than I had anticipated. Spending 5-10 minutes with each girl introducing the software and getting the job running, and another 3-5 minutes waiting for the job to finish meant I could get 3-4 done in our 40 minute class time.  In the end, I took the time I was very graciously given to myself while the girls were out on class trips to fast track the remaining few.

IMG_0640

The assembly proved to be the most interesting process. The task was to mount the letters to the board. I had given them the example of the one I had made, and sure enough most girls opted to follow my (boring) straight arrangement. However, some girls decided to break the mold. Offsetting the letters, coating the entire surface in wood glue, intentionally gluing pieces in ways that made them look like they had fallen over, etc.

IMG_0635

My lack of clear instruction set has confused some of the students (as well as parents), but these name tags serve as a symbol of the girls’ personalities, and their mindset. They got to spend the first few weeks really ‘playing’ in the lab to make these nametags, and I’ve gotten to know the girls, and what they are all individually capable through the process.

IMG_0643

The atmosphere for play, experimentation and freedom to make has been established, and well before the scaffolds that will be forming around them as our projects become more technical.

IMG_0645

World Maker Faire 2014 Wrap-Up

I made a very last minute trip to World Maker Faire yesterday, and had an absolute blast. I had no obligations, not where to be and got to take lots of pictures and videos on my camera. I wanted to make a video of what I saw for my students, so I’ve come up with this goofy little video montage. Ignore the poor focusing and terrible audio. I’m still learning this whole camera deal out!

Reading Milliohm Resistances With The Arduino

I’ve recently been attempting to read milliohm resistance with the Arduino, and I’ve found out it isn’t terribly easy. The main cause is that the Atmega chips 10bit ADC doesn’t provide the resolution needed. As a result, I’ve been hunting for a different method, and I have come up with what I think is the best solution.

Using four-terminal sensing, or kelvin resistance measurements, we will use a constant current supply and some Ohm’s Law-Fu to read a voltage that is proportional to the resistance.

Lets start with some theory, and Ohm’s Law. First off, we are going to be looking for resistance, so lets put Ohm’s Law in terms or resistance:

r= \frac{v}{i}

Now we know that we need voltage and current to determine the resistance. So, we’ll need to build a current supply, with a constant output. For example, if we generate a constant 1 amp current, than we will have a handy relationship:

r= \frac{v}{1} = v

Given a 1 amp source, we are given that resistance is 1:1 proportional to the voltage.

Lets take a look at a circuit.

317ConstantCurrentSupply

This circuit is our constant current supply. Using the LM-317, and a resistor between the adjust pin, and the voltage out pin, we create a basic constant current supply. Using a 120 ohm resistor, we will be generating a 1amp current. However, when we use Arduino, we have the power to do some calculations, we we are going to scale the current down by a factor of 10, and replace the 120 ohm resistor with 12 ohm resistor, resulting in a current of 100mA, or 0.1amps.

With our constant current supply, the next step is to measure the voltage across the resistor we want to measure.

ConstantCurrentArduino

 

Now we have our constant current supply powered by the Arduino, supplying 100mA across our resistor. We are going to run from the resistor, to the A0 pin on the Arduino, and the other side to ground. Any low ohm resistor can be put in place of the 12ohm resistor, just keep in mind that you’ll have the read the resulting current with a multimeter, than enter that value into the code. In my example, I built with a 10ohm resistor, that resulted in ~125mA, so my code uses 0.125 as my current.

Lets go ahead and throw some code onto the Arduino, and try to read the voltage, do some math to generate the resistance, and read it out!

const float currentSupply = 0.125; // The current generated by the LM317 and 10ohm Resistor
const float referenceVolts = 5;        // the default reference on a 5-volt board
const float resistorFactor = 1023; //Full scale this time.
const int resistancePin = 0;         //Resistor / output from 317 circuit connected to analog pin 0
void setup()
{
Serial.begin(9600);
}

void loop()
{
int val = analogRead(resistancePin); // read the value from the sensor
float volts = (val / resistorFactor) * referenceVolts ; // calculate the voltage
float resistance = volts / currentSupply; //Use voltage to calculate the resistance
Serial.println(resistance);
}

Now that we’ve got some code, lets test it out. I tested this with a few low resistance coils and inductors, each reading within a few hundreths of my multimeter measurement. I’d consider this a success!

Balloon Zipline: Speed Measurements Using Video Analysis

2013-07-09 12.54.09

Last week, my students and myself built a balloon zipline. This turned out to be an awesome project that the kids had a blast with. However, being committing to tricking kids into doing math and science, I challenged the kids to measure the speed. Coaching them along, we were able to come up with some reasonable numbers in a few different ways.

Because we had such a good time with the project, I wanted to share the detailed breakdown of what we did and how we did it.

Building the Zipline:

2013-07-09 12.56.28

The line, strung across the room.

The concept is simple; string up a tensioned line, add a drinking straw as the carriage, and tape a balloon to it as the motor to propel it forward! For our build, I first attempted to use a super light cotton sewing thread. The string was too weak and flexiable and wouldn’t handle the motion.

I found a solution in using a length of some 22 gauge solid wire. Granted, most people don’t have a spare 30′ length to span a room, but any non-elastic cord should work perfectly. The trick is to keep it under as much tension as possible. The less wiggle room the zipline has, the faster we will travel!

Calculating Speed:

To calculate speed, we measured the time it took to pass a certain amount of the conveniently sized 1′ square tiles.

speed(ft/second)=\frac{distance(feet)}{time(seconds)}

From there, we determined the conversion formula to find miles per hour using dimensional analysis.

\frac{Ft}{Sec}=(\frac{1mi}{5208ft})*(\frac{60sec}{1min})*(\frac{60min}{1hr})=\frac{miles}{hour}

We used two different methods to measure the speed; by manually using stopwatches, and the more fancy ‘video analysis’ version.

Manual Measurements:

Using a team of three, one to release the balloon, one to start the timer and one to stop the timer, we measured the time between 10 of the 1′ tiles. Taking a couple of trials to get an average, the more the merrier!

Trial 1 1.25
Trial 2 1.26
Trial 3 1.72
Trial 4 1.33
Trial 5 2.07
Average 1.526
Ft/second 6.55307994757536
  4.46800905516502

These are our results, popped into a spreadsheet to make things quick and easy.

 Video Analysis

If you have ever watched Mythbusters, you will have seen slow motion footage of some projectile or object (usually Buster) moving past a black and white striped background. They don’t often go into detail about this, but the idea is that looking at the footage and using the striped background as reference, they can determine things like speed and acceleration.

And that is exactly what we did. Taking advantage of the convenient 1′ tiled floor, we laid down two makers, the start and end point. Then, using my standard issue cellphone, we recorded video of the balloon shooting past. Setting the camera phone to shoot at the highest frames per second, we were able to look frame by frame and find the time the balloon past the first marker, and past the second marker.

Start Time 27.027
End time 27.227
Time Difference 0.199999999999999
Ft/second 15.0000000000001
MPH 10.2272727272728

Conclusions

I was really happy with how this little project turned out. Everyone had a blast, and everyone was able to tricked into doing some math over their summer break. I was able to have 6-10 year old kids pay attention as I scribbled formulas on the whiteboard and begin to understand our measurement process. What more could you ask for?

In the future, if I were to run this lesson again, I would love to use a high frame rate camera, and higher resolution backdrop. With this, we could measure the acceleration (or deceleration) as well as the speed, even chart the data in position versus time. Then derive the velocity versus time charts and acceleration versus time.

Adding in a third method would be a great idea too, using a microcontroller with trip sensors to accurately measure time and eliminate that pesky human error. With three total measurement methods, having the students thing about the best methods and using them to think of how we can measure other everyday features in the most effective way.

There is plenty of fun ways to mix up this project, by using different balloons, regulating the inflation of the balloons, building an accurate release method, etc, we can develop more accurate results and start eating away at variables. A process that all students should become familiar with.

So get out there and start launching some balloons!

Scratch Day 2013

 ad_blueprint_logo

 I’ve had plenty of students in the past who ask me where they can go to learn about programming. With movements like Code.org, kids are starting to get excited about programming. However, programming is not a subject that many teachers have seen. Students are turning to learning on their own, exactly as I did myself when I was younger. Learning things on your own from books, web resources, videos and the like certainly have their merit, but programming isn’t something that is easily approached by elementary school students, even with that wealth of resources being available. Command lines, IDEs, compilers, C++, Java, functions, prototypes, Python, interpreters, PHP, HTML, Perl…there are enough terms to make any adults head spin.

That is where Scratch comes in. Scratch was developed by The Life Long Kindergarten group at MIT’s Media Lab, for the intention of creating somewhere to learn programming concepts simply and easily. They’ve succeeded in this objective, to a fantastic extent. Through a simple drag-and-drop interface, the complications of typing hundreds of likes of ‘code’ in jumbled strict syntax are removed. The result is that students can dive to the root of programming concepts, concepts that 8 year old children can understand, given the technicalities are no longer part of the equation.

What makes Scratch even greater, is their efforts to build a community of students on their website. Here, students are sharing their projects, be it a game, an animated video, or a lessons on Scratch itself. This community organically spawned students teaching one another, sharing ideas and publishing tutorials and guides. To go even further, students began to build ‘companies’, creating a team comprised of skilled programmers, artist and animators, working to create large complex projects. This is the sort of community that has been formed by students, for the students, in an organic fashion that can never be intentionally created.

This community, and the development team at Scratch, schedule an annual ‘Scratch Day’, where local Scratch users and educators come together to teach workshops and celebrate all that is Scratch.

This year, along side of my fellow Free Library Maker Corp’s instructors, we ran one of the workshops for the Philadelphia area Scratch Day, hosted by University of Pennsylvania’s Graduate School of Education.  Inspired by the Library of course, our workshop centered around Storytelling in Scratch.

IMG_20130518_141249

Scratch poses the ability to teach through a grand lecture, describing the blocks and their uses, and creating demo projects over a projector…however that is not the way it was made to be learned. As such, our workshop consisted of little to no structure; introduce and demo a couple of example projects that we had made, and let them take these samples and build from there.  

The informal ‘workshop’ style of Scratch Day played out perfectly to this particular ‘zero-structure’ layout. Within minutes, we had everyone in the room rattling away as we made ourselves available to help understand how to use a particular block, or pose challenges to the students who seemed to be running a head. That is all that it took to have a well oiled classroom of students rattling away on projects for the 90 minute sessions.

The results speak for themselves! And with the power of Scratch, I have embedded them here! Taking that power even further, feel free to click a project to visit a project on the Scratch site, and open up the code blocks that power them!

The music in this one really puts it above and beyond!

This project highlights what makes Scratch public sharing ability so awesome. When I last saw this project on Saturday, it looks a great deal different. Now I can see what my students has been up to, the progress he has made and even leave a comment with a few more challenges!

I had a blast with Scratch Day this year, and hope I can be around to help in the coming years. Programming is a subject that is sure to seep into the curriculum of public education in the future years, and Scratch will be one of the tools that will make it possible. Educators take note, Scratch is the ultimate tool to bring programming lessons into your classrooms, be it in telling stories, or teaching mathematics!