Skip to content

Induction heating to remove seized bolt

Working on replacing the timing chain gasket on my 99 ford explorer 5.0

got to the point of some seized bolts and not sure what to do.

using a big blow torch sounds like it would work best but I don’t have one and I don’t want to strip my motor down enough to do it safety.

After a while I remembered inductive heating. Fortunatly there is a tool for that! Unfortunatly it is like $500. But it works really well!

After some more thinking I decided to go more of the DIY route and bought this for $13.

I needed a power supply so I grabbed an old PC power supply. Using some yellow 12 volt wires and the black ground wires. Needed to add a power button by bridgeing the green and black wires on the 20 pin connector

Yay it heats up a paper clip to red hot in about 8 seconds!

I needed some sort of project case to use in the actual repair!

The bolt I needed to heat up was larger then a paperclip so it took longer to heat up. Doing a bench test after about 2 minutes I was able to get the bolt to about 600 degrees!

In the end I couldn’t generate enough heat when the bolt was in the block using the $13 inductive heating unit. A $55 handheld torch did the job.

Gasket replaced!

DPI and you?

I have been experimenting with tasseract and occasionally get really terrible results when I know I should not. When I grab the images, change the dpi aka save them at a different resolution I get great results.

Tasseract wants 300 dpi. when I google dpi of digital images or how to change dpi on android most of the information is along the lines of “you dont want dpi, you dont know what you are talking about, your life is a lie and nobody cares about you”. So what is going on here?

Maybe some more details from Tasseract will help:

Is there a Minimum Text Size? (It won’t read screen text!)
There is a minimum text size for reasonable accuracy. You have to consider resolution as well as point size. Accuracy drops off below 10pt x 300dpi, rapidly below 8pt x 300dpi. A quick check is to count the pixels of the x-height of your characters. (X-height is the height of the lower case x.) At 10pt x 300dpi x-heights are typically about 20 pixels, although this can vary dramatically from font to font. Below an x-height of 10 pixels, you have very little chance of accurate results, and below about 8 pixels, most of the text will be “noise removed”.

So it looks like they want the letters to be within a certain range of pixels tall. They only give minimum pixels here, around 20 pixels minimum. But I believe there is also a maximum pixel height they will look for. In my previous post ‘tesseract’ small unclear text was picked up reliably but large very clear text was ignored. From what I can find on google it does not appear there is a configured maximum but a algorithm that tries to determine it based on picture height.

My current image is 115 x 59 and the text is about 1/3 of that height or about 19 to 20 pixels high. It seems silly to my that doubling the pixels in the picture with no quality improvement would yield better results but I guess I can give it a try.

So my next steps will be

  1. Make sure my text is above the minimum pixel xheight by a safe margin
  2. study up more on the max height algorithm. maybe I just need to zoom out?

building AnySoftKeyboard

Trying to build anysoftkeyboard

android update project -p .
Error: . is not a valid project (AndroidManifest.xml not found).

cool, the android manifest is actually a couple directories deep. ill skip this for now

next step

gradle build
:buildSrc:compileJava UP-TO-DATE

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
Cause: You must assign a Groovy library to the groovy configuration!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 2.374 secs

well that went well. Probably because I have a super old version of gradle by default with ubuntu that doesnt include the groovy configs by default.

Installing the latest and greatest gradle fixed it. Overall I enjoy apt-get but this seems to be a recurring problem!

trying out (another) android-ocr app

After getting my feet wet with the simple app in my last post I wanted to try a little bit more advanced app.

Getting it running was pretty straight forward.

  1. git clone android-ocr
  2. made sure it was pointing at tess two
  3. right clicked on project and ran as android app


it works pretty well. thoughts

  • I dont need the translation stuff so I will rip that out.
  • zoom would be nice for when you are a little farther away
  • there is some code for continuous recognition, that sounds neat but im not sure how to enable it
  • it would be nice to prompt the user if this is correct, save the files

Starting out with Simple-Android-OCR on ubuntu

pretty boring post. basically followed this tutorial

  1. make sure you have the build toolssudo apt-get install build-essential
    sudo apt-get install ia32-libs
    sudo apt-get update
    sudo apt-get install ia32-libs
    sudo apt-get install openjdk-6-jdk
    sudo apt-get install icedtea-plugin
  2. install android sdk
  3. install android ndk
  4. add adt tools to your path and .bashrc
  5. build tess-two
    git clone git:// tess
    cd tess/tess-two
    fix target in
    android update project –path .
    ant release
  6. build eyes-two
    cd ../eyes-two/
    fix target in
    android update project –path .
    ant release
  7. build simple-android ocr
    git clone Simple-Android-OCR
    go change target version in properties file
    point the project at the tess two install path
  8. I had trouble getting my phone to allow the debug connection. “adb devices” would either return nothing or the device serial number as question marks or the status as unauthorized. I tried several combinations of restarting adb along with restarting the phone, unplugging and replugging, disabling / enabling dev mode. I think is what finally did it was removing all currently authorised computers from my phone.

    and add to .bashrc
    2015 adb kill-server
    2016 adb start-server
    2017 adb devices

  9. open eclipse, right click on simple ocr project and run as android application.
  10. success!


Tesseract is probably the most accurate open source OCR engine available. It differs from OpenCV because opencv is a general purpose image library. You could use it to build something like Teseeract.

How well does it work? I downloaded the latest portable version to try it out. The ReadMe is very helpful.


out of the box

Out of the box just point it at an image.

>tesseract.exe IMG.JPG out
>cat out.txt


.‘-go.-—: qv..»- . v_—
r : -.; 1


