Wednesday, August 31, 2005


When I was a child I hated gravity. It made high places unsafe. Falling hurt, climbing hills on my bike was hard. Why couldn't we just not have gravity and we'd be able to fly by just flapping our arms. Of course you know that was wrong. If God turned off gravity right now, all the air would go spinning off the earth and we'd all be launched into space because the Earth is spinning and without gravity, we'd fly off like water droplets on a spinning bike-tire.

I changed my mind so completely, I advise new parents to be as consistent as gravity when raising kids.

A long time ago, I came to see a unity between Law of the moral 10 Commandments sort and of the natural F=ma sort. The ancient Greeks called this organizing unity behind phenomena Logos. In the beginning was the Word. This led me to see Christ in this Logos either as its archetype, or something deeper. God is immutable and his essential laws won't change. Some laws directly reflect the moral character of God, whereas God told Moses things that had only a ceremonial basis back then. Maybe God will repeal the law of gravity, but he doesn't change laws capriciously.

Some weeks ago there was a tsunami and people questioned the goodness of God. But water and techtonic plates were merely obeying he laws of physics. These same laws of physics allow us to live. If nature behaves in a consistent, predictable fashion then there will be times when nature's forces can crush us.

That's the rub. We now understand the consistent, predictable behaviour of nature. We can detect tsunami's and issue warnings. We can track hurricanes by satellites. We can build levees to hold back water. We can evacuate threatened areas. God has given us sufficient gray matter to see these things coming and get ot of the way.

Then there's the matter of preparation. Nobody planned on building New Orleans below sea level. Last year another hurricane missed New Orleans. The word then was that levees couldn't handle a direct hit and after the city was flooded, it would be difficult to pump it dry again. I don't think signing the Kyoto protocol would have evaporated hurricane Katrina. But I do think that after last year's near miss, some serious attention should have been given to the problem of flooding.

That discloses the role of government in natural disasters. Shoddy governments can skate by for a long time. Something like a natural disaster discloses its failures. Ferinstance, inspectors are bribed and then buildings collapse. Emergency management roles may go to political cronies who prove unable to cope. It's up to the electorate to insist upon integrity in government.

So, does something like a natural disaster indicate that God is malign? What would God do differently? Repeal the law of gravity? But there's that spinning off into space business.

In addition to law there is mercy.

Two objects can't coexist in the same place at the same time. If you and I drive through the same intersection at the same time, our cars will go bonk. That's why we have traffic lights. I sat at a traffic light a couple saturdays ago. Distracted, I saw it a flash of green and I started off into the empty intersection. The blast of a car horn roused me and I saw that the green was the LEFT TURN ARROW. The light in my lane was red. Mortified, I realized that I should have had a car crash, but it was only mercy that spared me.

Mercy tells me that God is good. I see mercy as those remarkable times when circumstances should crush us, but they work out much better than anyone deserves. Why is mercy remarkable instead of customary? If it is customary, it's law and law is not mercy.

Theodicy is always the lame attempt to defend God or vindicate his reputation. I think that's a bad idea. God can defend himself much more ably than I could. I hope nobody thought this was what I was trying to do just now.

Saturday, August 20, 2005

CVS Camera Cable

I have been repurposing a CVS one-time use camcorder into a general purpose camcorder. I've written about this before. But I thought I'd say a little more about building the cable.

To repurpose the CVS camcorder you need a custom cable. You can do this by soldering the end-connector from a Palm Pilot synch cable to USB cable. USB connectors have 4 conductors: +5v, ground, +data, -data. The USB cable's wires are nominally colored black, white, green and red.

When you build a cable, you need to test it. Ohming out a cable entails attaching a multimeter to both ends of the cable. This can be a 3 or 4-handed job. To make this easier, I built a test jig as pictured here.

Someone gave me a dead motherboard with USB ports on it. I desoldered the USB sockets (with ethernet connector) pictured at the left. Then I soldered four clip leads to the USB signals coming out of the gizmo. Those four wires sticking out the top end in alligator clips. On the front of the block you'll see two USB sockets and an ethernet socket. The leads are connected to the top USB socket.

To ohm out your cable, plug the USB end in the socket and orient yourself with the Palm side of the cable. Orient the Palm connector with conductors facing upward, and the edge facing right. You'll see a row of 10 conductors. The first is on the left and the 10th is on the right.

Clip the black lead to your multimeter. Touch the other side of your multimeter to the 10th pin on the Palm connector. It should be connected. Move on to the white lead. Attach it to the multimeter and check the 9th pin on the Palm connector. The green lead should match the 8th pin. Skip the 7th pin and check that the red lead matches the 6th pin on the Palm connector.

