. .
Page 6 of 8 FirstFirst ... 45678 LastLast
  1. #51
    Quote Originally Posted by 1113562 View Post
    OK Bill, I will do a controlled test of my BCD vernier to get the sequence and report back. I'll just code up a simple pulse generator in one of the PICs.

    Cheers, John
    OK I have done a test on the BCD vernier which is a Workzone 6" bought from Lidl or Aldi, can't remember which. I have attached an image of the state diagramClick image for larger version. 

Name:	VBCD Vernier State Diag.jpg 
Views:	400 
Size:	34.4 KB 
ID:	2203.

    It starts always at power up in Slow Read mode. To get from switch on to Fast Read (F.T) needs a Data then a Clock Pulse. To Zero at power up on route to F.T then its Clock then Data then Clock. When in F.T. to Zero needs a Data then CLock then Data then Clock. There are other states as shown in the diagram that are of no interest to our use I suggest.

    John.

  2. #52
    Quote Originally Posted by z3t4 View Post
    Hi Chaps
    This problem of the multiplicity of digital verynear] protocols has been discussed at some length on Scott Shumate's group on Yahoo:http://groups.yahoo.com/group/ShumaTech/

    The Spherosyn and Mitutoyo protocols are especially, er, non-trivial, but some of the newer ordinary calipers are not easy to decode, either. The C-code for the decoding and autoselect algorithms for his 'OpenDRO' are open source on Sourceforge here:
    https://opendro.svn.sourceforge.net/...dro/trunk/src/
    so it might be worth a look. Can't help directly, 'cos I know SFA about programming.

    -- 'course, you prob'ly know all this anyway, in which case apols -- suck eggs--- etc.

    Cheers,

    John


    § ŠJS
    Hi John. Whats the message number of the thread that discusses different protocols on that Shumatech forum? I had a quick look but couldn't find it. Loads of stuff on positive earth grounding etc.

  3. #53
    z3t4's Avatar
    Lives in Manchester, United Kingdom. Last Activity: 27-01-2024 Has been a member for 9-10 years. Has a total post count of 31.
    Quote Originally Posted by 1113562 View Post
    Hi John. Whats the message number of the thread that discusses different protocols on that Shumatech forum? I had a quick look but couldn't find it. Loads of stuff on positive earth grounding etc.
    Try 17121. It's worth doing a search on 'protocol' and seeing what comes up. I think a look through Scott's code on Sourceforge might yield more than the forum, though.

    HTH

    John


  4. #54
    Quote Originally Posted by 1113562 View Post
    OK I have done a test on the BCD vernier which is a Workzone 6" bought from Lidl or Aldi, can't remember which. I have attached an image of the state diagramClick image for larger version. 

