By continuing to use this site, you agree to our use of cookies. Find out more

Member postings for Bob Mc

Here is a list of all the postings Bob Mc has made in our forums. Click on a thread name to jump to the thread.

Thread: A bit of humour
29/09/2017 19:25:41

Ian....the cat count has changed...!! it all adds up now but it didn't before.... how did the 3 cats become 2...?

Bob.

29/09/2017 12:50:25

Ian....

am I missing something....?

it was a travesty of justice that the teacher told him he was wrong in saying the answer he gave in the second paragraph was incorrect...! but I suppose if he did have a cat at home then his answer should have been 8... so the teacher was right in saying he was wrong and Johnny was wrong as he always included the cat at home in his calculations... ... I must get out more often..

Bob..

Thread: Ardunio DRO?
28/09/2017 21:44:28

Hi Peter....

try 'Digital Caliper Remote Display' in the Keyword search title..

Rgds...Bob..

Thread: Digital caliper remote display
14/08/2017 16:22:58

Dave.....you beat me to it....!!!

14/08/2017 16:21:39

Hi Dave/Ian...

Dave .... glad to hear you have solved the problem, I was confident you would.

Ian... I know you asked Dave and perhaps he will give some advice, however if you are new to Arduino and having got hold of two LCD board I would imagine they are the LCD version 1 as mentioned in https://arduino-info.wikispaces.com/LCD-Blue-I2C.

I think it best if you get the LCD display program going first ... you need to download the library mentioned at the top of the page of the above website, then there is a small program to download for Version 1.

If you have never had a go at these displays previously please note that if you do not see any characters on the display at first or if they seem a bit dull you use the brightness control on the little piggy back I2C board.

anyway....best of luck.....Bob..

09/08/2017 12:01:01

Hi all ...John/Ken

John Haine asks about a 3rd axis display...

the program I posted could be altered for this purpose, but I can only give an indication of what would need to be done, which is to copy one of the sub programs for example 'void Read Y' and change all the Y's & y's to Z & z's

then insert an instruction to 'Read Z' after 'Read Y' was finished...and back to 'Read X' after 'Read Z' is finished, you would also have to alter the Setup & definition parts to include the inputs/outputs etc... I am not able to provide much more info as I am busy making a readout for my mill using a rotary encoder.. you would also need to find a bigger display than I used in my build.. mine could show 3 readings but only on two rows...

Hi Ken... "come a long way" .....yes I only wanted to show it could be done..! to be honest I can't remember exactly where I got the program from perhaps it would be better to wait and see what Dave comes up with as the program I posted has got a lot of superfluous material and wants thinning down, there are certainly a number of people on the www giving programs for this and it does seem the case that most of the cheap calipers are using the BCD format...Binary Coded Decimal.

One of the things that could be done in the meantime is to get an LCD display, mine is a 16x2 character lcd and find out how to write to it... that would be a good start and it is quite simple, if you can get that up and running using an arduino you are half way there... lcd's are about £5 quid on ebay.

Bob...

09/08/2017 08:46:46

Hi Duncan../..Dave..

Duncan..Yes you are right...! there are a lot of curly braces in the setup and to be honest I don't know why! but this prog was copied off the www. and since it worked I didn't see any reason to alter it apart from making it read two calipers.. I must admit again that I am certainly not an expert with programming these things, Dave seems to have a far better understanding of programming.

Dave.... you say you have fitted a capacitor to get rid of sporadic readings... I fitted mine at the caliper end which stopped a similar problem... which Neil has done as well.

..Bob..

08/08/2017 16:56:17

Hi Dave...

I can certainly commiserate with you "electronics & computers losing their appeal" .

Les is right...the trace definitely looks like a BCD format see .. http://robotroom.com/Caliper-Digital-Data-Port-3.html ...

which means you will be able to use my code..as posted.

I also didn't use the battery in the calipers rather using the +5v from the Arduino for the level shifter... and potting down the 3v3 from the Arduino for the caliper 1.5v supply using two 6k2 resistors.