If all these signals work, you should be good to go. BUT first check to make sure no adjacent lines are shorted together. There should be no connection between pin 10 and 9, 9 and 8, 8 and 7, or 7 and 6. A bit of solder bridged pins 6 and 7 and that prevented the cable from working (despite ohming out correctly). Use a bright light and a magnifying glass to inspect your solder connections.

Further reading:

Acknowledgement: I lifted the second image from "Maxwell Smart" on the camerahacking disussion forum. I definately recommend lurking there.

Serious Fun

Scott opens the throttle all the way. Then he calls out numbers. Fifty. Sixty. Seventy. Eighty. Then I feel a bump and I know the wheels are up. He pulls up in a steep climb--as steep a climb as a Cessna 172 does. And I think, “This is fun.” But then I realize how little holds us in the air. A bit of aluminum, an engine that had sputtered to life after a few balky tries. I remember how diligently Scott had performed the pre-flight ritual. Yeah, this is riskier than sitting in front of the TV. And I think, “Serious fun.”

The flight is smooth as polished metal. On the ground, temperatures are just below freezing. The air is dense and quiet. I presume it’s dry enough that icing is no problem. We take off at sunset and fly to Lansing. The daylight’s last gleaming shows me the terrain around Riverview Airport.

Things look different from the air. You see lines and wonder, “Is that 28th street?” It is. And you see long rows of headlights tracing a serpentine path across town and know it’s a freeway. After dark, you see mercury vapor and sodium floodlights. The bigger and brighter clusters must be shopping malls and the like.

When Scott gets in the air, he starts talking to Grand Rapids air traffic control. They tell him frequencies to use. They say a lot of numbers and I’m not used to simultaneously holding several multi-digit numbers in my head: the airplane’s call sign, the radio frequencies, the transponder squawk code. Scott asks me to enter that. It’s the only thing I feel comfortable doing. Someday I will touch the controls, but not tonight.

Past Grand Rapids there is the business of navigating to Lansing. Scott shows me the VOR beacon and how we’ll follow a radial into Lansing. The Loran is something I have actually seen years back, but Scott is not familiar with it and I am clueless despite the fact that I really ought to know.

At the halfway point, Scott tweaks the heading indicator. He mutters something about precession. I remember forgotten gyroscope lore. Precession, nutation. Cool stuff. Scott mentions that the compass is fairly accurate and mentions the dipping angle--more forgotten lore recollected. I smile at the three-dimensionality of lines of magnetic force. Scott utters pilot jargon and I know the science it touches. Knowing obscure things puffs one up. Scott will do an instrument landing at Lansing and he shows me the glide path and all that. It all makes sense.

I start to grok the radio traffic: thinking like Scott is thinking and how Lansing control must be thinking. I remember bits of forgotten conversations with friends who worked air-traffic control or avionics systems. Everything is common sense if you think about it. I scan the horizon for the twinkling stars that are not stars. I scan the ground for the lights that blink every few seconds. Yard lights do not blink, but airport strobes do. Scott explains how north-south traffic owns one set of altitudes and east-west traffic owns another set of altitudes. It makes sense. Most of flight school must be learning the air traffic rules.

vectors us in a roundabout way so that we make our approach from the east. This business of lining up approaches to airstrips is a big deal. I could never get it right when I played with Flight Simulator. Scott tells me what a two-minute turn is. It makes sense.

is a sea of lights I have no clue where the airport is, but Scott finds it immediately. He mentions a rabbit chase and I see it. Big airports must be designed to accommodate dolts (like me) who need a big neon arrow pointing and saying Land Here. We make our descent into Lansing. Scott nails the glide slope, but he is a little off the centerline. No problem, Lansing’s runway is a mile wide. The tower asks Scott where he will to park. Scott names an FBO. What’s a FBO? A Fixed Base Operation is a rest stop for private pilots.

A guy comes out and chocks our wheels. We get out and he asks if we need gasoline. We don’t. We go inside and ask the girl where we can get the $100 hamburger that was the whole point of this trip. She directs us to the Airport Tavern. I wasn’t listening to directions, assuming Scott was. He assumed I was listening. No problem. The FBO lends us a nice car and we take a bunch of right turns and we’re on the main drag in front of the airport. I recognize the road. The last time I drove this road I was in grad school running some errand that took me to the north end of Lansing.
We pull into the Airport Tavern. It looks seedy as does the clientele. Not a problem. I briefly contemplate ordering a hamburger, but the special is Porterhouse steak. There’s no need to be too literal about his hundred-dollar-hamburger business. The steak is wonderful, cooked to perfection and tender and juicy. We eat steak and talk about airplanes and flying. It isn’t affected at all, it’s the most natural thing in the world. We finish and chat with the waitress. Nice lady, nice place. Well have to come back someday.

