Re: [CAD_CAM_EDM_DRO] PIC DRO
Posted by
Larry Edington
on 2000-04-05 15:07:24 UTC
I'm working on a project right now that uses a 16F877 and reads two rotary encoders. It wouldn't take much to modify
my code to make it a DRO. It's already driving a 4x20 LCD too. My encoder code is working fine.
Some questions I have about a home DRO design.
1. Why not read the data via the serial port? Then any computer could be used to display the data or a stand alone LCD could be used. Then you don't need an ISA card or any other add in card. All you are doing is getting the count from the PIC so serial port speed isn't an issue.
2. What's the LS7166 for? Since the F877 has an interrupt on change function of the upper nibble of Port B, and since two encoders only need 4 lines to read, you can use the PIC for the counter. Anytime the encoder changes it generates an interrupt which the PIC then updates the count from. I'm also doing this in a very noisy environment with brushed motor attached to the machine that has the encoders so electrical noise hasn't proved to be an issue on my project.
Ok, so that's only 2 axis worth . You can also use Xor gates to build the logic so you have a direction and count line coming into the PIC. Doing it this way would let you have 4 axis on one pic if you put the count lines on the high nibble of port b and polled the direction lines in your interrupt service routine. Only $1 worth of additional logic to do it this way. Or just use two cheaper pics like the F84's to read two encoders each and share the serial output line. Now you are into it for less than the price of a F877. But the dual F84's would be more difficult to use a single LCD with ( it can be done though ).
I don't have any time right now to devote to this project. But in couple of weeks I should.
later,
Larry E.
my code to make it a DRO. It's already driving a 4x20 LCD too. My encoder code is working fine.
Some questions I have about a home DRO design.
1. Why not read the data via the serial port? Then any computer could be used to display the data or a stand alone LCD could be used. Then you don't need an ISA card or any other add in card. All you are doing is getting the count from the PIC so serial port speed isn't an issue.
2. What's the LS7166 for? Since the F877 has an interrupt on change function of the upper nibble of Port B, and since two encoders only need 4 lines to read, you can use the PIC for the counter. Anytime the encoder changes it generates an interrupt which the PIC then updates the count from. I'm also doing this in a very noisy environment with brushed motor attached to the machine that has the encoders so electrical noise hasn't proved to be an issue on my project.
Ok, so that's only 2 axis worth . You can also use Xor gates to build the logic so you have a direction and count line coming into the PIC. Doing it this way would let you have 4 axis on one pic if you put the count lines on the high nibble of port b and polled the direction lines in your interrupt service routine. Only $1 worth of additional logic to do it this way. Or just use two cheaper pics like the F84's to read two encoders each and share the serial output line. Now you are into it for less than the price of a F877. But the dual F84's would be more difficult to use a single LCD with ( it can be done though ).
I don't have any time right now to devote to this project. But in couple of weeks I should.
later,
Larry E.
----- Original Message -----
From: james owens
To: CAD_CAM_EDM_DRO@egroups.com
Sent: Wednesday, April 05, 2000 2:42 PM
Subject: Re: [CAD_CAM_EDM_DRO] PIC DRO
I thought it would be a good idea to post how much a PIC based DRO would cost if you built it yourself. These prices are in USD as most on this list are of that flavour.
I have worked and listed the costs as per axis except for the common parts that only have to be bought once and it all refers to what I wrote in the orginal posting of my wish list. The items list are by no means definative as it relies on someone else doing the PIC programming and designing the circuit. I will be glad to do the metalwork and the artwork for the boards.
The prices quoted are for one off quanties or small amounts from the likes of Digi-Key or USDigital.
Common parts are the power supply which is about 1amp @ 5v. I think this amount of current is enough for our purposes.
Qty. 1 Box 6.36 HM112-ND
Qty. 1 Transformer. 9.63 MT2104-ND
Qty. 1 Bridge Rect. 0.52 RB151MS-ND
Qty. 1 Cap. smoothing 16v 6.800uF 2.45 4209PHBK-ND
Qty. 1 Heat Sink TO-220 1.75 HS239-ND
Qty. 1 Voltage Reg. 7805 0.75 296-1974-5-ND
Misc. items such as circuit board, stand off's, screws, cable?
The following should be seen as per axis eg. if three axis is required then multiply by three. Some of the costs are not known at this stage because I have no idea what metal costs in the USA.
Qty. 1 Linear encoder 27" long 54.00 13" long 26.00 Rotary 2000 line/rev 5/8" bore 22.00
Qty. 1 HED****** 360 line/inch 25.00 HED******* 2000 CPR 28.00
Qty. 1 Up/Down Counter LS7166 11.65
Qty. 1 PIC 16F877 11.95
Qty. 1 Display LCD 12.88
Misc. items such as metal to protect scale, circuit board, stand off's, screws etc.?
This is a big difference in cost over commercial made systems @ $1000.
Regards,
Terry.
[Non-text portions of this message have been removed]
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Welcome to CAD_CAM_EDM_DRO@...,an unmoderated list for the discussion of shop built systems in the above catagories.
To Unsubscribe, read archives, change to or from digest.
Go to: http://www.onelist.com/isregistered.cgi
Log on, and you will go to Member Center, and you can make changes there.
For the FAQ, go to http://www.ktmarketing.com/faq.html
bill,
List Manager
[Non-text portions of this message have been removed]
Discussion Thread
james owens
2000-04-04 11:52:00 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
Bryan Mumford
2000-04-04 12:07:20 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
Ian Wright
2000-04-04 13:14:15 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
james owens
2000-04-04 16:56:02 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
james owens
2000-04-05 11:28:50 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
james owens
2000-04-05 11:39:40 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
jguenthe
2000-04-05 11:43:38 UTC
RE: [CAD_CAM_EDM_DRO] PIC DRO
james owens
2000-04-05 14:41:43 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
Larry Edington
2000-04-05 15:07:24 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
james owens
2000-04-05 17:43:42 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO
Tim Goldstein
2000-04-05 20:43:28 UTC
RE: [CAD_CAM_EDM_DRO] PIC DRO
Jeff DelPapa
2000-04-06 12:24:34 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO