2018-05-01T19:35:29-04:00https://www.jeremymorgan.com/Octopress2016-07-31T00:58:00-04:00https://www.jeremymorgan.com/tutorials/raspberry-pi/does-dry-ice-really-cool-five-times-better-than-regular-iceI saw an advertisement for dry ice claiming it cools 5 times better than wet ice. Out of curiosity I had to know if this were true, or at the very least see how much better dry ice performs. I thought I'd gather up a Raspberry Pi and some sensors and find out, using some techniques from my Hands on Internet of Things course released recently.

I'm sharing what I found here and showing how you can replicate the experiment.

What Does 5 Times the Cooling Power Mean?

This is the first thing I wondered. Does it keep it 5 times colder? Does it keep it cool 5 times longer? The claim is still a bit unclear, but based on my results it appears it keeps it close to 5 times colder, for about the same amount of time.

What I did was take a couple coolers, filled one with Dry Ice and one with wet ice, sealed them up and measured them for a few days.

I did a minute by minute sampling, and perhaps unsurprisingly the first minute was the coldest. at that point:

Our dry ice was at -111.775 degrees Fahrenheit, and the wet ice was at 26.2634. This is closer to around 4 times colder. But does it keep it cold longer? Not really. Actually if you look at the drop off wet ice actually kept it colder than the room temperature for a while longer, but the difference is small:

This was over the course of a few days, and as you can see they converge toward the end but the wet ice still keeps cool a bit longer. I'm assuming this is because the dry ice disappears. Here are some basic conclusions I derive from this data:

Dry Ice Keeps Items Significantly Colder For a couple days, the temperature was around 4 times colder in the Dry Ice cooler.

Dry Ice Has a Pretty Significant Drop Off. From -80 to 0 degrees in about 8 hours. Wet ice only got 1.5 degrees warmer in this same amount of time.

Both Methods Cool for Roughly the Same Amount of Time - I expected the wet ice to stay cool for hours, not days. Although it is much warmer by comparison it lasted just as long.

Dry Ice Is Probably Overkill - Most of the things people put in a cooler dont need to be -90 degrees. Soda, beer or sandwiches are probably just fine at 32 degrees.

When I started this project I assumed that dry ice would be much colder, for much longer. I can't draw a ton of conclusions from this experiment just yet. I'm definitely going to run a few more just like it.

I measured the air temperature as well, but since one of the sensors was faulty the data is bad.

If you want access to the data here is the dataset. I'll surely do more with it in the future. Now, here are the details for how I set it up.

This next part is tricky. I plugged in each sensor individually to get the serial number of each. Now, we must match the serial number with the position of the sensor.

For this experiment I attach one sensor to the lid (top) and one to the bottom of the container. This way the top one will measure the air temperature and the other will be submerged in water for the wet ice, and covered with dry ice. This is just my initial thoughts on this experiment, feel free to try some other configurations. Here's how we gather the readings:

get averages

So basically we arrange the serials in a string array and address them. The read_temp function takes in this argument and then passes it to read_temp_raw which then extracts the information from the sensor and sends it back to read_temp which parses the information and sends back a number.

I added an average to the mix, which as you can see is just an average between the top and bottom sensor. I don't know if it will provide value or not, but decided to throw it in.

Summary

So I was curious about this claim and decided to tackle it. I didn't learn much from this, other than the fact that wet ice in a sealed cooler lasts longer than I would have thought. There were a lot of variables here outside my control, but I think it's a fun project and I will build on it some more. I hope one of you decides to take this on and improve on it. If so please share it with me!

Important Links:

Here are some links relevant to this project, without these folks this wouldn't have been possible (or at least this easy!)

And as I plugged several times in this article I created a course teaching you how to do experiments like this with a Raspberry Pi and you can get 50% off by using this link.

]]>2016-06-01T21:07:00-04:00https://www.jeremymorgan.com/tutorials/raspberry-pi/hands-on-internet-of-things-with-the-raspberry-piGreat news! I finally got my IoT course done! It took a long time to develop, and a lot of learning but totally worth it. This is not really a post advertising it but just a quick talk about the process.