Back at the FBO we return the car and Scott’s return pre-flight is hurried and cursory. We’ve only been on the ground for an hour and the airplane is just wearing a skin of frost from sitting outside. Scott remembers to pull the chocks. It’s cold and we pile into the cockpit. The heater doesn’t work until we get in the air. Lansing is busy and we have to wait for a heavy to land and another light plane to take off ahead of us.

The Hobbs meter clicks off the same if we’re taxiing or if we’re flying. Note to self: future flights should go to smaller airports. Scott explains that a Hobbs meter is like a taxicab that clicks off time regardless of whether you’re sitting on the runway waiting to take off or flying. It’s a better deal if you’re billed according to the tachometer.

We’re back in the air and the flight home is as much fun as the flight out. There’s a deck of clouds at 3500 feet over Grand Rapids and we descend to 3200. When you fly, you don’t say hundred feet. You say 35 or 32 and the hundred feet are assumed. Scott could have filed an IFR flight-plan in Lansing, but there isn’t much to see inside the cloud.

We detour to the north and fly over my house. Scott circles while I call home on the cell phone. I can’t hear whether they pick up or not. I yell into the phone that we are circling overhead. Mary and the kids blink the yard lights for us. The rest of the flight goes over downtown and it is easy to pick out the landmarks.

We land at Riverview and Scott nails the centerline. The stall alarm squawks at the very moment the wheels touch down. It is perfect. It is serious fun.

Sunday, August 14, 2005

Beyond Roe versus Wade

In 1973, Roe versus Wade legalized abortion in the the US, bypassing the politics courtesy of an appointed for life elite of jurists. Others have opined at length about the appropriateness of this legislation from the bench.

At the time Paul Ehrlich had written The Population Bomb and Malthusian scenarios were all the rage. Thomas Malthus and his followers has a long history of scary predictions that haven't panned out. According to these people, we should have all died sometime in the second term of the Reagan administration.

There was a real fear that overpopulation would be a real problem our society would have to solve. Abortion on demand seemed a reasonable component in solving the overpopulation problem. The fact that it dovetailed with what was then called "women's lib" contributed to its appeal. Today equal rights based on one's sex is acknowledged by all.

And today we're seeing some interesting demographics. In each country of the developed world, birth rates are flat and population growth has stopped. In the near future, nations will have to deal with the problem of population decline.

How can a society encourage population growth? One way is to pay women to have babies. That notion won't see much support in the next century when a large portion of the budget is going to Social Security recipients. It's cheaper to simply to pass laws against contraception.

That's an intrusive measure, but since the geezers of 2020 won't be much affected by laws against contraception, it's sure to get as many votes as those which increase Social Security benefits.

This looks like a bad thing and I think it is. I also think that once this thinking takes hold outside the ranks of the pro-life movement, the first change will be Roe versus Wade.

People want Roe versus Wade because they don't want babies. There are times when a child is a harmful disruption. The mother may not be prepared emotionally, financially, and otherwise for the demands of motherhood. There may be no support system (e.g. family) in place for nurturing the child. Moreover, it takes a lot of money to raise and educate a child. A lot of folks can't afford a large family.

Adoption has always existed because there are folks who want children, but cannot. The fact that these people are willing to do almost anything for a child has created a market that governments and lawyers have stepped into. There are legitimate concerns about adoptions and things must be done orderly and carefully. This has put pressure on the system to increase the price of adoption.

It seems that those who have an interest in the demographics of a stable population should put pressure on the system to reduce the price of adoption. Moreover, crisis pregnancy centers successfully discourage abortions. However, they often come with a heavy-handed religious message that some may not like. Perhaps non-church groups could establish homes for wayward mothers (a victorian term) where they'd be encouraged to give up unwanted children for adoption and supported in that choice.

Think of the hordes of unborn Democrat voters who'd be saved.

Tuesday, August 09, 2005

CVS Disposable Camcorder Project

I saw a hacking project on Make: Blog to repurpose a CVS Disposable Camcorder and this note describes what I did.

Saturday after breakfast I dropped into CVS and paid $30 for a disposable camera. This camera is supposed to be used once and then returned to CVS for video extraction for an additional fee whereupon they will give you a DVD of your video and they'll recycle the camera.

I had read about various efforts to repurpose this camera by buying it, fabricating a cable for it, and then installing software to unlock and then extract the video onto my computer.

The project had hack value, so I bought the camera and started researching the project. Happily, others have done all the hard work, so I was able to glom onto a couple HOWTOs and download all the software.

The project seems to be well within the grasp of a technically oriented teenager. It doesn't entail anything more dangerous than cutting wires and soldering them. I should put my son to work building another interface cable and installing the drivers on my other laptop.

