PDA

View Full Version : Hacking into the craftsman digital level



Dawai
04-13-2008, 10:20 AM
http://img.photobucket.com/albums/v85/ibewgypsie/Craftsman_level.jpg

THE black bubble.. I have found out is a CPU.. the lil thing there on the right front, is a level type sensor like in avionics, a pair of capacitor felts? with a acid like in between them, as it turns it changes capacitance and or resistance. I kinda figured it was a cpu since once it inverts so does the numbers on the lcd screen.

If you notice, the cpu has connection holes in every trace.. My hands are shaking too bad to make connections or get signal inputs without letting the smoke out.

IE: Purpose.. robotics, positioning, .. My desires.. to install onto the tube bender to make it cnc'ed again off the laptop and a usb connector.

Anyone want to take it a bit further? This is a helluva deal at $20.. I need this one to work a bit tho.. so..

Lew Hartswick
04-13-2008, 10:37 AM
That chip (the black square) is a lot more than a CPU. It is also a
high resolution Analog to Digital convertor to take the output of the
sensor (which is analog) to get in the form suitable for the digital
handling. and depending on the display it may do an addressing of the
individual elements on the LCD (liquid crystal display) .
SO! I think it will be difficult to get the information you want out
without some "reverse engineering" .
I havent seen one of these so a question: How fast does the readout
change when a step function is input? Besides the angle there is also
a tilt direction. Is that simply either R or L or is there any sort of a
relative magnitude?
Are you going to need parallel data or is serial adequate? How many
bit resolution do you need to control the other device?
Fun and games. :-)
...lew...

nheng
04-13-2008, 10:40 AM
David, It may be using something like this sensor from NXP (formerly Philips). It has the oddest little package I've seen in a while. It has a minimum 0.05 degree resolution.

The SPI interface is pretty simple and will interface directly to some micros, others by bit-banging. Den

http://www.nxp.com/pip/KMA200_6.html

Digikey stocks this sensor for around $12. You could stick a small micro up against it and come out with a serial interface to your laptop, etc.

Lew is right. That chip probably does it all. The TI MSP430 family has such chips with LCD segment drive, A/D and D/A channels, flash memory, serial ports, GPIO, etc. Their evaluation kits are cheap. Some of their low end models can be programmed from their USB stick kit ($20). You can get 3 tiny processors, each on its own tiny pcb with header socket, for $10 ! The USB kit comes with startup software that includes C compiler, debugger and an IDE to work from.

lazlo
04-13-2008, 11:50 AM
Lew is right. That chip probably does it all. The TI MSP430 family has such chips with LCD segment drive, A/D and D/A channels, flash memory, serial ports, GPIO, etc.

At a $19 price point, I doubt very much that's a microcontroller. It's probably a mass-produced mixed-signal ASIC.

If you can read any part numbers off the package, I can pull the datasheet for you, which will describe the interface. It looks like an 80-pin quad flat-pack, which is about the most common modern package in existence, so that's not going to help identify the chip.


It may be using something like this sensor from NXP (formerly Philips).
http://www.nxp.com/pip/KMA200_6.html

Agreed -- something like that NXP part, but that's definitely not what David has. That's a high-end, .05° resolution sensor, with a 5-pin SOT package. I bet that's the chip used in the more expensive Mitutoyo/Fowler digital machinist levels.

These $20 digital levels are probably using some Chicom massed-produced clone of that chip, with much lower resolution.

By the way, the SPI interface is non-standard. In the sense that every manufacturer has it's own, non-interoperable version, mostly at the protocol level.

Weston Bye
04-13-2008, 01:05 PM
I just finished a program using the NXP chip. It's 'just' a magnetic angle sensor. I say 'just' with the qualification that it has a sophisticated field-programmable asic as well as the sensor, for calibration: zero, span, temperature, analog and digital output modes, etc. To use as a level, a magnet on a pendulum would have to be added.

I have a bunch of the sensors and the programming board and software available to me. I may experiment...

Dawai
04-13-2008, 04:18 PM
Bosh? digital laser ruler a*actual laser and not sonics.. if they come out with a usb or serial interface for less than $100 also.. would come in hand with a gadget I am working on here. Sears sells them also..