Hands on Internet of Things

In this course, I cover the basics, such as how to connect to the Pi, blink an LED, etc. Then we get into reading sensors and gathering the data. Then we walk through ways to send it to endpoints on the internet. Finally we create our OWN endpoint and start sending data there. Finally we build a dashboard for our data. Sound fun? Sign up!!

What I learned here

I learned a few things over the months. I started out not knowing much about video or sound editing. I also knew next to nothing about course design. I'm not an expert at any of those things now but I have learned a lot. Some key points I learned:

Course design is hard.

Video editing is hard.

Audio editing is hard.

Every sound within 10 miles comes in very loudly on your microphone.

So I set off with my Yeti Blue microphone, and purchased some software to help out:

Camtasia for Mac

Camtasia for PC

Reaper Audio

ACON Audio plugins

I read through countless tutorials and and watched videos to learn as much as I could. Then I started to record random stuff and chop it up, clean it etc. Lots of trial by fire, and my early work was terrible.

Sound: My Biggest Obstacle

One thing I learned quickly: The world is loud. The Yeti Blue microphone is AMAZING and the sound quality is great. Unfortunately it picks up sounds everwhere. I had many fruitless hours recording and re-recording when a dog barked, or someone drove one of those obnoxious import cars by my house. Also nobody could be home, you can hear everything. Rather than try to silence the world I decided to improviss

First I took a box and stuffed it with insulation like so:

This cut down noise considerably. It also gave a much clearer, deeper sound that's difficult to explain. If it looks stupid but it works, it isn't stupid.

I still had way too much neighborhood noise, so my final recording area looked like this:

Yup, that's a supply closet! I managed to remove the echo and background noise from here fairly well.

This was my biggest obstacle by far and I worked through it.

Why do I find this fun?

So I spent hours writing out scripts, recording and re-recording. I set up goofy stages and filmed things with my webcam. It was a ton of work. But it was.... fun.

Teaching people is a huge passion of mine, and I love doing these courses. I am bitten by the bug and this will be the first of many courses from me. Got a few laid out in the queue for this year.

During the process of building this I auditioned for Pluralsight and got signed (yes!), so I'm now working on a course for them. Pluralsight has some exacting standards as well as branding and other style preferences so it's a bit more work. On the flipside of that they have people with tons of knowledge helping you out and cheering you on. It's pushing me to be a better instructor fast and I love it! But that's for another article.

Do you want to do this?

If you are itching to become an instructor, contact me. I have learned a TON over the last few months, and will gladly share. I'm going to do a series of articles soon detailing how to get started and tricks I've learned. Stay tuned or sign up for my newsletter.

Today I'm going to show you how to install a wireless networking card on your Raspberry Pi. I'm using the ultra cheap Ralink wireless card, but the instructions are similar for any Wireless Device.

Update Your System

For this tutorial I'm using Raspian. This is a great beginner OS for the Pi and quite easy to use.

You'll want to make sure you're at least wired in so you can do an update:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove

Get Started

We're going to do this from SSH, though it's easier to do from the desktop. But you got a Raspberry Pi to learn didn't you? Many people use their pi strictly over SSH and don't run a desktop at all. I have decided to include those kinds of instructions rather than do it the graphical way.

1. Plug in your USB device and find it

Once plugged in, again we'll look at our USB devices:

lsusb

It looks like in my case it's installed, so now we'll make a copy of the WPA supplicant file:

Start up Your Adapter

Now we need to stop the wlan service:

sudo wpa_action wlan0 stop

Then bring it back up:

sudo ifup wlan0

Test Connectivity

sudo wpa_cli status

You should see something like this:

If not, double check your network SSID and Password, that's the most common problem. You may have a card that isn't supported by the Raspberry Pi, if not get a new one! They're super cheap and well worth it.

(Optional) - If You End up Needing a Driver

