1.     Aim

With time almost run out (as in the closing date is 25th March) this is my last technical blog on my progress with R2B4. In this blog I thought I would take a look at what the TE Connectivity KMT32B sensor and the temperature sensor have to offer. I also give a round up on my traction modifications.


2.     Product Details

2.1     KMT32B Magnetic Sensor

I must be honest, it took me a while to work out what the KMT32B device did. It should somehow be useful for measuring the angle of R2B4's load bed in relationship to the body during dumping of materials. The next two pictures have been taken from the TE Connectivity datasheet.

{gallery} TE Connectivity Literature

2.2     Mounting the TE Connectivity KMT32B Magnetic Sensor

I have one problem with this sensor....it was supplied as the TDFN-8 package, which is microscopic. I kept the sensor in a small pot so that I didn't loose it. It really is the kind of thing you dread pinging out of your tweezers. Had I thought about the small form-factor earlier on I could have purchased the sensor as an SOIC package; and those I am able to work on fairly easily. The only chance I have of mounting this TDFN-8 package is to make a small PCB and that is what I set about doing this week. I decided to break the pins out directly to a 0.1" header as I could then experiment with the external signal conditioning whilst it was plugged into a breadboard. I made a symbol, footprint and device in Eagle PCB software - I use the free version at home and think it is great.


To get this ultra-small design to etch properly I would need to ensure my Ferric Chloride etchant was at the hotest possible temperature (approx.45 degrees centigrade) and preferably pre-heat the board slightly.


{gallery} The KMT32B


The TDFN-8 package. Solder pads are underneath only - the side part does not take solder very well.

The simple layout as seen in Eagle PCB - in my opinion, a great free tool.

The output of Eagle, inverted and with some layers now hidden. This is printed onto normal paper using a laser printer and then the magic ingredient is added....vegetable oil. It makes the paper go translucent. Just let it dry overnight between some kitchen paper.

My Etching Setup - homemade UV box

A simple homemade UV light box and timer. For the pre-sensitised boards that I used, 5 minutes exposure worked well. Note the oily patch around the stencil.

A glass vase, some ferric chloride and a fish tank heater

Outdoor setup is even cheaper - vase is from Ikea. Once cool the solution goes back into the storage bottle and into a second plastic box (to act as a bund).

Air stones have disintergrated in the ferric chloride

Normally I agitate the solution using a 240v fish tank air pump, bubbling the air out into two air-stones. However they seem to have fallen apart. I guess they are not real stone and the FeCl2 has attacked the resin?

The unpopulated etched PCB

And in a few minutes copper is etched away from the exposed/developed resist areas

The soldered KMT32B TDFN-8 Package

A few dabs of flux, some solder, some solder braid and carefully nudging the sensor around managed to get it mounted and all the tracks are clear of shorts.


Let me also stress some health and safety here.

  • Wear eye protection whilst etching and using the chemicals, 99% of the time everything goes well but 1% you get a splash, a flick of liquid and it can easily go in your eye.
  • Wear eye protection whilst drilling - those hardened ultra-fine drills snap quite often.
  • Use a decent dust collection whilst sawing the PCB and drilling it
  • Keep the chemicals away from children and pets


2.3     Sensor Mounted - Ready to Experiment

The last part was drilling and adding the 0.1" headers so I could plug it into my breadboard. Hopefully this will work and only the knuckle of one of my thumbs shows any sign of yellow staining from the etchant - extra good news as I will be kneading some pizza dough bases later tonight.

The final mounted KMT32B device


3.    Testing and Results

3.1     Preliminary Tests

It took me a long time from looking at the limited datasheet to finally work out what this device could do and what the schematic meant - actually it is quite obvious now. There are two separate 'magnetic' Wheatstone bridges in the device which are built at 45 degrees to each other.

Diagram showing KMT32B with two wheatstone bridges placed at 45 degrees orientation to each other.

I could measure the voltage directly to start with across +Vo1 and -Vo1 and similarly with +Vo2 and -Vo2. I also need to find a magnet for testing this sensor....and found an old computer HDD magnet stuck to the side of my folding woodwork bench.


The datasheet details Vcc as +5v. I was able to get some readings of about 45mV on +Vo2 and -Vo2 but nothing on the other differential output. This required about 3-4 trips back out to the shed to resolder the tracks, plenty of flux and a little extra solder and finally I was able to get measurements off the +Vo1 and -Vo1 pair as well.I think the device is not quite located over the pads and the additional solder added afterwards has managed to bridge that gap.


The output voltage I believe is proportional to the supply voltage; from the datasheet a typical 11mV/V of supply would mean 55mV output is possible at 5v supply (and 33mV at 3.3v supply).


3.2     My 'Planned' Instrumentation Amplifier

To buffer and amplify these small signals I had planned to use a cascade of 741 op-amps in a similar way to how I planned to amplify the TE Connectivity load cell voltages. The circuit would be based on two op-amp high impedance buffers and those would then feed a differential op-amp circuit. The buffer amplifiers are required to also match the input impedance to the differential amplifier....unfortunately I did not order enough 741 devices.