Name:	VBCD Vernier State Diag.jpg 
Views:	400 
Size:	34.4 KB 
ID:	2203.

    It starts always at power up in Slow Read mode. To get from switch on to Fast Read (F.T) needs a Data then a Clock Pulse. To Zero at power up on route to F.T then its Clock then Data then Clock. When in F.T. to Zero needs a Data then CLock then Data then Clock. There are other states as shown in the diagram that are of no interest to our use I suggest.

    John.
    This version of Vernier seems to be virtually the same state diagram as that on the YADRO site but they do not show some of the hold states.

  5. #55
    Quote Originally Posted by BillTodd View Post
    Hi John,

    Ok I found some time this morning to look at my other verniers...

    There seems to have been an explosion of vernier types since I wrote the PIC code; I have half a dozen different verniers here with five different output formats! (including Mitotoyo, which is completely different) With your two that makes at least six 'chinese' formats. I have a one I bought in the USA with fractional inch display (very handy) that outputs fast 25mS pulses and, like your Aldi one, does not respond to clk or data switching.

    I think the best way forward, is to drop the automatic device detection from the PIC code and add some manual set up commands and a configuration page to the VB prog. (I want to add a DRO to my Haighton at sometime so it is something I will have to sort out).

    It would help, to know the switching sequences for your BCD one, so if you get the chance to work them out.... :)

    Bill
    Just to get the record straight, I found by inspection that I had reversed clock and data from the vernier to the PIC processor inputs. A BASIC SCHOOLBOY error. On correction of the error Bill's HARDWARE & SOFTWARE works perfectly with dead stable values on the PC display and also fast update rate. Its a neat and dead cheap solution if you have a PC to hand with a serial COM port.

    I'm now going to sort out 2 more verniers that respond to clock and data mode pulsing so I can get X Y & Z working simultaneously. I'll then make a proper PCB for the interface rather than a veroboard prototype to make it a bit more robust. The next step will be to get it all installed on the mill with the full length PCB beams for each axis.

    A big thank you to Bill Todd, he is a genius and a gentleman in equal proportions.

  6. #56
    ecat's Avatar
    Location unknown. Last Activity: 08-02-2014 Has been a member for 9-10 years. Has a total post count of 157. Received thanks 5 times, giving thanks to others 8 times.
    Bill, many thanks for your design, I have it built and almost working...

    Set up just now with a single PIC in the X position, no callipers connected. The PIC appears to respond to commands, i0 returns data, zx flashes the LED and returns data and then a little more data if I stroke the board. Problem is the returned data is garbled though strangely repeatable.

    I've tried two different PNP's 2n5401 and bc556.

    I've tweaked the base resistor, 12k and 6k.

    As my LED was producing about 1.9v (1) it left only 3v to drive the TX which is a little too close for comfort. I've swapped out the psu LED for a diode string giving about 1.5v/3.5v but data corruption remains identical.

    I am using a Prolific USB to serial adaptor, think this could be the problem?

    (1) 1.9v worries me as this will power the callipers, should be ok? I can always substitute little diode chains to bring the volgate closer to battery spec.

  7. Hi ecat,

    Make sure your terminal is set to receive 115,200 baud, 8 bit, no parity, 1 stop bit. You may have to force DTR (pin4 to -ve) in order for the interface to work, since it supplies the negative for the Txd line.

    The USB serial port is the same as I use here.

    As long as there's about 5v across the PIC, the comparitor thresholds should be OK (I think John found that his 3v powered vernier put out 1.5v data)

    Bill
    Last edited by BillTodd; 06-12-2010 at 09:09 PM.

  8. #58
    ecat's Avatar
    Location unknown. Last Activity: 08-02-2014 Has been a member for 9-10 years. Has a total post count of 157. Received thanks 5 times, giving thanks to others 8 times.
    Thanks for the reply,

    Comms settings are good, the PIC appears to receive the correct data.
    DTR is negative volts

    An example of the reply to i0, in hex :)

    0918 0820 0802 494E 4162 7908 094E 4340 ..INAby.NC@
    3A

    And zx command

    0018 3A
    0318 3A02 103A ::

    looks like I have a bit missing, literally.

    1.9V power to the callipers is ok?

    Anyway, back to playing :)

  9. Can you check the PIC is running at 4MHz? And that the trim byte is correctly set (my code may be using the wrong value).

    Try pulling GP4 high with a 10k resister (it should use the internal weak pull-up but...)

    >1.9V power to the callipers is ok?
    As long as the scale works at that voltage and the output signal is about 1.5v peak, it should be OK.

    If there is a scale connected, Zx should respond withRx: ( the colon : is used as the line terminator) and Ix should respond with Ix,[mode number e.g. 0],[vernier type string Decimal or Binary], [measuement type Inch or MM]:

    Without a scale it should send Nack (15h) each time the watchdog times out.

    Have you tried it with a scale connected?

    Bill

  10. #60
    ecat's Avatar
    Location unknown. Last Activity: 08-02-2014 Has been a member for 9-10 years. Has a total post count of 157. Received thanks 5 times, giving thanks to others 8 times.
    Thanks again Bill, I'll check the speed and try the pullup.

    The Zx reply was quite easy to work out :) As you can see in from the two sample replies in my previous post, Rx: appears as 0018 3A and Ix, appears as 0918 08. 'x' appears consistent, returning 18h, ':' is 3A which is correct, ',' appears as 08h.

    Consistent, by this I mean that consecutive replies to a given request are often the same, or they fall into a pattern. Over time the values and patterns do change, with the possible exception of the ':'. Looks like a baud rate or level issue, or my Prolific is marginal.

    No scale connected until I stop messing around and verify 1.9v operation, too costly to risk. What the PIC thinks it can see is another matter, stroking the component side of the board is enough to fool it into thinking something is there.

    Can you confirm the value of the LED series resistor in the 1.5v supply part of the circuit ?

Page 6 of 8 FirstFirst ... 45678 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Website idea.
    By qwertyjon in forum General Computing
    Replies: 8
    Last Post: 05-04-2014, 03:29 PM
  2. Here's an idea hacking a Kress 1050 FME
    By m.marino in forum Kress Milling Motors
    Replies: 3
    Last Post: 16-01-2013, 01:05 AM
  3. Why they don't want to accept my idea?
    By hoezap in forum Tool & Tooling Technology
    Replies: 5
    Last Post: 14-07-2012, 01:15 AM
  4. business idea?
    By homer93 in forum Marketplace Discussion
    Replies: 7
    Last Post: 01-06-2012, 12:56 PM
  5. BUILD LOG: Mel's Odd Idea
    By mel_earp in forum DIY Router Build Logs
    Replies: 3
    Last Post: 19-03-2010, 11:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •