CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > PIC Programing / Design


PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips.


Reply
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-11-2008, 04:42 PM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
PIC based DRO

Continued from Welcome thread

Look like you haave been busy. The engraver looks great.
Thanks

I would be interested in how you used the PICs for your DRO`s. Did you design them yourself?
I wonder if they could work using encoders ?

Mario
The DRO (still work in progress) uses one 12F675 per channel to read the digital scale. The outputs of four PIC are multiplexed into one serial port of a PC. The PC runs a VB5 application that displays the readings (see attached).

The layout of the main form is designed to match my homebrew PC's touchswitches that are arranged down the left and right sides of the display

I spent sometime getting every thing to talk to each other neatly, so for instance, you can plug an extra vernier/scale into the adapter block and it just pops up on the screen.

As to using the PICs with quadrature encoder, I'm sure the little 8 pinners I've used lack the necessary hardware (you'd need a couple of fast counters to ensure no pulses were lost). The ones to use would be the dsPIC devices like the 30F4012 (?) which have the quadrature hardware inside.
Attached Thumbnails
Click image for larger version

Name:	VB.jpg‎
Views:	615
Size:	40.2 KB
ID:	64701   Click image for larger version

Name:	DRO adapter.jpg‎
Views:	553
Size:	21.7 KB
ID:	64702   Click image for larger version

Name:	DRO PPC.jpg‎
Views:	830
Size:	51.6 KB
ID:	64703  

Last edited by BillTodd; 08-11-2008 at 05:10 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 08-12-2008, 06:00 PM
 
Join Date: Nov 2003
Location: Pennsylvania
Posts: 138
mc_n_g is on a distinguished road
Could you post more metails on the project. I have been playing in various pics of the past year and would like to get a little more advanced in reading other pulses.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 08-14-2008, 08:14 AM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
Originally Posted by mc_n_g View Post
Could you post more metails on the project. I have been playing in various pics of the past year and would like to get a little more advanced in reading other pulses.
What pulses are you trying to read?
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 08-14-2008, 04:01 PM
 
Join Date: Nov 2003
Location: Pennsylvania
Posts: 138
mc_n_g is on a distinguished road
I am trying to do a better job in understanding teh analog and digital side of the processing. I have played with temp sensors and other simple items for input. I have not worked with any encoders at all. This is where I am lacking examples and expereience.
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 08-14-2008, 05:57 PM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
I'm not actually reading encoders. I'm decoding the digital data outputs of those cheap Chinese digital calipers (see :examples here). To keep my circuit simple, I'm using the PICs onboard comparitor and reference to convert the low level (~1.5v) signal to one that the PIC can read.

This circuit is of a single device reader powered by the serial port.



The LEDs (D1,2,3) limit the voltage to about 1.2v when the PIC drives the scale's inputs.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-20-2008, 10:44 AM
 
Join Date: Jun 2007
Location: Australia
Posts: 18
Marzan is on a distinguished road
Unhappy

As to using the PICs with quadrature encoder, I'm sure the little 8 pinners I've used lack the necessary hardware (you'd need a couple of fast counters to ensure no pulses were lost). The ones to use would be the dsPIC devices like the 30F4012 (?) which have the quadrature hardware inside.[/QUOTE]


Hi Bill. It all looks impressive. You have certainly done a good job. I wish I had your talents. Unfortunately I am just a Trial and error learner at both electronics and Cnc`ing If i had one wish it would be that there was a way to verify my steppers with an encoder in Mach 3. A task too difficult for me with my limited experience.

Marz
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 08-20-2008, 11:22 AM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
If i had one wish it would be that there was a way to verify my steppers with an encoder
The usual method is to mark the motor's starting position accurately, then run a torture test (i.e. a test that runs the motor at various speeds back and forth until finally return ing to the start point), then check the motor has returned to the start postition correctly.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 08-20-2008, 11:58 AM
 
Join Date: Jun 2007
Location: Australia
Posts: 18
Marzan is on a distinguished road
The usual method is to mark the motor's starting position accurately, then run a torture test (i.e. a test that runs the motor at various speeds back and forth until finally return ing to the start point), then check the motor has returned to the start postition correctly.

Yer Bill. I have done all that. I set up a dial indicator on both axis and then ran a g code program with rapid moves for a 1/2 hr. I tuned the motors for 10% under the max revs before it misses pulses. Its just sometimes if I push the toolbit too hard it misses a few steps. I know thats my fault, but it would be nice if it could correct itself. If only I had the money to run servos....


Marz
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 08-20-2008, 04:59 PM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
but it would be nice if it could correct itself.
I see. Can mach3 do that, if it has encoder/count inputs?

What sort of input does Mach3 need?
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 08-21-2008, 10:34 AM
 
Join Date: Jun 2007
Location: Australia
Posts: 18
Marzan is on a distinguished road
Originally Posted by BillTodd View Post
I see. Can mach3 do that, if it has encoder/count inputs?

What sort of input does Mach3 need?
I`m not really sure.I was thinking along the lines of another pic or such countin pulses and comparing the result with an encoder (sort of like a virtual closed loop system) and if it misses steps using one of the inputs to signal a positioning error

Marz
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 08-21-2008, 01:03 PM
 
Join Date: Mar 2007
Location: UK
Age: 60
Posts: 460
Robin Hewitt is on a distinguished road
I'm brewing up much the same but with a home made computer board reading scales and stepping motors.

The step timer interrupt compares "where I am" with "where I want to be" and steps accordingly.

The "where I am" can change at any moment should a report be received from any of the 3 scale interrupts. (I read them with hardware because any lag will only serve to confuse it).

At the end of an x,y,z stepping sequence it works out the error on all 3 axes. Should any be outside tolerance it doesn't update the "where I want to be" to a new position. This means I get remedial steps to put it back on course.

Questions are, wil it do more remedial steps than moving steps, and, how tight can I put the tolerance

I only have to mount the scales and I can find out
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 08-21-2008, 03:37 PM
 
Join Date: Aug 2008
Location: UK
Posts: 533
BillTodd is on a distinguished road
Originally Posted by Robin Hewitt View Post
I'm brewing up much the same but with a home made computer board reading scales and stepping motors.

The step timer interrupt compares "where I am" with "where I want to be" and steps accordingly.

The "where I am" can change at any moment should a report be received from any of the 3 scale interrupts. (I read them with hardware because any lag will only serve to confuse it).

At the end of an x,y,z stepping sequence it works out the error on all 3 axes. Should any be outside tolerance it doesn't update the "where I want to be" to a new position. This means I get remedial steps to put it back on course.

Questions are, wil it do more remedial steps than moving steps, and, how tight can I put the tolerance

I only have to mount the scales and I can find out
Interesting idea Although,the missed steps may not be able to be corrected until the cause has been removed.

i.e. if it drops steps because of excess speed v load, will there be time to correct them before the next motion without increasing the frequency of the pulses thus exacerbating the speed v load problem?

(Well worth trying though )
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
komatias
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is water based CNCadmin Safety Zone 44 10-15-2010 03:27 PM
Need help with CNC UK based ciscoe Europe Club House 1 07-21-2008 07:03 AM
Convert to PC based Arcticfox46 CNC Wood Router Project Log 4 08-10-2007 09:05 AM
Used CMM based DIY router? biomed_eng DIY-CNC Router Table Machines 1 10-16-2006 09:52 PM
dos based cnc software flyingmike Computers and Networking 14 11-25-2005 02:29 PM




All times are GMT -5. The time now is 06:29 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353