2016-09-30

After five years of decent service and running 24/7, Wind, my media playing machine started having hardware failure issues as well as lingering problems decoding large video files. For a few years now, I had been hoping to find a SBC that would be able to handle my video decoding needs, as well as be able to fit inside of a phone body.

Say "hello" to Redbar. Unfortunately, I still have issued with decoding video. Hopefully a switch from Debian to Arch will resolve some of my issues.

The Build

Redbar utilizes a MinnowBoard Turbot with a USB soundcard and a USB wireless network adapter. When the build took place, photos were taken with my mobile phone which I upgraded to cyanogenmod without backing up my pictures. [hella sad face]

Oh well, here are some pictures of the machine.

Redbar

This is actually the finished product. The phone is a Kellogg Redbar that I gutted.

Storage

Mounted in the body of the phone is a 2 TB SATA hard-drive. Power for the drive is pulled from the 5V pin on the SBC.

SBC

Mounted to the base of the phone is the Turbot. The OS (currently Debian Jessie) is running from the MicroSD card.

Power

A small button was attached to the bottom of the phone so that the device can be turned on and off.

Because the OS is running from a SD card, I should really find a way to run 'sync' before the 'shutdown' command powers off the SBC.

Final Location

Boring.... The phone, the TV, and there is a stereo amp in there as well.

Anywho, I'm not too happy with the way the device has been decoding TED Talk videos, and I'm experimenting with making a SD card image of Arch Linux so that I can take advantage of more recent software for my media player.

Also, I'm going to complain about the absurd difficulty that I am having with attempting to downmix all audio to 2 channel stereo. Sheesh, what a pain.

Now quit reading, and go replace a computer with a slightly less problematic computer.

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
8 minus 5
Answer:
required
2016-09-03

A few days ago, the urge to create an internetted thingy was upon me. Recently, I had been reading documentation regarding machine to machine communication using MQTT as well as BLE, and then I took a quick look at my tinker pile. The amount of neat things that I purchased for use in a project was far too high.... and then it hit me: LESS HOARDING, MORE MAKING!

What I was craving to make, was a network accessible pixel LED, inside an orb light fixture, that could be controlled using MQTT.

For this build, I used:

  • an orb light fixture from the ReStore
  • an Unwired One single board computer running OpenWRT
  • a single ws2801 pixel LED that was left over from the Glimmer build.

The Build

The Fixture

The orb light fixture appears to be a run of the mill wall or ceiling CFL fixture. If I remember correctly, the orb cost around $5. The cost of computer cases these days is getting out of hand. :)

Take it Apart!

For some reason, the fixture manufacturer decided to put a bunch of unnecessary crap in my new computer case. Fortunately, it only took a few minutes to get the orb in a usable state.

Test the Circuit

ws2801 pixel LEDs are controlled using SPI. On the Unwired One device, there are no GPIO pins that are dedicated to SPI. Instead, the SPI bus is created by loading a kernel module with arguments to determine which GPIO pins will be used for SPI.

Solder Leads to the LED

Once the circuit was working, leads were soldered to the LED so that it could be connected directly to the GPIO headers.

After the soldering was complete, the leads were wrapped in electrical tape.

Make a Notch for the Power Cable

Since the orb is intended to rest on a table, it was necessary to make a notch in the base for the power cord to fit through. Thus ensuring that the orb will be flush on a flat surface. After a bunch of waffling around trying to find my files and metal snips, a grab and twist with some needle nosed pliers did the trick.

Put it Together

After more waffling while trying to determine the best way to make some fancy standoffs for the computer board, I opted to simply hot glue the board to a piece of cardboard, and then hot glue the cardboard to the underside of the orb base.

Fast
Simple
Effective
... and I'm lazy

The LED was also hot glued to the base, pointing upward into the glass orb. /

Now me has ORB!

Have Some Coffee

Technically, this picture is for the morning after the Orb Device had been created, but it does a damn fine job of showing what the orb thingy looks like.

The Code

Enable SPI

As previously stated, the SPI on the board needs to be configured by added a kernel module. In order for the kernel module to be loaded each time the device is restarted, the /etc/rc.local file was edited to launch the following script:

#!/bin/sh