Sometimes there are issues that prevent you from loading the drivers for your card. Much of the firmware comes with raspian, but if not you'll have to find the drivers for it. You'll need a Windows machine to get the drivers you'll need (at least for Ralink).

Insert the device and run the driver disk provided. Then after successfully installing it, open up your control panel, and select the properties of the device:

Click on "driver details"

This will show you the location of the driver files to copy off the machine, you can put them on a USB stick and put them on your Pi from there.

Get The Drivers off the USB Stick The Hard Way

I put the driver files on a USB stick. Getting them from the desktop is really easy, but what if you only have SSH access? Don't fret. With Raspian it should automount just fine, you only need to find it.

Run the following command to list your USB devices:

lsusb

Now, you want to see all the disks that are attached to your system:

sudo fdisk -l

As you can see in my case, my USB stick is mounted at /dev/sda1 so the device is connected to my pi. But where is it?

mount

There it is! Under /media/MYLINUXLIVE but that probably won't be your folder, it will show the drive label you gave it when you formatted it. (I happen to use and love the LinuxLive program whenever I can).

Now I can just look for the drivers on the disk and copy them to a folder in my home directory:

cd ~
mkdir usbdriver
cp -r /media/MYLINUXLIVE/driver/* usbdriver/

Now the files are copied, safely unmount the drive:

sudo udisks --unmount /dev/sda1
sudo udisks --detach /dev/sda

Now you'll have the drivers you need, but keep in mind the device may not be supported at all.

Conclusion

I hope this has helped to show you how to install a wireless USB card on the Raspberry Pi. Raspian has a lot of firmware already built in and a lot of USB Wifi adapters are supported right out of the box. Wpa_supplicant makes things really easy. I decided to show how to do it from the prompt for those who want to learn more about the prompt, or install from SSH.

The Raspberry Pi is all about learning so I encourage you to experiment with this stuff as much as possible. The worst that will happen is you'll need to reinstall the OS. Remember, you're learning Linux at the same time which opens a lot of doors for your projects. Enjoy!

My New Course: Hands on Internet of Things with the Raspberry Pi

I have just released my new course titled "Hands on Internet of Things" which is intended to be a course for people who want to get started with IoT. I'll take you through blinking lights and reading sensors to creating YOUR own IoT endpoint and dashboard. I'm offering this special coupon for readers of my site: get %50 off this course here. Thanks for being a reader!

I recently purchased the 7" touch screen for the Raspberry Pi and thought I'd put something together to show how it's set up and share my thoughts on it so far. This has been a really popular item and I had to check it out.

The Kit

The Raspberry Pi 7" Touchscreen kit came from Newark element14 , and it's boxed with everything you need (except of course a Raspberry Pi). It comes with an interface boards and everything to mount a pi to the back of it, which can be pretty nice.

Tip:Leave the plastic coating on the touchscreen while assembling it so you don't damage anything.

Video Interface Cables

These are delicate pieces so you should be careful hooking these up.

These connections work by sliding out the black piece, then pushing the ribbon inside and pushing the black piece back in. Start by applying pressure in the middle of the black piece first, and if you encounter resistance, try resetting the ribbon in it. Don't try to ram it in, if it breaks it won't work at all.

Set this large connection first then turn the board over to insert the smaller one and connect it in the same fashion.

Now that it's turned over it's ready to mount using the supplied standoff screws:

Connecting to the Pi

Now is a good time to hook up the RPI-Display ribbon:

And hook up the GPIO as follows:

Red to 5v

Green to SDA

Yellow to SDL

Black to Ground

Now mount the Raspberry Pi to the standoffs. Plug in the RPI-Display cable:

And wire the GPIO as follows:

Red to 5v (Pin 2)

Green to GPIO2 SDA (Pin 3)

Yellow to GPIO3 SCL (Pin 5)

Black to Ground (Pin 6)

Power up and Install Software

Now you can power up the screen. If you have a good power supply, you can just put the power into the outlet on the display board and it will power both the Pi and the screen. Alternatively you can power both independently if needed.

You will need to install some software to get it running:

sudo apt-get update
sudo apt-get upgrade

To install the virtual keyboard:

sudo apt-get install matchbox-keyboard

You're ready to go!

My Thoughts

Honestly I was a bit skeptical when ordering this thing. I was wondering how good the quality would be at $60. I was pleasantly surprised right away. Here are some of the features I noticed:

Sturdy and Strong - Just feeling it in your hands tells you the kind of quality it has. Does not feel like a cheap or flimsy screen. You can actually use this for stuff.

Picture Quality is amazing - The colors and clarity of this screen are great. It looks like a high quality tablet.

Responsive Touch - It has ten finger touch though I never pushed that limit, it's definitely responsive and works great popping through windows. It's also great for drawing things. It's very reactive and great.

Overall I was very pleased with it, and I think it's well worth the money. I plan on getting a few and doing some cool projects with it. Overall I would recommend getting one. You can get this touchscreen for $60 here.

Why not just get a tablet?

This was the question posed to me on Twitter and I've seen the comment elsewhere. And realistically this screen + a Raspberry Pi, Power Supply and Wifi Dongle and you're looking at over $100. And the profile isn't very thin plus you'd need an additional case to make it truly like a tablet. Considering you can pick up a cheap Android tablet for under $100, this doesn't seem like the greatest replacement for a tablet.

I think the overall purpose of this goes beyond a tablet though. For one Raspian is far more powerful and advanced than Android, and arguably more hackable. I would see this as being great for:

Kiosks - Under $100 is a steal for POS interfaces and customer info Kiosks of all types.

In Dash Car Computer - You could control a sound system with your Pi, do GPS, engine monitoring etc.

The possibilities are endless here. I don't think folks buying this will be looking for a tablet, the projects will likely be more complex than that. If you make a cool project shoot me an email or let me know in the comments!

My New Course: Hands on Internet of Things with the Raspberry Pi

I have just released my new course titled "Hands on Internet of Things" which is intended to be a course for people who want to get started with IoT. I'll take you through blinking lights and reading sensors to creating YOUR own IoT endpoint and dashboard. I'm offering this special coupon for readers of my site: get %50 off this course here. Thanks for being a reader!

Today I'm going to show you how to make sort of a mini weather station with a Raspberry Pi. This is an ongoing project of mine that I've been tinkering with so I'll share my learnings with you. It started with a project I wrote about last month, and is an improvement on it.

A core part of the "Internet of Things" movement is the idea of devices that gather data and send it to the Internet. That data is then acted on or observed for later. It's a simple concept and has been going on for a while but lately it's been getting cheaper and easier to do. This project is a great example of that.

While this seems like a long tutorial, it only takes about 30 minutes to complete. Let's get started.

None of this stuff would be anywhere near as easy if it weren't for companies like Adafruit. I recommend getting your sensors from them to support their innovation in this space. Newark is one of the original distributors of the Raspberry Pi, they are fast and very reputable.

Wiring

The wiring for this project is shown below:

While this may look confusing at first, it's a pretty standard setup for each sensor. Here's some additional information on how to wire up each one if the diagram isn't helpful.

Make sure and change the settings in home.services.js to reflect your website:

I'll be making some changes to it soon, but for now it's a cool little visualization for your setup.

Summary

Well I hope you made it through all the way to the end and got this set up. Gathering data is one of the cool parts of IoT, but what are you going to do with it? The possibilities are endless. You could put this in your house to make thermostat adjustments, or put it in a storage area to make sure something valuable is safe. I hope this project inspires you to build more stuff.

Stay updated on this project:

My New Course: Hands on Internet of Things with the Raspberry Pi

I have just released my new course titled "Hands on Internet of Things" which is intended to be a course for people who want to get started with IoT. I'll take you through blinking lights and reading sensors to creating YOUR own IoT endpoint and dashboard. I'm offering this special coupon for readers of my site: get %50 off this course here. Thanks for being a reader!