THE robot, home experimentor version is about $500.. out of line I think.. the home ruler has a pic or cpu also..

torker
04-13-2008, 11:42 PM
Guys.. I have to ask this again.. these digital levels.. how accurate would they be compared to a machists level?
I have no idea how the electrical ones work.
These chips your talking about.. do they degrade over time.. wear out(must be something moving in there?).
Would they be effected by cold?
Just curious is all.
Russ

lazlo
04-13-2008, 11:46 PM
Guys.. I have to ask this again.. these digital levels.. how accurate would they be compared to a machists level?

Not very. If you read the fine print, the little Fowler/Mitutoyo digital levels have +/- .1 degree accuracy. David's apparently has +/- .25 degree accuracy.

torker
04-13-2008, 11:55 PM
Thanks Laz.. So they aren't magic then.
Had to ask... you never know with some of this stuff nowadays.

dp
04-14-2008, 12:51 AM
I just finished a program using the NXP chip. It's 'just' a magnetic angle sensor. I say 'just' with the qualification that it has a sophisticated field-programmable asic as well as the sensor, for calibration: zero, span, temperature, analog and digital output modes, etc. To use as a level, a magnet on a pendulum would have to be added.

I have a bunch of the sensors and the programming board and software available to me. I may experiment...
What magnetism is it detecting? Terrestial magnetism includes a healthy dose of dip angle and vector migration which on a daily basis is quite measurable.

I've built extremely sensitive magnetometers and have been able to record diurnal and annual variations in the geomagnetic sphere. I collected data that appeared to predict the position of the moon as well.

oldtiffie
04-14-2008, 01:10 AM
Thanks Laz.. So they aren't magic then.
Had to ask... you never know with some of this stuff nowadays.

Russ.

I think you might find that you will get most of what you need in my post at:
http://bbs.homeshopmachinist.net/showpost.php?p=349884&postcount=50

Evan
04-14-2008, 04:56 AM
It's highly unlikely that the sensor uses magnetism. It will be a MEMS accelerometer such as this device from Analog Devices.

http://www.analog.com/en/prod/0,,764_800_ADXL320%2C00.html

They rely on a MicroElectronic Mechanical System to detect position. On the chip are chemically machined tiny structures that are driven to vibrate at a particular resonant frequency. One type resembles a diving board cantilevered in space as one plate of a capacitive element. The modes of vibration are affected by the orientation of local acceleration including the static G field. By using two internal MEMS sensors oriented at 90 degrees to each other a difference signal is obtained to give absolute angular position for 360 degrees in a plane.

Note that the AD part is specified with a physical X/Y alignment accuracy of 0.1 degree. That places a lower limit on the accuracy of the part.

Weston Bye
04-14-2008, 06:26 AM
What magnetism is it detecting? Terrestial magnetism includes a healthy dose of dip angle and vector migration which on a daily basis is quite measurable.

I've built extremely sensitive magnetometers and have been able to record diurnal and annual variations in the geomagnetic sphere. I collected data that appeared to predict the position of the moon as well.

The NXP KMA-200 has an array of magnetoresistive bridges for sensing the angle rather than the strength of a nearby magnetic field. The sensor is intended to operate in magnetic saturation and should be immune to terrestial magnetism. However, quite by accident, I succeeded in disturbing some of the factory programming, an event pronounced "not possible" by the the German engineers from NXP. Not possible, that is, until I demonstrated the phenomonon in a face-to-face meeting.

In such a condition, the sensor appeared to be sensitive to physical directional orientation with no magnet immediately present. However, my observations were informal and conducted in my office where a lot of high-energy magnets were kept.

Evan is most likely correct about the sensors in the level - not magnetic, and certainly not using a magnet and pendulum.

lazlo
04-14-2008, 06:49 AM
It's highly unlikely that the sensor uses magnetism. It will be a MEMS accelerometer such as this device from Analog Devices.

I don't know about the unidentified level sensor chip in David's level, but like Wes says, the level sensor chip that Nheng posted uses an magneto-resistive array sensor. It looks like it generates an analog (sinusoidal) quadrature signal based on the magnetoresistive bridges.

The cost engineered version in David's level probably operates on the same principle. It would be easy to tell -- David: can you put a magnet next to your level and see if the readings go haywire? It shouldn't hurt the level...