The first thing I did was to study the camcorder I'd just purchased. It had 3 buttons on the back and by pressing them all simultaneously while powering up the device, I was able to ascertain its firmware id. At the top of the camcorder is a sticker. Beneath it is a slot wherein you can see the edge of a circuit board and ten contacts.

Those contacts match the docking port of a Palm Pilot. Happily, I have several and I also had some surplus Handspring Prism docking stations. I decided to sacrifice one of these. That was a mistake. After I dremelled free the connector from my Prism docking station, I noticed its pins were spaced 8-wide instead of 10-wide. Ooops, discard that.

Second try I sacrificed a Palm Pilot M100 docking station. It had the right number of pins at the right spacing. I disassembled, and then desoldered it to get a little circuit board with nice plated-through holes. Sweet. I got the circuit board nice and clean and then picked around to find a USB cable to plug into it.

This is how you tell if a cable is wrong: you hook up the camcorder on one side and the computer on the other side, and nobody does anything. If the cable is good, you'll hear Windows make a bloop-beep sound of something being plugged into the USB port, and you'll hear the camera light up, beep and power on. (You don't need to install any software to get this much response.) But my cable was bad and I got nada.

Remember that Handspring Prism USB docking port? I tried that. Advice: DON'T. It has a nonstandard USB connector that doesn't pass through the red signal. More Advice: Ohm out (test continuity) all the wires of any cable you try to fabricate.

I went sorting through junk boxes and a friend gave me a USB cable for my second attempt.

The Palm docking cradle's circuit board didn't clean up as nicely the second time I desoldered all its wires. I didn't have any solder wick, and discovered that air-in-a-can works wonder on hot solder. It removed the excess and got the board relatively clean without more than a few pinprick burns. (I became a Mathematician instead of an Electrical Engineer, because when I was in High School I couldn't solder. Go figure.)

After you have a working cable, you can connect the camcorder to your Windows XP box and it'll tell you that new hardware has been detected and ask, "Do you want to install drivers for it?"

DON'T tell it you do unless the following drivers have been installed. And do tell it you want it to ask again the next time it sees this unknown device. (There's a checkbox you want to keep clear.)

Drivers are fairly straightforward, but there's not much handholding. You need two programs: one low-level usb library thang and one higher-level talk to the camcorder thang.

The low-level thang is LibUsb-Win32 on Source Forge you'll need to decide which version you like and then download, not one, but two files. I downloaded these:
  • libusb-win32-device-bin-
  • libusb-win32-filter-bin-
If you just download the EXE, it'll install itself, but NOT the inf-wizard.exe that you'll need. (I suppose if you've got mad Windoze Device Driver skills, you won't need inf-wizard.) Thus you need to get the "device bin tar" file, too. I put that in a directory under the libusb-win32 install.

Once you've got this installed on your machine, you're ready to plug in the camcorder again. Still don't setup the device driver, but DO run inf-wizard. It'll look at the USB and ask you some questions you can click through, and it'll create an INF file. Pay attention to that and where you put it.

Then go back to Windoze and tell it you do want to install the device driver, and you do want to specify where it goes to pick up the device driver and you will tell it get the device driver out of that INF file.

Windows should then be satisfied and you should be ready to talk to the camcorder.

At this point, there are two perfectly suitable programs: Ops and SaturnDownload. They probably share a lot of code. Ops is a clicky windows MFC program and SaturnDownload is a command-line program. It's simpler and I think I prefer it because it leaves no room for mistakes. Just run it and it'll download your videos.

To recap, this is what you'll have to do:
  1. scrape up $30 from a paper route or something for the CVS camera
  2. scrounge parts for a cable from an old Palm synch cable and a USB cable. Learn to solder them together. If you're a True Hack, you could install a USB socket in the camcorder case. That idea has some appeal. Assemble the cable.
  3. install libusb-win32, create an INF, give it to Windows, install SaturnDownload
  4. take a lot of videos and gloat about how much cheaper this is than theKodak EasyShare that I paid 10x more for six months ago.
Further Reading:

Acknowledgements: I didn't do NOTHING except scope out what everybody else had posted and follow the instructions they left for me. This missive exists to point out the parts where I had to scratch my head and figure out what I was doing wrong.

UPDATE: some have complained of being unable to see the video despite hearing the audio. Problem is lack of the xvid codec. I found the following files in my c:\windows\system32 directory. I presume they are vital to getting the codec to work. (You probably need to google for someone who knows what he's doing.)
  • 09/06/2004 05:06 PM 53,248
  • 07/03/2004 09:59 PM 524,288 xvidcore.dll
  • 07/03/2004 10:08 PM 139,264 xvidvfw.dll