Had I really planned ahead I could bought a much better and applicable amplifier device or I could have even asked the nice people at Texas Instruments for a few samples. A quick look at the TI products pages shows the new INA821 to be very capable.

Internals of Texas Instruments I N A 8 2 1 differential op amp

I will try and get some of these amplifiers, as after the Design Challenge finishes tomorrow I would like to push onwards and see the KMT32B working and to understand better what it can achieve.


3.3     My Actual Instrumentation Amplifier

Assuming I use the 3.3v supply from my Nucleo board (not-withstanding the additional OP-amp supply requirements) I should get 33mV out at peak. I will therefore design for a circuit gain of 100.

My two op amp instrument amplifier

The breadboard version

Although I can still get the input voltage to vary from the KMT32B I cannot get any variation on my op amp outputs. This is very interesting stuff but something I haven't really used for many years - I can see some refreshment of principles and a few rainy weekends of experimentation being required by me here! I aim to stock up on a few generic analogue devices and wait for a rainy weekend to come along.


3.4     My Plans For KMT32B

If the above circuit worked, I planned to feed the conditioning voltage into one of the ADC pins of my STM32F411RE-Nucleo board to prove to myself I could read it.


4.     My re-worked drivechain


As suggested by dougw I swapped from 4-wheel-drive to 2WD but added in the larger GT2 pulleys giving me a 4:1 reduction on the stepper speed; this would increase the torque by a factor of 4. To accomplish this I had to swap the pulleys and remake the drivebelts. I kept the two belts that worked with the 4WD setup as I could revert to that setup should this onel fail. I then reworked some older drivebelts - I'm getting quite good at stitching them together now. The strength is in the reinforced back band so we want to keep that. Adding superglue draws the plasticiser out of the rubber and makes the joint go hard - that is not good at it will fracture whilst going over the pulleys. The best option I think is to stitch the belts together. He is my method for making your own belts:


  • cut the belt to length + 25mm overlap
  • trim one end to just past a ridge
  • at the other end remove all the ridges on the 25mm overlap with a very sharp craft knife. Be careful not to cut the backing part of the belt.
  • assemble the belt with the ridges outwards, use a scrap of belt across the joint to ensure the pitch aligns correctly
  • clamp it at the joint (pliers or small bulldog clip) leaving some of the overlap clear to start stitching into
  • using a strong polycotton thread (I found some suitable thread that was still on a wooden bobbin ! ) start stitching
  • push the needle through a groove, on the back move across to align on the next groove
  • move along until about half of the overlap is stitched
  • remove the clamp
  • continue to stitch the rest

Stitched together G T 2 Diagram showing overlap and scrap alignmnet piece


The outcome of using the single wheel drive was still disappointing but I am pleased Douglas suggested it and that I tried it out, as otherwise I would have never known. Indoors the two powered wheels slipped on the carpet as well as plain tiles, partly because I opted to drive the axles nearest to the stepper motors and this is where the R2B4 is lightest. There is more weight over the other axle. Unfortunately I cannot remake the GT2 belts again as I've used up all my 4m length apart from a few scraps.

4 to 1 GT2 pulley ratio

Outside I think R2B4 got better traction as the friction between 'tyres' and the dry concrete patio was fairly high, as seen in the video below but there is still loss of traction.


I will endeavour to experiment with this chassis to see what improvements can be made. I have some non-slip matting that I plan on gluing strips of onto the wheels - that should improve the traction. I will also redistribute the weight or try getting a more modern battery pack (LiPo).


5.     A (Very Quick) Look at the TE Connectivity Temperature Sensor

I hooked my TE Connectivity temperature sensor up to my multimeter, nulled out the lead resistance and measured 108.7ohms at room temperature; I cannot really say more that that as I don't know what the room temperature was. The sun was shinning and apart from the breeze with the windows open it was quite pleasant - I would guess about 20 degrees to 25 degrees. Holding the sensor between my fingertips or breathing onto it made the resistance vary really quickly. This is due to the very small size and therefore its thermal response should be very good (e.g. no delay as the substrate heats or cools).

The TE Connectivity Temperature Sensor

Although I am not using this temperature sensor for R2B4 currently I could use it to measure the ambient air temperature so R2B4 has some 'intelligence' when the sand could be frozen and therefore unworkable. A builder should not be using sand that is frozen or partly frozen anyway. Another use would be to measure the temperature of the motors and reduce performance if they overheat to prevent permanent damage.


6.     Reference

TE Connectivity datasheet for KMT32B: https://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=KMT32B&DocType=Data+Sheet&DocLang=Engli…

The Eagle PCB homepage: https://www.autodesk.com/products/eagle/overview

The Element14 Community group for Eagle: Autodesk EAGLE


7.     Next Blog

Time for another quick update by tomorrow ? The more I think about it the more I want to get that super-grippy material on the wheels.