Tuesday, December 25, 2012

Managing Podcasts

I use iTunes to manage my podcasts. It works well, but it is vastly improved with the use of live-updating smart playlists.

What pushed me into figuring this out was using my iPod with my car radio. There was no way to tell which podcasts had already been listened to. To make it worse, the radio only displays part of the podcast title at a time, so it was difficult to tell which episode was which.

I set up a playlist for each of the podcasts I subscribe to which only includes episodes that have not been played. That is what makes it "smart."

As soon as an episode is played, it is removed from the playlist. This happens on the iPod automatically, without having to plug it into a computer or sync with iTunes. That is the beauty of live updating.

Here is how to do it:


First, create a new smart playlist by clicking on the File menu and New Smart Playlist...  (Or Ctrl+Alt+N)


Next, set up the two following rules and make sure that "Live updating" is checked.

The first rule is easy, and will be the same for every podcast you want to set up this way:

  • Plays is 0
The second rule needs to be something that will filter all the podcast episodes out of your entire music and podcast library. The secret I discovered to make this work with live updating on the iPod, is to only include data in the rules that exists on the iPod itself. You would think that Apple could disable the "Live Updating" checkbox if you choose data fields that won't work with live updating, but you would be wrong, apparently.  Choosing one of the following has worked well for me:
  • Artist contains [Artist Name]
  • Album contains [Album Name]
It should look like this. 














Note that this requires the artist name to be identical for all episodes of the podcast and unique from the artists of other podcasts or music. This would not work for the two NPR podcasts seen below. Both have NPR as the artist name.

In this case, I used the album name.


Using the new playlists is simple. Just go to "Playlists" on your iPod instead of "Podcasts" when you want to listen. It will show only the new episodes, and they will disappear like magic once they have been listened to. Smart, live-updating magic.

Tuesday, December 11, 2012

MagSafe Connectors

I love Apple's MagSafe connectors. They are a great way to quickly connect and disconnect a power supply. The magnets guide the connector into place. It is a brilliant piece of engineering and design. And magnets!

My one complaint is that I don't own a MacBook. That means I don't get to have one.

Don't get me wrong; I tried. Getting half of the connector is easy. All you need is a broken MacBook power supply.

The other half is much more difficult. It turns out that they only existed built into MacBooks. A broken one of those is more difficult to come by.


But then, Apple came out with this:  the MagSafe to MagSafe 2 Converter.

And with that tiny $10 adapter, it became easy to get a matched set of connectors. Woo!



Now a side bar in which I describe a different complaint and an opportunity for putting these connectors to good use.

Garmin GPS units used to have really good car docks. There was a series of contacts on the bottom of the GPS. The car charger plugged into the dock, and these contacts created a connection whenever the GPS was clipped in. Whenever you were using your GPS, it was supplied with power.

When my old GPS broke after several years, I purchased a new one. The new dock was disappointing, to say the least. It was just a plastic clip. It worked for holding the GPS in place, but that is all it did.

Power is provided from a separate mini-USB connection on the back. So now, you must plug in power and then the fit the GPS into the dock. Not the end of the world, I admit, but still an annoyance.

To make this easier, I made two adapters which allowed me to use the MagSafe connectors with my new Garmin.




I used the MagSafe to MagSafe2 converter and the male end of a mini USB cable to construct the first adapter. This is the one that attaches to the Garmin's USB port.

Disassembling the converter was not difficult, but I failed to capture any pictures of it. Here is a less-than-adequate description of the process. I used a vice to hold the body of the adapter (cushioned by a towel to avoid scratches), grasped the MagSafe2 end with a pair of pliers, and pried the end off. The adhesive and solder connections came apart relatively easily. Luckily, I did not need to reuse the MagSafe2 connector, it got a little scratched up.

Here you can see the MagSafe side of the adapter. The wires are coming out of the hole in the MagSafe2 side. The USB connector was bent at an angle to allow the wires to sit flat against the Garmin. 

These are the soldering connections:
  • I did not use the center-most pin of the MagSafe connector. Only two wires come from the MacBook power adapter. The center pin is connected within the end of that cable, and is used for the LED indicator. There is potential for it to be a useful third connection to supply something other than just power. (Like maybe the traffic antenna?)
  • The red wire is the positive side. It is connected to the positive USB pin and the remaining center two pins on the MagSafe connector. The connection is made to two pins so that the connector can be plugged in either direction. 
  • The black wire is the negative side. It is connected to the negative USB pin and the outer two pins on the MagSafe connector. 
  • There is one more connection that must be made within the USB connector so that the Garmin will recognize the power supply. Mini USB has 5 pins instead of four. That extra pin must be connected to the ground pin with a 17.3K ohm resistor. 

I found two sites that were incredibly helpful with figuring out the electrical connections. The first provided the following table with the pinout for the Garmin power connector.

PinPin
Name
Description
1+5V5 volts DC
2datanot connected / float
3datanot connected / float
XGNDconnected to pin 4 (GND) with 17.3K ohm resistor
4GNDground

The second site was the Wikipedia entry for USB. It had helpful diagrams of the standard USB connectors. 


Here you can see the adapter plugged into the Garmin. As you can see, I coated all the electrical connections with heat shrink tubing. I then used epoxy to further protect the wiring and connectors.




Next, I used a few scraps of wire so that the final shape would be mostly rectangular, and covered everything with a piece of larger heat shrink tubing. 

Here you can see the heat shrink tubing is shrunk and holding things together nicely.


Now for a bit more epoxy to keep things nice and rigid. Note that the epoxy was applied with the adapter removed from the Garmin. the objective was to make the adapter more robust, not to adhere it forever in place.

And finally, a bit of double-sided tape to hold it in place. This allows it to be removed if necessary. I have the other end wired permanently behind my dash board. If I want to use the Garmin in a different car, I need to remove the adapter so that my normal USB power supply can be used.


With the first adapter completed, it is now time to discuss the other end. The second adapter that I built goes from the Garmin charging cable to the MagSafe connector. This one was made from the female end of a mini USB to micro USB cable and the MagSafe cable cut off of the MacBook power supply.

The solder connections here were similar, but only two were required.

  • Positive pin of the USB connector to the inner two MagSafe pins. 
  • Negative pin of the USB connector to the outer two MagSafe pins. 


Here you can see the right-angle Garmin power connector on the left plugged into the female mini USB connector on the adapter.

Here are the two adapters joined together through the power of magnets! (Not by the force.. Vader is not actively involved in the process; he just hangs out on my dashboard.)

And finally, a picture of what it looks like with the Garmin connected to power and clipped into the car mount.

When I am done using the Garmin, I simply unclip it from the mount and pull it away. The MagSafe connector pulls apart smoothly and the end stays behind, resting on the dashboard.

The semi-dangerous part of this is that if someone tried to charge your device with a normal MacBook power adapter, the voltage would be too high (18v) and your device would most likely be destroyed... So, avoid that.

One other limitation is that there are only two wires on the MagSafe connector from the MacBook power adapter. So, if you have a Garmin power adapter with the traffic antenna, the traffic part will not work any more. Only power can be provided through the MagSafe connector.