Thread: Cheap Idea for a DRO
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.
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.
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.
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)
Last edited by BillTodd; 06-12-2010 at 08:09 PM.
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@
And zx command
0318 3A02 103A ::
looks like I have a bit missing, literally.
1.9V power to the callipers is ok?
Anyway, back to playing :)
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?
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 ?
By qwertyjon in forum General ComputingReplies: 8Last Post: 05-04-2014, 02:29 PM
By m.marino in forum Tool & Tooling TechnologyReplies: 3Last Post: 16-01-2013, 12:05 AM
By hoezap in forum Tool & Tooling TechnologyReplies: 5Last Post: 14-07-2012, 12:15 AM
By homer93 in forum Marketplace DiscussionReplies: 7Last Post: 01-06-2012, 11:56 AM
BUILD LOG: Mel's Odd IdeaBy mel_earp in forum DIY Router Build LogsReplies: 3Last Post: 19-03-2010, 10:54 AM