Tim's Electronic Point Mapper [3D]

by Palingenesis in Circuits > Tools

14657 Views, 139 Favorites, 0 Comments

Tim's Electronic Point Mapper [3D]

Tim's Electronic Point Mapper [3d]

This is the final part of my Hall-Effect Trilogy.

It is best to read the first and second part, if you haven't first:

In this instructable I will be using three 49E Sensors, each with two magnets in the same way I used them with the Dividers and Pantograph.

A 3D Printer is needed for this one, as the accuracy of construction is definitely a key element.

I will be using an Arduino NANO as before with an LCD to show coordinates, and of course to do something practical with the output an application is required to give a graphical representation of the data.

  • I have modified my application so it can receive data from both the Pantograph and the Point Mapper.

This project requires:

  • The basic understanding of the Arduino Platform.
  • For manipulating the data, some knowledge of point maps.

Apologies for the sound in the video, being old and going deaf, I didn't realize the music was loud.

I have had a go at adding Sub-Titles / Closed Captioning.

Supplies

49E Hall-Efect Sensor.png
Magnets 5x5x2.png
Arduino_NANO.png
1602 LCD front w I2C.png
1602 LCD back w I2C.png
Dupont Cable.png
DuPont_Kit.png
Button_6x6.png
Bambo_D8.png
Hardboard.png
Screws.png
Bar.png
My 3D Printer 1200x1000.png


Three 49E Linear Hall-Effect Sensor.

Six  Neodymium Magnets. Width: 5mm, Depth: 5mm, Height: 2mm. (North/South is in the 2mm direction)

A tool to find the poles of the magnets. I used my phone with an application.

Arduino NANO.

1602 Display with an I2C Interface. (PCF8575 Adapter)

Cable

Push Button 6mm x 6mm x 5mm Through hole.

Seven 8mm diameter rods, various lengths.

Lots of M1.7x6mm Self Tapping Screws.

  • All screws used are this size.
  • I usually get bags of 500 at a time, they are a very useful size.

3mm diameter rod. 30mm long.

  • To make a stylus.
  • Can be steel, brass, aluminium, or similar hard wearing material.

A sheet of 3mm Hardboard.

  • I used what I had which was 285mm X 380mm. But thicker would be better, I explain later.
  • This will be the minimum size needed.
  • A very stiff stiff board is best.

Some Glue, I use UV resin.

3D Printer is required to print the parts for the Point Mapper.

  • Attached are the STL Files.

Multi Prints:

  • Board Stiffeners A 3 off
  • Pad B 2 off
  • Clip Square 2 off
  • Pivot Magnet Holder 2 off
  • Arm Stop 3 off
  • Arm Pivot 6 off
  • Link 2 off
  • Arm Magnets Holder B 2 off
  • Arm End C 2 off
  • Arm Magnets Holder C 2 off

The Base

Board Components.png
Board Dims Work Centre.png
Board Dims Reinforcement 01.png
Board Dims Reinforcement 02.png
Board Dims Arduino.png
Board Dims Supports.png
Board Dims Turntable Switch.png

I have used the same board I used for the Pantograph.

  • But I recommend using something stiffer, if you use something stiffer and stronger, you will not need to reinforce the board like I have had to do.
  • I will continue the way I have Built it though.

The dimensions for all the holes are as shown, I have split the images to that it is clearer to see which holes are for what:

  • Main board size, all dimensions will be from the centre of the turntable.
  • Reinforcement 01 (2mm Dia.) You may want to check your prints for shrinkage with these holes.
  • Reinforcement 02 (2mm Dia.) You may want to check your prints for shrinkage with these holes.
  • Arduino Support (1.2mm Dia.) The location for this is not critical.
  • Support Feet (1.2mm Dia.)
  • Turntable and Switch (1.2mm Dia.) The location of the Switch is not critical, you may prefer it on the opposite side of the board.

If you have difficulty marking out the two holes for the Quadrant clamp, you can do these after fitting the Turntable.

I have also attached a DXF file for the board.

Downloads

Fit Reinforcement

Fit Stiffeners A.png
Fit Stiffener B.png

