. .
Page 4 of 8 FirstFirst ... 23456 ... LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by BillTodd View Post
    You should be able to understand the code easily enough :)


    Doesn't seem tricky to me - maybe I've already done all the head-on-wall banging necessary ;)

    Yes I had thought about it, but VB has it's own problems with the USB driver interface so if I were to do it I just use a cheap USB-serial adapter.


    It would be nice to be able to make accurate scales of any length, but then would require some way of accurately calibrating them, which is probably the hardest part. Given that long scales (upto 1000mm) are available for not too much money (600mm are about £70), unless you need very long scales, is it worth making one???


    Since there seems to be some interest here, I've attached the PC app and PIC files to this post. The VB app has a sort of demo mode that'll allow you to add scales and adjust the value by dragging the mouse over a button. The current version is a fixed 640x480 window to suit my panel-pc, but I have a part finished MDI (multiple document - so I could add hole layout and utility functions) version that I would like to finish ... sometime.
    Thanks Bill,

    I think I may have managed to grab the demo VB DRO last night. I installed it and had to go and find/install the required inpout32.dll. After that its seemed to open just fine, but of course I have no multiplexed input to test it yet. The version I installed as far as I could work out could only open two scales (X and Y). Is that a limitation or me being stupid?

    I will certainly make up the PIC board just to see that it all functions correctly with my Lidl/Aldi 150 mm callipers seeing I have most of the parts.

    One question I have is whether there is a practical maximum cable length between the reader and the PIC board. There is some posts that suggest that EMC/noise issues exist at this interface and running single ended clock and data over long wires is not ideal for low pick-up. With all 4 channels on one board there will have to be a compromise about the best location of the board relative to the machine scale positions.

    You may have a point about the long T/Comb PCB and bar if you say you can pick up 600 mm callipers for £70. My mill X axis is 18" travel so one of these would be just fine. It just seems wrong to buy the whole thing just for the PCB and maybe the bar when the readers can be purchased complete for <£4 as recent posts suggest.

  2. I installed it and had to go and find/install the required inpout32.dll.
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)

    The version I installed as far as I could work out could only open two scales (X and Y). Is that a limitation or me being stupid?
    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)

    One question I have is whether there is a practical maximum cable length between the reader and the PIC board.
    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.


    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7

  3. The Following User Says Thank You to BillTodd For This Useful Post:


  4. Quote Originally Posted by BillTodd View Post
    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7
    Thats the same as the one I got on ebay for £17 a week or so back :)

  5. #4
    Quote Originally Posted by BillTodd View Post
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)
    It was not a problem, it was easy to find and install

    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)
    That's quite neat, you have thought of everything. I recognised that the ASM code was the same for all PICs on the board which is also a smart move.

    I managed to load the project and ASMs and do a successful 'Make' with all of the Include files as well. I just needed to change the location for the files as I don't have a D:\ drive. - it all looks good so far


    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.
    That's quite a healthy length, much longer than I would need.


    Thanks Bill.

  6. #5
    Quote Originally Posted by BillTodd View Post
    Ah Sorry, I must have missed theat out of the installer script. (the inpout.dll is only required to handle the touch switch input on my panel-pc)

    No not your fault :) I added the 'demo' option while testing the ADJ function, so I've only added X&Y to the menu. It will happily display four (or more) scales.

    Each PIC has the same code, on power up each one detects the status of its pin5, then assigns itself as X,Y,Z or W. When the PIC detects a scale it informs the VB app, which then adds a display panel)

    I use 1.5-2m screened cables (soldered to the scale). It would be wise to route them away from strong noise sources.


    [edit] found a 600mm scale on ebay:
    http://cgi.ebay.co.uk/Mill-Lathe-Hor...item439ddc49a7
    Hi Bill,
    I have managed to program 4 off 12F675 PICS but for a quick demo breadboard can I just install 1 or 2 Vernier PICs into the RS232 interface driver rather than all 4. If so do I need to install X then Y then Z etc in that order. I'm getting to understand your assembly code but i've not quite figured out the TxSyn operation yet on GP4 in relation to channel time slots.

    Cheers, John

  7. #6
    Quote Originally Posted by 1113562 View Post
    Hi Bill,
    I have managed to program 4 off 12F675 PICS but for a quick demo breadboard can I just install 1 or 2 Vernier PICs into the RS232 interface driver rather than all 4. If so do I need to install X then Y then Z etc in that order. I'm getting to understand your assembly code but i've not quite figured out the TxSyn operation yet on GP4 in relation to channel time slots.

    Cheers, John

    I have build a prototype board to test a single channel although the board is built to a level to take 3 of the PICs with expansion for the 4th.

    On test with one PIC installed and connected up to a caliper I am getting something and it recognises the correct channel but the displayed valued is very eratic and not representative of the vernier positional movements. I'll need to get the scope out to see why it is so all over the place. Perhaps I have a noise issue with my set-up. The power supplies look quite stable with a DMM but without scoping it there could be some nasty spikes around... I'm getting there slowly.lol

    I tried to add a few pics but I'm not sure if it worked

  8. #7
    I realised pics were too big so here is a re-sized version of the prototype (lash-up) with one programmed PIC installed in channel Y

    Click image for larger version. 