#see http://www.unwireddevices.com/wiki/index.php/Working_with_SPI_(C/C%2B%2B)
#BUS : SPI bus number, can be bus0, bus1, bus2, bus3
#ID : SPI device ID (integer number)
#SCK, MOSI, MISO : GPIO numbers for the corresponding SPI signals
#MODE : SPI mode (0, 1, 2 or 3)
#FREQ : max SPI frequency (Hz)
#CS : GPIO number for the CS signal (optional)
# insmod spi-gpio-custom BUS=ID,SCK,MOSI,MISO,MODE,FREQ,CS

bus="bus1"
id=1
sck=20
mosi=23
miso=18
freq=25000000

cmd="insmod spi-gpio-custom $bus=$id,$sck,$mosi,$miso,0,$freq"
echo $cmd
`$cmd`

Honestly, the entire script can be replaced with one line of code: the final command. However, the script was written while reading the documentation of the process and if I ever need to edit the script, there are hella useful comments in there.

Control the Orb

The code for controlling the orb is written in Python and requires the Paho MQTT library.

code is available at https://gitlab.com/jezra/orb

oh... It would be really nice if I could copy the payload parsing documentation from the README.md in the code repository. Sadly, the lazy dev hasn't yet created that file. Well then, I know what I'm doing later!

Now quit reading, and go make an orb thingy.

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
0 plus 7
Answer:
required
2016-06-09

Recently, I was given a 1 gallon pot with some yellow water lilies in it. The lilies could be planted near the edge of my pond, but my pond is seasonal and the edge is always changing. There is no point in planting a flower on the edge of a pond when, in a few weeks, the edge will be 10 feet from where the flowers were planted.

Gears churned and a plan was hatched. I'll make a floating planter!

Step 1: Gather some supplies

There are quite a few empty 15 gallon pots at my place from all of the trees that I've been getting at Kurt's Garden. Add in some 45° 2" PVC couplers and some scrap PVC pipe, and I was ready to get crafty.

Cut some pipe

A few quick measurements, and a couple minutes with a hack saw and I had 8 short lengths of PVC to work with.

Make a ring

The couplers and pipe lengths where joined together with PVC glue and I soon had a nice ring that a 15 gallon pot will easily fit within.

Prepare the pot

After cutting the bottom off of the 15 gallon pot, 6 cuts were make down the side of the inverted pot to create some flaps. The flaps were folded over each other, drilled, and then bolted together.

At this point, I put the pot into the PVC ring, added soil to the pot and then tested the contraption in the pond. It sank like a brick.... back to the drawing board!

Make the pot wayyyyy shorter

Obviously the pot filled with dirt was too heavy, so the bolt as undone, the pot was shortened, and then folded and bolted again.

Atempt #2

Oh hey look, the new short pot is also sinking.

A few seconds after this picture was taken, I was knee deep in water, pulling the "floating planter" off the bottom of the pond. :/

Floaty platform

Fuck it. A 1 gallon pot in the middle of a circular platform shouldn't have any problem floating.... should it?

With some string and a thumb tack, a few circles were drawn on a piece of plywood and then cut. After the cutting, the wood was painted with exterior grade paint an then hung up to dry.

Make a couple mounting brackets

twist twist, twist twist, snip. A mounting bracket is made! Repeat the process, and there are 2 mounting brackets. Being lazy, only 2 mounting brackets were made to affix the PVC float to the platform.

It floats!

Once the platform and float were attached, the 1 gallon pot was put in the platform's center hole and filled with soil and some lilies (which were a bit eaten by some sheepies), and the planter was placed in the water.

It floats!

Did I mention that the floating planter actually floats? Well it does, and I am quite pleased with the result.

Now quit reading, and go make something float.

Comments
Name:
not required
Email:
not required (will not be displayed)
Website:
not required (will link your name to your site)
Comment:
required
Please do not post HTML code or bbcode unless you want it to show up as code in your post. (or if you are a blog spammer, in which case, you probably aren't reading this anyway).
Prove you are human by solving a math problem! I'm sorry, but due to an increase of blog spam, I've had to implement a CAPTCHA.
Problem:
7 minus 5
Answer:
required
subscribe
 
2016
2015
2014
2013
2012
2011
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008