My board needed reinforcing to stop any flexing in the board.

  • If you are using the same board you will need to do the same.
  • If you have some stronger, stiffer board, then you can miss this part.

Note!

  • Check for shrinkage before drilling holes for these.
  • If there is some shrinkage, adjust the holes around the centre of the turntable centre.
  • You may want to do a trial fit of Support Stiffener B into the Support Stiffener A's to check shrinkage in the other direction.

Attach three Support Stiffener A's to the under side of the board.

Then fit the Support Stiffener B.

Base Components

Fit Turntable.png
Fit Support Feet.png
Fit Arduino Mount.png
Fit Quadrant Clamp.png

All the pieces that are secured to the Board can be attached at this time.

First fit the Turntable using the Centre Hub.

  • After fitting make sure it turns freely and does not foul any of the screws holding the reinforcement screws.

Fit the three feet for the support legs.

  • One Pad A
  • Two Pad B

Fit the Arduino Support.

  • You may want to place this in an other location.
  • It is not critical where the Arduino is placed. (I will be giving lengths of cable for where I put it.)

Fit the Quadrant Clamp.

  • If you had difficulty making the holes for this, just align it with the notch on the Turntable.
  • Make sure the Turntable is set square with the board and put the holes where the Quadrant Clamp sits.

Next is the switch, but we need to assemble it first.

Switch Assembly

Switch Assembly.png
Arduino Brakeout Board.png
Switch with Debounce_bb.png
Switch with Debounce_schem.png
Fit Button.png
Switch Assembly Under.png
Switch Assembly Under Glue.png
Fit Switch Assembly.png

As before I will be using a Arduino NANO/UNO Breakout board to mount my Arduino NANO.

  • All the pins are bokken out with a Ground and Power Pin.

With the Pantograph I used an adapter to make a De-Bounce Circuit for the Switch.

  • As I am making quite a large Switch Assembly this time.
  • I am going to incorporate the De-Bounce Circuitry into the Switch Assembly.
  • This means it will require three wires like the sensors. Power, Ground and Data.
  • It will end up with a three pin plug that will plug onto the board just like the sensors.

The switch assembly is made from two plastic parts.

  • Button Mount
  • Button
  • Screw the two parts together.

Fit a 6x6x5mm push Button into the hole under the plastic Button.

  • The hole is designed for a button that is 5mm high.
  • if your button is lower then add some packing.

I was able to solder the De-Bounce Circuitry in the underside of the assembly.

  • After fitting the components I used my Glue Gun to fill the underside and seal the components in.