Lp LMT 223500

_ ' -r~,.\'4-5-p-—-A-. 4.
ts‘ "3' ”'


..,. ...¢...-..

,, ..--4

Pretty impressive that it correctly read the small text at the bottom but pretty said it missed the giant text in the middle.

focus on digits

Maybe if I focus on digits I can get the big “352264”.

In Tesseract-OCR\
>cat tessdata\configs\digits
tessedit_char_whitelist 0123456789
>tesseract.exe IMG_4311.JPG out digits
>cat out.txt


20522024 0101022 2 222
1 2 252 0

17 0011

00 1001 223500

2 0 0554112402 42
2200 11 000

2 10168 512 60009 551053

2402 0242402

202 0224

So my guess is the letters are too big compared to the size of the picture. Tesseract is really geared towards looking at a page of text so it would make sense to ignore larger patterns and focus on smaller ones.

general approach for best results from tasseract

according to this stack overflow post

  1. fix DPI (if needed) 300 DPI is minimum
  2. fix text size (e.g. 12 pt should be ok)
  3. try to fix text lines (deskew and dewarp text)
  4. try to fix illumination of image (e.g. no dark part of image
  5. binarize and de-noise image

fix DPI

The original dpi of the image was 72. Probably a setting in the camera that could be changed, or changed automatically with pre processing.

As a quick test I changed the dpi in gimp to the recommended 300.

>tesseract.exe 300dpi.JPG out
>cat out.txt

_`__ ___`___,.. ....-u-9.`-""

._ , ,~...,.--... ....

..- ...-..-.......

..,\.-.,~. -
,, .. ....~\-.»..v
, ., ._..x-. o-






V.`-w-v -2
'''-_§_``'.: '. `

QLD LMT 223500
`L1 WT 62500

_ . ' ".".."4-1`
.:...--"!CT::~ ts`


Success! I got the string CHTT 352264 I was looking for. But there is still a bunch of junk..

only allow alpha numeric

In Tesseract-OCR\
>cat tessdata\configs\alphanumeric
tessedit_char_whitelist 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
>tesseract.exe IMG_4311.JPG out alphanumeric
>cat out.txt

V1 HFR4 9P

A 4 N NW

H 4 N







V 4

V1 2

3 LD LMT 223500
LT WT 62500

P P 41
A IQ17 M


what is next?

  • use regex to limit the pattern I want
  • pre-process the image more, possibly only look at largest text


ros arduino notes

Most of the groovy packages are broken including rosserial. Short version of building from source:

cd ~/overlay_ws/src
git clone git://
cd ~/overlay_ws/
source ~/overlay_ws/devel/setup.bash

quick ros tutorial on using rosserial

start the ur5 simulator

roslaunch ur5_description test.launch
source ~/overlay_ws/devel/setup.bash
rosrun rosserial_python /dev/ttyUSB1
source ~/workspace/devel/setup.bash
rosrun talker
rosrun rqt_graph rqt_graph
rostopic echo JointState
rostopic pub -1 /shoulder std_msgs/UInt16 195

getting urdf_tutorials to work in groovy with ubuntu 12.04

This should be pretty straight forward but unfortunately the package is broken. Groovy is supposed to use .rviz configuration files for rviz instead of the older .vcg files. The urdf_tutorials were never properly tested or groovy changed sometime after urdf_tutorials were released.

dpkg-query -W ros-groovy-robot-model-tutorials
ros-groovy-robot-model-tutorials 0.1.2-s1374436389~precise

dpkg-query -L ros-groovy-robot-model-tutorials
...bunches of files
...bunches of files .rviz file

The best way I have found around this is to grab the latest urdf_tutorials source from git and use everything else stock as installed from the repos. This is called workspace overlay, setup here.

mkdir -p ~/overlay_ws/src
cd ~/overlay_ws/src
git clone git://
git clone git://
cd ~/overlay_ws/
source ~/overlay_ws/devel/setup.bash
echo "source ~/overlay_ws/devel/setup.bash" >> ~/.bashrc
roscd urdf_tutorials
# should be ~/overlay_ws/src/urdf_tutorial
cd ~/overlay_ws/src/urdf_tutorial/urdf_tutorial
roslaunch urdf_tutorial display.launch model:=06-flexible.urdf gui:=True

now rviz should pop up. When it used to work out of the box the robot would be visible. For me this did not happen.


I had to click add in the lower left


select the robot model and click ok


now I can see the robot, but the gripper is not there and the robot appears to be below the origin. so there are still errors


you can use the joint state publisher to interact with the model.

quick ros models to play with

roscd ur5_description
roslaunch ur5_description test.launch gui:=True

roscd urdf_tutorial/
roslaunch urdf_tutorial display.launch model:=06-flexible.urdf gui:=True

maximum recursion depth exceeded while calling a Python object

have you ever ran into an error that you remember getting before but don’t remember how you fixed it or why it happened? This is my attempt to break that loop for this error.

my project was structured as such


I had more modules and classes to add so I wanted to make a package.


When I ran the test I received a great gift! Yippie!

Finding files... done.
Importing test modules ... done.

Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored
Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored
Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored
Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored
Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored
Exception RuntimeError: ‘maximum recursion depth exceeded while calling a Python object’ in ignored

so it looks like that is trying to extend itself, repeatedly. I’ll move the test out of the package so when the test tries to load the package it doesn’t try to load itself which would try to load the package which would load itself.



This works! but it would rather keep the tests in their own directory or with the package..

The following fails with the same recursion error



I’m annoyed. fix later.