The LCD I originally powered using the +5v Arduino supply but I found it caused the screen to be a bit dim....the maximum LCD volts is 7v, so rather that making a power supply circuit for this, I found a 3.3v zener and put it in series with the LCD and the 9v Battery... now its as bright as needed.

rgds..Bob..

06/08/2017 20:41:15

Thanks Dave for the lcd address program .... will definately have a look at that one.

Thanks Banders who agrees with Neil that the connector is not a good idea, I soldered mine which is a pita as the case needs taking off otherwise the plastic case will suffer...perhaps Dave will find a better solution.

Also thanks Les... I didn't know the label hides the screw...and the hack for getting a remote display from the Wixey is what I want....can't understand how I missed that... I think I will be using a rotary encoder for the azimuth display..

Anyroad up.. I have just been using my new dro and there is a small problem as it seems I selected a couple of resistors for a divider network to give the ~1.5v supply for the calipers, it now transpires that when the battery gets lower in voltage then the caliper voltage goes down as well ...obvious! ...and the readings dissapear..! so I will be removing the bottom resistor and fitting a zener perhaps or could use an LED as a regulator .. not a big problem.

Here is a pic of the dro..

...Bob..

dsc_0083.jpg

06/08/2017 17:16:48

Hi Ken, Dave, Neil ... and all...

Just a short digression... as some of you may know I have an interest in astronomy .. my scope is a 6inch binocular reflector... I have a need for a remote digital azimuth angle readout and wondered if anyone has any information for these things.... see pic.. I can't even get into the thing... or if there are any other types which have a remote readout...

below..pic of scope and below that with angle gauge in question... sorry its blurry but I think you will know the type..

rgds..Bob..

dsc_0027a.jpg

dsc_0081.jpg

05/08/2017 19:23:23

Part 2.


int i;
int sign;
long value;
float resultx;
float resulty;
int clockpinx = A2;
int datapinx = A0;
int clockpiny = 7;
int datapiny = 9;
unsigned long tempmicrosx;
unsigned long tempmicrosy;

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