http://i164.photobucket.com/albums/u15/rtgeorge_album/NXP.gif

Dawai
04-14-2008, 08:14 AM
ON this level, just as in the angle inclinometers we installed on paper machines, it compensates for temperature, those with long drawn out analog devices.

THIS with a pic or cpu.. when you turn it on, it reads the temperature and displays it. Probably a cheap thermistor going to a second analog input.

THE level device, sensor, I have tore them apart before were just two felt discs with some kinda fluid between them, as rotated, the capacitance and resistance changed as the fluid hit various parts of the disc.

I'll look into the $12 sensors.. tho right now I am a mechanic and not a engineer. A Hell Harley is here, keeps coming back. WOre out from one end to the other and crappin on the mechanic. I sent it off and it came back with a massive oil leak, running out of things to fix soon I hope, not rebuilt the transmission yet, or the rear brake, or front end.. It came in for a rewire, the pistons had .12 clearance. Yesterday, a bolt , cracked place in the cases where the primary chain guard goes was leaking the primary oil onto the rear wheel. Clutch is shot too. As is tranny seal.. as is.. rear wheel is binding up.. it was tightened to about +150lbs and probably has trashed the wheel and bearings. This is one of them that needs a drip pan.

dp
04-14-2008, 12:26 PM
Note that the AD part is specified with a physical X/Y alignment accuracy of 0.1 degree. That places a lower limit on the accuracy of the part.

The 10% sensitivity error rating suggests this is intended more for relative motion detection (pedometer as the app notes suggest) than as an instrument, but what an interesting device. It would seem the repeatability would be quite good, and that it is very likely also sensitive to mechanical pressure as in a strain gage.

My digital pedometer likely has a very similar chip in it.

Swarf&Sparks
04-14-2008, 01:36 PM
at a glance, could be Hall effect?

Evan
04-14-2008, 03:58 PM
It is sold as a position sensor explicitly and it's stated to be a MEMS device.




iMEMS® Accelerometers (http://www.analog.com/en/subCat/0,2879,764%255F800%255F0%255F%255F0%255F,00.html)


ADXL320 Small and Thin, ±5 g Accelerometer

The ADXL320 is a low cost, low power, complete dual-axis accelerometer with signal conditioned voltage outputs, which is all on a single monolithic IC. The product measures acceleration with a full-scale range of ±5 g (typical). It can also measure both dynamic acceleration (vibration) and static acceleration (gravity)
The ADXL320’s typical noise floor is 250 µg/√Hz, allowing signals below 2 mg to be resolved in tilt-sensing applications using narrow bandwidths (<60 Hz).
The user selects the bandwidth of the accelerometer using capacitors CX and CY at the XOUT and YOUT pins. Bandwidths of 0.5 Hz to 2.5 kHz may be selected to suit the application.
The ADXL320 is available in a very thin 4 mm × 4 mm × 1.45 mm, 16-lead, plastic LFCSP
Benefits:
Two axis accelerometer in small (4mm x 4mm x 1.45mm) LFCSP package allows adding inertial sensing in space-critical handheld devices
Low power and wide supply voltage range (2.4V to 5.25V) for battery powered applications
Innovative circuit design provides sensitivity, zero-g bias stability over temperature - eliminates need for external compensation
Applications:
Cost-sensitive motion- and tilt-sensing applications
Smart hand-held devices
Mobile phones
Sports and health-related devices
http://www.analog.com/basesite/images/redesign/spacer.gifPC security and PC peripherals

Dawai
04-14-2008, 11:09 PM
Company flew a American engineer to Korea to install accelerometers onto some pressure vessels..

I was there, when they were offloaded, I took him up in the JLG to retrieve them..

They had forgotten to install batteries. It was sealed on the outside with the companies lil tamper proof seal. He mentioned he had a stomach bout while in Korea.

I never told a soul. Not my dog in the pony show.

dp
04-14-2008, 11:21 PM
It is sold as a position sensor explicitly and it's stated to be a MEMS device.

This or something similar is likely the sensor used in laptop computers to detect free-fall. There is a game that takes advantage of the rate sensor in my Mac laptop. You hold the laptop and try to steer a rolling ball on the screen through various gates by tipping the laptop left/right, fore/aft.