A Tip!

  • Place a piece of wax paper/grease paper (the non-stick stuff used in cooking) on a flat surface.
  • A piece bigger than the Switch Assembly.
  • While the glue is still hot inside the Switch Assembly. (Don't over fill)
  • Quickly place the Switch Assembly (Glue Down) on top of the grease proof paper.
  • Push down hard to flatten the glue inside.
  • Wait to cool.
  • Peal off the paper.
  • Your left with a perfect finish underside of the Switch Assembly.

The cable should be about 300mm long.

  • If you want to place the switch in an other location, make the cable length to suit.

Fit the Switch Assembly to the Board.

I have done a Fritzing of the De-Bounce Circuitry.

Rods

Bamboo Rod.png

I am using 8mm Diameter Bamboo rods I got of eBay.

  • There is no reason why wooden dowel/rods can be used in stead.

The rods are various lengths most with holes 6mm from the end to secure them into sockets.

  • One Rod "A" = 270mm long.
  • One Rod "B" = 270mm long.
  • One Rod "C" = 190mm long.
  • Two Rod "D" = 160mm long.
  • Two Rod "E" = 172mm long.
  • Two Rod "X" = 12mm long no holes.

I do not drill the pilot holes until I have the rods in place.

  • The holes in the plastic parts for fixing the rods in place are the size of the pilot hole, to keep accuracy.
  • I use the hole in the Plastic Part as a guide for drilling the pilot hole in the Bar. Once every thing is aligned.

The Support

Fit Rods ABC.png
Fit Back Support Bracket.png
Fit Pivot Support Btacket.png
Fit Pivot Support Frame.png

Um, yes, well, I admit I messed up a little here, but all is fine, it can be improved another day.

  • Originally I was going to use the same board because I thought I could have both the Pantograph and the Point Mapper on the same board.
  • As I started creating the support I made it so that the Pantograph could be used as well.
  • This is why all the support is on one side.
  • As I progressed and iterations took place, I realized I should have started from scratch.
  • So this is the reason it is the way it is.

Fit Rods "A", "B" and "C" in place.

  • Drill the Pilot holes.
  • Fit screws, one screw in each is enough, but two can be fitted.

Fit Back Support Bracket and Back Support Bracket Clamp

  • Fist slide the Back Support Bracket on top of Rod "C", make sure it is all the way to the stop.
  • Then Screw the Support Bracket Clamp to the Support Bracket.
  • Make sure Rod "A" and Rod "C" look parallel viewed from the front.
  • Drill pilot hole in top of Rod "C" and fix with screw.
  • Make sure Rod "A" is set 90 degrees to the Turntable.
  • Drill pilot hole through the Support Bracket Clamp and fix with screw.

Fit Pivot Support Bracket and Support Bracket Clamp

  • Fit the Pivot Support Bracket to the end of rods "A" and "B", make sure the rods are seated to the stops.
  • Attach the Support Bracket Clamp with four screws.
  • Looking down, Make sure the Pivot Support Bracket is aligned parallel with the front of the board.
  • Drill the pilot holes in the end of rods "A" and "B" and fix with screws.

Fit Pivot Support Frame

  • Fix in place with three screws.

Next will be the Pivot Magnet Holders, but we need to prepare them first.

Pivots and Stops

Arm Pivot.png
Pivot Magnet Holder.png
Arm magnet Holder B.png
Arm magnet Holder C.png
Arm Stop.png
Mark North.png

The Pantograph had only one Arm Pivot/hinge per sensor joint.

  • The Point mapper needs to be much more rigid in the axis it is not to move.
  • So I am using two Arm Pivot pieces set apart per joint to make it more stable.
  • Only one of the Arm Pivots per joint will require a sensor, magnets and a stop. The stop does not need to be on the sensor Arm Pivot.

All the Arm Pivot pieces are the same. Six are required.

  • The Magnet holders are not the same.
  • There are two Pivot Magnet Holders, These are easaly identifiable.
  • There are two Arm Magnets Holder "B", Very similar to type "C"
  • There are two Arm Magnets Holder "C", Very similar to type "B"
  • To Identify which is which type "C", it has an extra hole. (The hole is not used)

Each joint will require one stop.

At this time it is best to mark a "N" for north on the underside three of the Arm Pivot pieces.

  • This is not for when you add the magnets. When adding magnets the Arm Pivot pieces can be rotated 360 degrees.
  • It is for when you assemble the Arms together.
  • North is determined by the shape of the sensor hole. See image.
  • Only mark three, these are the three to use with magnets. This is so you know which have magnets later.

Pivot Assembly

Magnet Orientation 001.png
Magnet Orientation 002.png
Magnet Orientation 003.png

The Pivot Assemblies are similar to the Pantograph.

  • Magnet orientation needs to be correct

Magnet orientation is as show in the sketches.

  • As a rule, the North Pole should point away from the split end.
  • As before, I used an application on my phone to find the magnets poles.
  • Before fitting, check that the magnets fit in the groove, there is an overlap that may need fettling after printing.

As before, because the Magnets are so close together, I have made the Magnet Holders spreadable, to aid construction.

Once the Magnet Holders are in place over the pivot piece, the loose ends of the Magnet Holders are clamped together using a small screw.

You may want to spin the parts around each other to bed in the assemblies, to get a good smooth fit.

There six to make.

  • Three types/pairs.
  • Only one of each pair has magnets. Use the three Arm Pivots you have marked with an "N" for those with magnets.

So that's three with magnets and three without magnets.

Stops

Stop Orientation 001.png
Stop Orientation 002.png
Stop Orientation 003.png

Only three Stops are required.

  • Note the orientation in the images.
  • The stop for the Pivot Magnet Holders, goes on the one without magnets.
  • The stop for Arm Magnets Holder "B", goes on the one with magnets.
  • The stop for Arm Magnets Holder "C", goes on the one with magnets.

The North Arrow indicates the direction of the Arm Pivots that are marked underneath.


Sensors

Sensor Check.png
49E Hall-Efect Sensor 002.png

Sensors need fitting to the Pivots that have magnets.

  • Those that have magnets should be identified by the ones that have "N" marked on the underside.
  • The Sensor orientation is identified by the shape of the hole in the Arm Pivot.
  • I have made a piece "49E_Position_Check" to check that the sensor is all the way in the hole.
  • Some glue where the pins pass through the plastic should stop the sensors moving.

When sensors are fitted attach Cable.

  • For this I have used 32 SWG Servo Cable.
  • Cable for the Arm Magnets Holder "B" Sensor is about 450 long
  • Cable for the Arm Magnets Holder "C" Sensor is about 650 long
  • Cable for the Pivot Magnet Holder Sensor is about 450 long

Attach DuPont plugs to the end of the cables.

First Arm Pivot

Fit Arm Pivot Support.png

Fit the Arm Magnets Holder "B"s to the Arm Pivot Support.

  • Note the orientation.

First Arm

Fit Bamboo First Arm.png

Fit rods type "D" into Arm Magnets Holders "B" on the First Arm Pivot and the Arm End "B".

  • Make sure correct orientation as shown.
  • Place the Assembly on a flat surface, to ensure all is aligned correctly.
  • Make sure the rods are seated firmly to the ends of the sockets.
  • Hold everything in place and drill the pilot holes and fit screws.
  • You will have to do one side at a time.

Second Arm Pivot

Fit Second  Arm Pivot.png

Fit the Arm Magnets Holder "C"s to the end of the first Arm.

  • Note the orientation.
  • Only two screws are used on each.

One side will later be removed to fit the Alignment Link.

Second Arm

Fit Arm End C.png
Fit Bamboo Second Arm.png

First join the two Arm End "C" together with a Rod type "X" in between.

Fit Rods type "E" into Arm Magnets Holders "C" on the First Arm Pivot and the Arm End "B".

  • Make sure correct orientation as shown.
  • Place the Assembly on a flat surface, to ensure all is aligned correctly.
  • Make sure the rods are seated firmly to the ends of the sockets.
  • Hold everything in place and drill the pilot holes and fit screws.
  • You will have to do one side at a time.

Stylus

Stylus.png

I have use the same Stylus I used for the Pantograph.

  • It doesn't matter what metal you use, what ever you have and can work with.
  • The diameter of the bar needs to be 3mm.
  • The overall length is 30mm.
  • The flat is optional.

Stylus Head

Fit Sylus.png
Fit Sylus Head.png

Fit the Stylus into the Stylus Head

  • Make sure that it is up to the stop.
  • The length is important.

Fit the Stylus Head in between the two Arm End "C"

  • Remove the two screws that hold the two Arm End "C" together to do this.
  • There should be Rod type "X" in between that holds the Stylus Head in place.
  • Fix the two Arm End "C" back together.

Link Pivot

Fit Align Link B.png

Fit the Align Link Pivot B

  • To do this you will have to remove two screws holding one of the Magnets Holder "C" in place.
  • Fit the Align Link Pivot B using a Rod "X" to hold it in place.
  • Fix the Magnets Holder "C" back in place.

Pivot Magnet Holders

Fit Arm Pivots.png

Fit the Pivot Magnet Holders to the Arm Pivot Support.

  • Note the orientation.
  • Note the one with magnets and sensor has no stop.
  • Be sure the Marked "N" is pointing away from the Slotted End of the Magnet Holder.

Link Bracket

Fit Align Link A.png

Fit the Align Link Pivot A

  • Link Pivot A fits on top of the Arm Stop


Links

Fit Align Links.png

Both links are the same.

  • Attach them to the Link Pivots.

Finish Assembly

Fit Arms.png

The arms can now be attached to the supports.

The Circuit

Arduino.png
Tims Electronic Point Mapper_bb.png
Tims Electronic Point Mapper_schem.png

I have done the Circuit in Fritzing.

  • I have done the cabling on mine with 32 SWG servo cable.
  • I am using an Arduino NANO breakout board, it has rows of Power, Ground and Data pins.

Fritzing attached and PDF versions.

The Code

Arduino IDE.png

I assume that if you have an Arduino NANO you have experimented with it and have been to Arduino.cc site to learn things about it.

If this is your first time using a Device with the Arduino Architecture, then first go here: Arduino IDE 2 Tutorials

  • Here you can download the Arduino IDE and there are tutorials from the very people who created Arduino.
  • The tutorial show how to upload a sketch to a device.

Below is the code.

  • I have attached the Sketch "Tims_Electronic_Point_Mapper.ino" so you can download it.
  • When you download the Sketch, you need to put it in a folder with the same name without the ".ino".

Calibration [DEBUG Mode]

Serial Clibration.png
Debug LCD.png

There are a few steps to Calibrate the Point Mapper.

The first step is to load the code to the NANO in DEBUG mode.

  • We do this by making sure line 29 #define BEBUG is uncommented.
#define DEBUG								//	Activates Debug Serial Printing. (Comment out to turn off DBUG)
  • Make sure the code is correct and upload it to the NANO.
  • Start the "Serial Monitor" in the Arduino IDE.
  • Values of the Sensors should be being sent to the "Serial Monitor"
  • Also it should say DEBUG in the bottom right of the LCD. If you press the button, this will get over written.

Calibration [First Pass]

Arduino IDE Calibration.png
Calibration 001.png
Calibration 002.png
Calibration 003.png
Calibration 004.png
Calibration 005.png
Calibration 006.png

When taking readings, move the arms all the way to the stops.

If the Values of the Sensors are the wrong way around Large-Small. Then the magnet orientation is the wrong way around.

Small Value of hall-effect sensor 1 at 45 angle.

  •  Move 1st Arm (inner) Up.
  • Enter the value at the line for: #define CAL_HALL_45D_01 (Change value 310)
#define CAL_HALL_45D_01		310	//	Small Value of hall-effect sensor 1 at 45 angle. Move 1st Arm Up.


Large Value of hall-effect sensor 1 at 135 angle.

  • Move 1st Arm (inner) Down.
  • Enter the value at the line for: #define CAL_HALL_135D_01 (Change value 768)
#define CAL_HALL_135D_01	768	//	Large Value of hall-effect sensor 1 at 135 angle. Move 1st Arm Down.


Small Value of hall-effect sensor 2 at 45 angle.

  • Move 2nd Arm (outer) away from 1st Arm.
  • Enter the value at the line for: #define CAL_HALL_45D_02 (Change value 303)
#define CAL_HALL_45D_02		303	//	Small Value of hall-effect sensor 2 at 45 angle. Move 2nd away from 1st Arm.


Large Value of hall-effect sensor 2 at 135 angle.

  • Move 2nd Arm (outer) close to 1st Arm.
  • Enter the value at the line for: #define CAL_HALL_135D_02 (Change value 766)
#define CAL_HALL_135D_02	766	//	Large Value of hall-effect sensor 2 at 135 angle. Move 2nd close to 1st Arm.


Small Value of hall-effect sensor 2 at 45 angle.

  • Move Arms to (both) the Right.
  • Enter the value at the line for: #define CAL_HALL_45D_03 (Change value 265)
#define CAL_HALL_45D_03		265	//	Small Value of hall-effect sensor 3 at +45 angle. Move all the way right.


Large Value of hall-effect sensor 3 at 135 angle.

  • Move Arms (both) to the Left.
  • Enter the value at the line for: #define CAL_HALL_135D_03 (Change value 825)
#define CAL_HALL_135D_03	829	//	Large Value of hall-effect sensor 3 at -45 angle. Move all the way left.


Important

After changing the values, upload the code again to the Arduino NANO before the next step.

Calibration [Second Pass]

Serial Clibration.png

We can now use the values the NANO calculates for the 0 (zero) and 180 degree positions.

Small Value of Calculated hall-effect sensor 1 at 0 angle.

  • Enter the value at the line for: #define CAL_HALL_0D_01 to the value given for: Sensor 1 Calculated 0 value: 215.15
  •  Your value will be different. (Change value 215.15)
#define CAL_HALL_0D_01			215.15		//	Value created by NANO.


Large Value of Calculated hall-effect sensor 1 at 180 angle.

  • Enter the value at the line for: #define CAL_HALL_180D_01 to the value given for: Sensor 1 Calculated 180 value: 862.85
  • Your value will be different. (Change value 862.85)
#define CAL_HALL_180D_01			862.85	//	Value created by NANO.


Small Value of Calculated hall-effect sensor 2 at 0 angle.

  • Enter the value at the line for: #define CAL_HALL_0D_02 to the value given for: Sensor 2 Calculated 0 value: 207.11
  • Your value will be different. (Change value 207.11)
#define CAL_HALL_0D_02			207.11		//	Value created by NANO.


Small Value of Calculated hall-effect sensor 2 at 180 angle.

  • Enter the value at the line for: #define CAL_HALL_180D_02 to the value given for: Sensor 2 Calculated 180 value: 861.89
  • Your value will be different. (Change value 861.89)
#define CAL_HALL_180D_02			861.89		//	Value created by NANO.


Small Value of Calculated hall-effect sensor 3 at 0 angle.

  • Enter the value at the line for: #define CAL_HALL_0D_03 to the value given for: Sensor 3 Calculated 0 value: 148.19
  • Your value will be different. (Change value 148.19)
#define CAL_HALL_0D_03			148.19//	Value created by NANO.


Small Value of Calculated hall-effect sensor 3 at 180 angle.

  • Enter the value at the line for: #define CAL_HALL_180D_03 to the value given for: Sensor 3 Calculated 180 value: 945.81
  • Your value will be different. (Change value 945.81)
#define CAL_HALL_180D_03			945.81		//	Value created by NANO.


Calibration is now done

  • We can now take it out of DEBUG Mode.

In the code comment out #define BEBUG.

//#define DEBUG										//	Activates Serial Printing. (Comment out to turn off DBUG)

Upload the code to the Arduino NANO.

The Software

Software 001.png

I have Made an application to give a visual representation of the data collected from Tim's Electronic Point Mapper.

  • I have placed the installation files on my Google Drive.
  • It is a modified version of the program I wrote for "Tim's Electronic Pantograph" Hence it's Name.
  • Tims_Electronic_Pantograph.zip
  • It has been modified so that it can be used with both projects.

Don't try to run the install from within the ZIP File.

Unzip to a place of your choice and run the setup.exe form the un-zipped location.

  • If you have the previous version installed, make sure you unzip the files to the same location.

I have done this It's About Trust. You may want to read before downloading my software and installing it.

Lets Copy Something

Tims Electronic Point Mapper 001.png

The video shows it best.

Have the software "Tim's Electronic Pantograph" installed and running on your computer.

Plug in the Tim's Electronic Point Mapper [3D] into a USB port on your computer.

In the software select the USB Port you are connected to, set the Baud Rate to 115200 and click connect.

Set the option for "Tim's Electronic Point Mapper".

We should be set to go.

Place an object or whatever you want to copy in the work area, fix it so it does not move.

Press the button to change from Pen Up and Pen Dawn.

It is best to have the software set to "Auto mode".

The max "Scale" is 3 to 1.

The "Line Length" determines how often it draws a line.

The "Data" window will produce G-Code or Points Data that can be used with other software, so you can reproduce what's on the screen.

  • Best to use Point Option.

If switch to pen down, then trace over the object you have, it should reproduce your movements on screen.

Points

MeshLab 001.png

This is the first time I have written any software that handles 3D imagery.

  • It does not use direct X or Open GL, it is fairly basic.

The Points can be saved to a TEX file and imported to a more professional program to use.

MeshLab will import the points:

  • After copying the Points Data and saving to a TXT Document.
  • Open MeshLab and Create New Empty Project.
  • Select "File" =>> "Import Mesh..." or "Ctrl+I".
  • Select the TXT File you created.
  • A new Window will open "Pre-Open options".
  • Change "Separator" to "SPACE".
  • Click OK button.
  • The Points will be added to your project.

I don't know a lot about MeshLab so I can't say any more about it.

A Better Support

Better Support.png

Thought I would just add how I would improve the support if I had the resources.

  • What I have is a little wobbly, it could do with something with more rigidity