Monday, July 17, 2017

Finding broken Photobucket Images on your site

Hopefully this helps more than a few site admins, bloggers, etc. who are seeing this image (right) instead of their Photobucket photos.

As you may know, Photobucket suddenly decided to break 3rd party image hosting for everyone on earth, rendering images on blogs, forums, and numerous other sites useless (link to story).

If you don't want to pay $399 per year for an account upgrade...

Here is a quick and dirty way to find broken Photobucket images on your site -- if your site isn't too huge. This should work in Linux, Mac or Windows with Cygwin.

wget -l 1 -r --force-html  http://example.com
find . -type f -exec grep -iHl 'photobucket' {} \; > photobucket.txt

The file photobucket.txt will contain a list of URLs for you to look at. For example, on this site, I get this list:
 
./www.bot-thoughts.com/2009/index.html
./www.bot-thoughts.com/2009/09/index.html
./www.bot-thoughts.com/2009/07/index.html
./www.bot-thoughts.com/2009/12/index.html

This list of filenames correspond to URLs on the site.
 
How does it work? 

Use wget to download the webpages recursively (-r) on your site only (one level deep with -l 1). 

Then, find all the files with find and use grep to search for the string photobucket

When that string is found, print the name of the file, only ignoring case (-iHl) and stick the output in a text file.

Monday, July 10, 2017

Diagnosing Watches With Electronics

I've been fascinated by mechanical watches since I was a kid. Little machines on the wrist, marking out the passage of time with an unexpected level of accuracy, at least if the watch is in good shape.

To measure accuracy and diagnose issues, watchmakers use a watch timer which listens for and measures intervals between ticks. However, the tools are rather expensive for hobbyists, such as yours truly.

Fortunately, free or low-cost options like Watch-o-Scope ease the burden, but require a sensor and preamplifier. Here's my take on this fun little preamp project.

Monday, May 29, 2017

Soothe and Glow doesn't light up


Our little girl goes to sleep easier when we have a Fisher Price Soothe and Glow running. One of them didn't light up, and I fixed it. But not before my wife bought another one. Here's what was wrong.

Disassembly

Undo the hook-and-loop closure at the bottom of the animal and pull out the electronics module. It's built in two halves with a giant button on the top. The top half is just a frame around the button.

Remove the battery cover retaining screw. Then remove the four screws holding the two halves of the module together.


With the top half off, remove the giant button to get access to the PCB. The button has two posts with springs around them and there are two clip ears retaining the giant button to the PCB.



Pry one of the clip ears loose and remove the button off of the PCB so you can inspect for problems.

Diagnosis

There are three surface mount LEDs on the board. After giving the board a cursory inspection, I thought the problem was simply that the Q1 transistor wasn't populated. But, no; when I disassembled the second, working giraffe it was missing Q1 as well. (This is common on production PCBs I've seen, probably parts that testing revealed weren't necessary or features that were trimmed to save cost).


Next, I broke out the DMM to check voltages and noticed the LEDs come on when I tried to measure voltage at R1, the 0-ohm resistor jumper, which transmits power to the LEDs. That's weird.


And if I pressed one of the on buttons hard enough the lights would sorta-kinda flicker. Seemed like a bad connection somewhere. I couldn't see anything wrong, though.

Then I accidentally discovered that when I touched the 0-ohm resistor with my finger, the LEDs lit up. That points to a cracked resistor or cold solder joint.


And, in fact, it was a bit of both as the hot air rework station demonstrated. The resistor came loose even though only one of the two joints was molten. And there was a chunk missing.


I initially tried replacing the resistor with a 10-ohm, but it dropped too much voltage. So, I replaced the resistor with a small section of bus wire, soldered in with the iron. And now the giraffe glows like it's supposed to.