void setup()
{
{pinMode(clockpinx, INPUT);
pinMode(datapinx, INPUT);
}
{
pinMode(clockpiny, INPUT);
pinMode(datapiny, INPUT);
}

Serial.begin(9600);

lcd.begin(16,2);
lcd.backlight();

{ lcd.setCursor(0,0);
lcd.print("X val mm";

lcd.setCursor(0,1);
lcd.print("Y val mm";
}


}


void loop() {
ReadX();

}

void ReadX(){

//This is for reading the caliper x data.

while (digitalRead(clockpinx)==HIGH) {} //if clock is LOW wait until it turns to HIGH
tempmicrosx=micros();

while (digitalRead(clockpinx)==LOW) {} //wait for the end of the HIGH pulse

if ((micros()-tempmicrosx)>1000) { //if the HIGH pulse was longer than 1000 micros we are at the start of a new bit sequence
decodex(); //decode the bit sequence

}
}

void decodex()
{
//this turns the binary code of x data into a decimal value.
sign=1;
value=0;
for (i=0;i<23;i++) {

while (digitalRead(clockpinx)==HIGH) { } //wait until clock returns to HIGH- the first bit is not needed
while (digitalRead(clockpinx)==LOW) {} //wait until clock returns to LOW
if (digitalRead(datapinx)==LOW)

{
if (i<20)

{
value|= 1<<i;
}
if (i==20)

{
sign=-1;
}
}
}
resultx = ((value*sign)/100.0);
lcd. setCursor(10,0);

lcd.print(resultx,4);


ReadY();
} ///END


void ReadY(){

//This is for reading the caliper Y data.

while (digitalRead(clockpiny)==HIGH) {} //if clock is LOW wait until it turns to HIGH
tempmicrosy=micros();

while (digitalRead(clockpiny)==LOW) {} //wait for the end of the HIGH pulse

if ((micros()-tempmicrosy)>1000) { //if the HIGH pulse was longer than 1000 micros we are at the start of a new bit sequence
decodey(); //decode the bit sequence

}
}

void decodey()
{

sign=1;
value=0;
for (i=0;i<23;i++) {

while (digitalRead(clockpiny)==HIGH) { } //wait until clock returns to HIGH- the first bit is not needed
while (digitalRead(clockpiny)==LOW) {} //wait until clock returns to LOW
if (digitalRead(datapiny)==LOW)

{
if (i<20)

{
value|= 1<<i;
}
if (i==20)

{
sign=-1;
}
}
}
resulty = ((value*sign)/100.0);


lcd. setCursor(10,1);
lcd.print(resulty,4);


ReadX();
}

05/08/2017 19:22:53

So... I finally finished it...

(I can't post all of this in one go on the forum) this is Part 1. Program is Part 2.

Ken did mention an IC level shifter which is a better idea, but I had a load of small signal transistors in me junk box and I was getting impatient... so just cobbled it together.

The 1.5v supplies for the calipers were simply taken from a potential divider which has a 6k2 connected to the 3v3 output of the Arduino and a 4k7 down to ground 0v ... gives about 1.4v at the mid point.

The wiring to the Arduino is best followed using the program inputs .. you will see clockpinx and datapinx and clockpiny and datapiny defined.

I used a D type connector for the two calipers.. there is not much wiring to do, I did however wire reset to zero switches in the box which just ground the reset buttons in the calipers, you would have to take the calipers apart to fit wiring and I must say it is a bit fiddly, there is not much room for manouver... or is is manouvre sorry can't spell.

One thing which was different with the Lcd I purchased was that the I2C address was slightly different but there seem to be only two addresses used.... either 0x3F of 0x27.

The program below is for use with two calipers which I just put together with a minimal knowledge of programming and copying what was on the www.

Hope you might find some of the build info useful.. if you have any questions let me know ... just don't ask me difficult questions about programming..!!

04/08/2017 20:45:08

Thanks Ken, Dave, Ian..

Yes Ian... I got an email advert this morning about the bluetooth connection app for a digital caliper... but could the idea be used in a 2 or 3 axis requirement..? .

The other thing is that I am actually only going to use one caliper on the Y axis on my milling machine as there is not much travel, however the X axis is quite long and I intend to use a rotary encoder which I purchased some time ago and am determined I am going to use it on something!

Anyway... the real reason is that I get such a feeling of satisfaction from doing things my own way and when it works and looks the part I am on cloud 9...!

Thanks for all your posts ... it is a real buzz to get appreciation.

Bob..

04/08/2017 16:55:08

Have been doing some more work soldering the Arduino Nano and level shifting components on the pcb, this is done prior to fitting the pcb in the box, I am 'hot glueing' the LCD and veroboard pcb in place, it can be removed if necessary with a bit of heat .

I will be trying this set up using a caliper for the 'y' axis only ... I intend to use a rotary encoder for the 'x' axis, and as you are only interested in one axis display I won't be showing any of the rotary encoder workings.

pic below.... the pcb component side .. minus transistors...you may note I have two sets of components either side of the Arduino, this is initially for the two sets of level shifters ie, one for 'x' axis calipers and one for 'y' axis caliper.. for a single axis you obviously only need to have one set of these.

dro pcb1.jpg

Below ... the other side but not yet cut the tracks .

dro pcb2.jpg

Below...I cut out a slot to take the Arduino mini usb port and trial fitted the board.

pcb trial fit in box.jpg

So... its coming on... hope to have it up and running in a day or two...and let you see the program ... just hope all Arduino experts are not looking... but hey who cares ! ... so long as it does what it is supposed to do.

..Bob...

03/08/2017 10:39:32

Hi Ken..

now finished front panel apart from fitting Arduino and small pcb level shifter board... as below..

front panel 1.jpg

lcd fitted.jpg

Above ^ the blue square is the lcd brightness control.

front panel 2.jpg

02/08/2017 17:02:35

Due to the success of this DRO used on my lathe, I have decided to make another for the milling machine... so will chart my progress..

I must add that the calipers I used are the cheap ~8inch variety which seem to produce the right data format for the program I use, BUT... I can't say that the same format will be the same with any others ! ... I have used the program on four sets of calipers now and they work perfectly well.

The Level shifter circuit as previously mentioned..below..

level shifter.jpg

In Block Diagram I showed a 'low volts psu' this can be dispensed with if the battery is kept in the calipers; In my original design I used a separate supply as per the block diagram but found that a small capacitor about 33uF was needed to cut down on noise pickup which affected the readings.

The Box.

As mentioned I used a double mains outlet socket ... I found the MK modern style variety to be quite smart as it has a slight slope on the front... no I don't work for MK ... the material the box is made of is some sort of plastic and mills quite easily but does produce some dust, ...Wear A Mask ... some of the ribs inside the blanking plate need to milled off ... see pics.

About to be milled.

blanking plate before.jpg


After milling out.

blanking plate after.jpg

Well let me know if you want any more information.

rgds..Bob.

Thread: Lathe tools - what are these for?
01/08/2017 11:35:08

They are obviously Scrummage Horn dePhlogistifiers..

Thread: Digital caliper remote display
01/08/2017 10:53:01

Hi Ken...

the diagram below shows the main items and gives an overview of how they are connected up, I used an LCD with 'Serial' connection as this is a lot easier to wire up and program ... you can find them on ebay

One point I must address is that the dro unit gets all its instructions from the calipers and if the calipers are not adjusted within a few minutes then they switch off, consequently you can lose the position setting you had...but this is what happens normally with the calipers.

http://www.ebay.co.uk/itm/I2C-LCD-Display-1602-Blue-For-Arduino-Pic-Pi-/263112246526?hash=item3d42b644fe:g:cK0AAOSwvihY~Fh9

Will post the level shifter circuit next.

Overview diagram.. ...

Arduino dro block diag.

31/07/2017 19:50:26

Hi Ken...

I don't know about the Arc digital displays but it seems as if these products are made to be hack-use unfriendly on purpose..

As far as using an LCD display...yes certainly... a single axis reading should be easy enough, it is fairly straightforward to connect the calipers to wiring for the Arduino although if you wanted to have a remote reset to zero then the connection is more of a problem and probably best left alone... you can reset using the calipers button.

The main issues with connecting up to a remote display are ... setting up an LCD display...changing the voltage levels from the caliper to the Arduino...finding a program for the Arduino.. and fitting LCD and gubbins in a box, I use a 9v battery but make sure it's switched off when you finish..!

I will have to go and find the relevant information but will come back to you... in the meantime you will need to download the Arduino files to your pc.

It would help if you got a cheap Arduino Nano or any other Arduino to play about with.. these are available on ebay with the cable which connects your pc to it..

The voltage level changing I mentioned will require some soldering of two transistors and some resistors to a pcb... there are only 6 or so components so bear in mind that there is some hands on electronics required.

will be back....Bob...

Thread: Harold Hall's Advanced Grinding Rest
30/07/2017 10:51:32

Grinding jig end view I didn't need to make the grinding rest since I already had something very similar, but I did make the End Mill sharpening jig ... however I thought that the original design was over complicated and I dispensed with the bushes fitted to the MT2 collett holder and the bush for the probe rest... I also cheated by purchasing an MT2 collett holder with 1" straight sides, so all I needed to do was drill through the end to fit the collett securing screw.

You may also see that I did not make the locating fitting on the end as in the original, that also seemed a bit over complicated, so I just made a wheel with countersunk locating holes which an M6 screw fitted into, the end of the screw is turned to a slightly larger angle than the countersink giving a positive lock, this fitting is only used when grinding the end of the milling cutter.

When the collett holder is required to rotate as in sharpening the flute edges, the end wheel is taken off and and re-fitted 180 degrees back on the collett holder, a small step turned on the wheel for about 3mm stops the wheel from touching the M6 locating screw as mentioned previously.

Well...it works ok... Bob..

Grinding jig side view

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
JD Metals
emcomachinetools
Eccentric July 5 2018
MIDLNDS GARDEN RAIL Jan 2022
cowells
rapid Direct
Warco
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest