Thread: Cheap Idea for a DRO
-
25-05-2010 #51
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 diagram
.
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.
-
25-05-2010 #52
-
25-05-2010 #53
-
26-05-2010 #54
-
26-05-2010 #55
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.
-
06-12-2010 #56
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.
-
06-12-2010 #57
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)
BillLast edited by BillTodd; 06-12-2010 at 09:09 PM.
-
06-12-2010 #58
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 :)
-
07-12-2010 #59
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
-
07-12-2010 #60
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 ?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Website idea.
By qwertyjon in forum General ComputingReplies: 8Last Post: 05-04-2014, 03:29 PM -
Here's an idea hacking a Kress 1050 FME
By m.marino in forum Kress Milling MotorsReplies: 3Last Post: 16-01-2013, 01:05 AM -
Why they don't want to accept my idea?
By hoezap in forum Tool & Tooling TechnologyReplies: 5Last Post: 14-07-2012, 01:15 AM -
business idea?
By homer93 in forum Marketplace DiscussionReplies: 7Last Post: 01-06-2012, 12:56 PM -
BUILD LOG: Mel's Odd Idea
By mel_earp in forum DIY Router Build LogsReplies: 3Last Post: 19-03-2010, 11:54 AM
Bookmarks