David C. DeanMusings, Notes and Projects2015-01-24T16:01:38Zhttp://www.davidcdean.com/feed/atom/WordPressdavidcdeanhttp://www.davidcdean.comhttp://www.davidcdean.com/?p=7792013-03-01T07:41:04Z2012-12-19T02:04:18Z

I got my foldable spectrometry attachment from the PublicLaboratory.org Kickstarter. Here’s the first result from testing with a typical CFL. I think it needs a little adjustment, but it’s working.

In Progress…

In Progress…

I never got to build my own model rockets as a kid. It’s surprising really, since I spent a lot of time launching far less flight-worthy objects through the air with ridiculous feats of garage chemistry. Remember this was before the days of YouTube (*sigh*, amateurs). So when I ordered a pair of model rockets for my nephews I was undoubtedly more excited than they were.

As usual I expected too much. My inner Calvin and Hobbes glared with disappointment when I rummaged through the kit to find the included “Estes Electron Beam Launch Controller“. It’s an underwhelming little device with nothing more than a safety pin, LED and small launch button. And while I’m sure it does its job, it didn’t exactly fit the NASA image I’d conjured for their first rocket launch.

So I set to work on something way cooler…

]]>2davidcdeanhttp://www.davidcdean.comhttp://www.davidcdean.com/?p=7162013-03-01T07:32:56Z2012-09-22T22:02:33ZMost premade bluetooth modules for Arduino, particularly in proper shield form, can be pretty expensive for just kicking around on the workbench. This turned out to be a pretty easy alternative that’s also relatively inexpensive.

You’ll want to be careful soldering the module to the PCB. Keep the heat on your iron as low as possible and test on something else first to make sure you’re still getting solder to flow. Fortunately I bought a few of these modules, because I managed to burn one of the gold contacts right off a module, rendering it useless.

For basic serial TX/RX, you only really need to get TX/RX, Vcc and Gnd pins soldered on, though I did all of them just to make sure the module was secure. Once you’ve got your module attached to the board, you’re ready to hook it up to your Arduino. Remember the TX pin on the module will go to the RX pin on your Arduino, and RX pin to TX. Everything is nicely labeled on both sides, so you should be fine.

Note that the levels for the BT module are not 5v tolerant. You’ll need to use a voltage divider to bring the Arduino’s TX voltage down for the RX pin of the module. You can use an online calculator to work out appropriate resistor values, but I used one each of 10k and 20k.

The Arduino will manage with the lower voltage TX of the module without any hackery.

With the Vcc, Gnd, TX (through the divider), and RX connected, it’s time to test. I used Arduino Commander (available in the Google Play store) on my Android phone and the Standard Firmata sketch on the Arduino. Pairing to the HC-05 requires you supply the PIN, “1234″. With that, you should be ready to connect and set pin states.

I decided I need a patio light for evenings spent hanging out on the balcony. A proper lantern would have been a bit much, and a flashlight wasn’t quite what I was looking for. So with an old mason jar, four LED’s and resistors, and a spare atmega chip sitting on the bench, I decide to just slap one together.

The bottle was sprayed with typical glass frost spray paint. The lid was done with a few coats of blue, just to hide the product labeling. Obviously an arduino board would’ve been a big waste of resources, and while admittedly an atmega328 is too, I decided to just throw what I had together on a leftover square of perforated pcb.

The LED’s are arranged at different heights and facing different directions. Each one gets a run through a variation on the sample “fade” sketch included in the arduino IDE, resulting in a firefly sort of effect. I’ll throw the code up for anyone that wants it, though it’s simple enough that you probably wouldn’t need it.

I apologize for the poor video, but this should give you some idea of what it looks like when it’s running…

]]>0davidcdeanhttp://www.davidcdean.comhttp://www.davidcdean.com/?p=6422013-04-07T17:24:07Z2012-06-05T15:32:05ZTonight is the last Venus transit until 2117 and I didn’t really want to spend a ton of money on an off-axis or full aperture solar filter for my 130mm reflector. Looking around a bit I found that a common kind of black polymer sheet is often used to make less expensive filters instead of the more common (and expensive) Baader Planetarium AstroSolar Film.
So I ordered a sheet of the durable and less expensive material off eBay from Seymour Solar. It was cheap and they even threw in a free pair of paper goggles with the film installed. Win! Also, I’ve heard you can get this material from your local photography & telescope stores in a pinch.

With a sheet of poster board from walmart, xacto knife, scissor to cut the film and a hot glue gun, I was able to throw this little ugly duckling together.

*After I took these photos I managed to clean up the edges considerably and I’ll be adding a little something just to make sure it doesn’t blow off the scope and burn a hole through my head. Updates forthcoming.

Trace and cut two rings that match the size of the scope, such that they’ll rest on the face of the thing. I was liberal with the size here to help prevent light from leaking in. Then I made one (you could, of course, do more) outer right that fit around the outside of the scope. This works as a lip to keep the thing in place.

Checked the ring sizes before I went any further, everything was close enough. Then I cut the film to match the outside diameter of the rings, and glued it all together. The two smaller rings hold the film in place while the larger one gives it a ring to sit on the scope.

I ended up cleaning the outside with the sanding bit on a dremel, which gave me nice smooth edges. These photos are of the unfinished edges. Last minute fix will be to add clips or a shroud to make it hang on a little better. A good gust of wind could take this cap away. That’d be pretty awful when you’re looking at the sun.

“I’m making a note here… huge success.”

Things went really well and folks got a look at something that won’t happen again for 100+ years. I’m happy!

]]>2davidcdeanhttp://www.davidcdean.comhttp://www.davidcdean.com/?p=5772011-12-12T21:08:52Z2011-12-11T08:35:23ZI’d love for someone to point me in the direction of a (working) app to better manage the Ubuntu Unity launcher items. I needed to prefix a “gksudo” on a launcher item for regular use (don’t ask), and couldn’t figure out how you’re supposed to do this. In the meantime I’ve worked this out…

1) Open a terminal window

2) Install gnome-panel with the following:

sudo apt-get install gnome-panel

3) cd to ~/.local/share/applications/

4) Create a new desktop launcher in this directory with:

gnome-desktop-item-edit --create-new <name-of-launcher.desktop>

5) Enter your launcher parameters and save it.

6) Browse to your home directory, press Cntrl-H to show hidden items and navigate to the .local/share/applications folder you made your new shortcut in.

I had an old USB GPS puck sitting around and wondered if I could make it play nice with the Arduino. Of course, there are easier modules (including this one in serial) that can be found elsewhere for a few dollars more. But assuming you have this one, it can be done.

Remove the Module…

Lift out the rubber weatherproofing gasket. It should not be glued in.

Gently lift the exposed GPS module from the housing and unplug the connector.

Decision Time…

The module has a PL-2303HX chip under the antenna (that ceramic, boxy looking part) that converts serial data to USB so you can normally plug the device into your laptop. Your Arduino can’t read the USB data coming off your module, so you have two choices:

1) Use the appropriate pin to snag the data before it’s converted or…

2) Convert back outside of the module

Naturally, I went the crazier route, and decided to find the chip and pin. To get at it, you could (and probably should) carefully cut away the small cover to expose the left side of the chip. Note that this is all pretty tight work, and I haven’t found an alternate (exposed) point to use other than at the chip itself.

Since I was doing exploratory work, I decided to pop the antenna off the assembly using a flathead screwdriver so that I’d have easy access. A continuity check showed there’s a solder point on the bottom of the board that correlates with where the antenna post normally passes through, so I was able to simply reattach the antenna later on a short length of wire.

Using the wire harness from Sparkfun, you can now wire up the module to your Arduino board. There are six wires. One black followed by five white. Ignore the black one. The first and last white wires are wired to Gnd, while the fourth white wire is run to the 5v supply on your Arduino to power the module.

Now that we’re wired up, I used Adafruit’s GPS test sketch to make sure everything was working, which you can find at the link above. Remember that you’ll have to get the NewSoftSerial library and put it in your libraries folder first. And for debugging purposes, the LED on the module itself blinks when it’s getting satellite broadcasts. If the light is solid, the module isn’t getting data… try moving your setup near a window. You’ll notice mine is on the floor near a patio door.

You’ll want to check that the pin assignments in the Adafruit Sketch match the pin you’re using to steal data off your GPS module, then upload it and open your Serial monitor. If you’re connected up correctly, you should soon see your Time, Date, Lat and Long come streaming through!

If you end up using one of these modules with an external IC to switch back to serial, I’d love to see what you used!