Name:	Picture 001.jpg 
Views:	598 
Size:	189.9 KB 
ID:	2151

  9. ISTR you can fit one or more PICs as required.

    I'm getting to understand your assembly code
    Congratulation John - that's more than I ever did :LOL:

    From memory, the Txsyn timing is a simple grab a slot when ready affair with a different delay based on chip position to help prevent collisions.
    (i.e. if Txsyn = hi, delay X.Y,Z or W recheck Txsyn if hi, pull txsyn low and transmit)

    Is the vernier being switched into fast mode correctly? Different makes/types of scale have different clk/data line switching sequences so some don't work with out mod'ing the code


    Are you powering the scales from the interface or the on-board cell? (I replaced the cells with a ~1uF SM cap) What voltage are you ghetting across the PSU red-led?

    The serial port is running at 115,200 baud, so screening and good earthing is advisable. And, it derives its -Ve from the PC so, just check that's working OK.

  10. #9
    Quote Originally Posted by BillTodd View Post
    ISTR you can fit one or more PICs as required.
    I tried this as you can see in the photo as it sort of worked so I assumed the design does not require all PICs in place

    Is the vernier being switched into fast mode correctly? Different makes/types of scale have different clk/data line switching sequences so some don't work with out mod'ing the code
    I think it is I being switched - I get a small hi symbol appearing on the LCD display. The zero switch on the vernier doesn't zero when connected to your interface it just seems to make it switch between fast and slow mode. I will try another vernier I have which is a later BCD output model with a 2032 3V button cell battery.

    Are you powering the scales from the interface or the on-board cell? (I replaced the cells with a ~1uF SM cap) What voltage are you ghetting across the PSU red-led?
    Yes I'm powering from the interface board. I don't have a cell in place or a cap. I'll try and put a 1uF in the place of the battery cell, that may stabilise things. Whats your suggestion for the 3V verniers as I note the signals are still only 1.5 v p-p despite the 3V cell? I measured my LED Vernier power output as 1.63V, its bit hi but thats due to the LED i'm using. Do you think I should try and get this back to 1.5V?

    The serial port is running at 115,200 baud, so screening and good earthing is advisable. And, it derives its -Ve from the PC so, just check that's working OK.
    As you can see i've used a crap bit of ribbon for this cable but ist only about 20" long. I must try to improve this with a screened cable. I am getting a good 0V reference from the PC. I'll look at all this later with a scope to see whats going on, in the end its bound to be an analogue thing.

    Thanks for all your help. John

  11. #10
    Here is an update to things but to make it easy I have attached a word doc with embedded pics. It describes some scope measurements of the signals on the interface board. I hope it is readable.
    Attached Files Attached Files

Page 4 of 8 FirstFirst ... 23456 ... 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
  •