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! > Machine Controllers Software and Solutions > Mach Software (ArtSoft software) > Mach Wizards, Macros, & Addons



This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-01-2007, 01:45 AM
 
Join Date: Apr 2007
Location: Greece
Posts: 7
efrag is on a distinguished road
Vibration sensor

Hi all,
I'm building a vibration sensor for mills and Lathes.
I'm using a basic stamp and a Hitachi H48C Tri-Axis Accelerometer Module from Parallax.
I can receive values from the accelerometer to VB6 application.
I'm trying to send a keystroke to Mach3 to reduce the feed rate if the vibration comes over a limit.
I'm using this to send the keystrokes from VB6 to Mach but it does not work.
AppActivate "Mach3"
SendKeys "%{up}", True 'for the up arrow
or
AppActivate "Mach3 CNC Control Application"
SendKeys "%{up}", True 'for the up arrow

Any ideas?
Thanks
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 10-01-2007, 04:41 AM
mc-motorsports's Avatar  
Join Date: Feb 2007
Location: USA
Posts: 1,084
mc-motorsports is on a distinguished road

Not a clue, but I love your idea! Please let us know how it works out! That is kind of one thing that sucks about programming with CAD/CAM, there are many places in the program where you could increase the feedrate because the chip load is much lighter, yet your stuck with one constant feedrate for that particular operation...
Michael
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 10-01-2007, 04:53 AM
apache405's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 194
apache405 is on a distinguished road

could you use a recorded (like a marco) key stroke pattern and then tell the stamp to send it to a USB controller when the limit has been exceeded?

anotehr other option: if your controller board has some inputs for home switches, limit switches, etx. you could configure the stamp to operate within parameters of a switch (i.e. give a high signal when the vibration limit is exceeded.) and then tell you your controller software to perform a feed rate reduction when that switch is giving a high value.

i'm just learning to program in C, so i'm afraid i'm pretty much useless as software goes.
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 10-01-2007, 05:03 AM
 
Join Date: Apr 2007
Location: Greece
Posts: 7
efrag is on a distinguished road

I can use the basic stamp to send keystrokes to a PC but I use the VB to collect "samples" every second (20 samples), after that I make an average and I compare this number with the samples of a previous reading (previous second) If there are lot vibrations I need to send keystrokes to reduce the feed rate else I'm increase it. That the idea.....
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 10-01-2007, 05:15 AM
apache405's Avatar  
Join Date: Jan 2007
Location: USA
Posts: 194
apache405 is on a distinguished road

if you have a second basic stamp, have the first one send a high signal to the second one. the second one then does the keystroke send. the other thing is that the single stamp should be able to execute the keystroke send after the limit has been exceeded. if you set the program up to do its monitoring phase, then once the limit is exceeded, it takes half a second to send the keystrokes, then resumes its monitoring phase, you might be able to do it with a single stamp.
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-01-2007, 07:32 AM
 
Join Date: Aug 2007
Location: iran
Posts: 1
pc62408210 is on a distinguished road

Hi, dear Sir/Madam
Thank you for your site and your information .

your sincerely : hassan
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 10-01-2007, 09:01 AM
 
Join Date: May 2006
Location: USA
Posts: 10
ibwood2 is on a distinguished road

A hardware solution would be the simplest, but you could use a low level windows API call or Assembly language to go into low level os keyboard functions.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 10-01-2007, 11:55 AM
 
Join Date: Dec 2005
Location: Usa
Posts: 93
Horsedorf is on a distinguished road
Buy me a Beer?

Originally Posted by ibwood2 View Post
A hardware solution would be the simplest, but you could use a low level windows API call or Assembly language to go into low level os keyboard functions.
THAT is a good idea. Have an app that listens to the serial/usb port for the data and then send a signal or message to the Keyboard device driver which has been modified so that it can then forward a down arrow or.. whatever you want, to the mach3 program which would think it just got it from the keyboard.

now then, my only comment on this other than that is that the basic stamp PROBABLY does not relaly run fast enough to make good measurements. I'm thinkint this way...

If you have a system that is vibrating (cutting) you need to make sure that the rate of acceleration measurement (ie, position that relates to the vibrations) is at least the nyquist rate of teh chattering that you are trying to avoid. If the chattering is at about 10khz, you need to be sampling at twice that to be able to determine that the 10khz signal is occuring, otherwise you get aliasing on the signal. The basic stamp is a SLOW device. To do this 'right' you should probably be sampling the data at the nyquist rate for the chattering, and then performing a DFT on it to pull out the harmonic components. the DFT would show a spike at the chattering frequency such that you could then easily decide if it was chattering or not and then reduce the feed rate.

Pics aren't that hard to program, and there are basic compilers out there that would generate code that runs much faster than on a basic stamp!

Good luck.
Rick
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 10-01-2007, 01:28 PM
 
Join Date: Jun 2005
Location: USA
Posts: 328
jhudler is on a distinguished road

apache405's second suggestion is the optimal solution IMO. Trigger an input when vibration exceeds preset limits.

You should also try to off load the vibration analysis in the basic stamp. Though having programmed basic stamps it's not very powerful for this use; but it doesn't mean you can't do it or get creative.

I also wouldn't want something inserting keystrokes.
I feel you would be asking for an accident... bump the machine and it does something unexpected.

Jack
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 10-01-2007, 01:31 PM
 
Join Date: Dec 2005
Location: UK
Posts: 59
rgammage is on a distinguished road

Hello Efrag

You can achieve this by adding the required string to the keyboard buffer in the BIOS area of memory, and moving the pointers to suit. With VB you can Peek and Poke and the locations are:

0x041a is the next character in the buffer
0x041c is the last character in the buffer
0x041e is the first character of the 16 byte circular buffer

I have used this several times in the pre-windows area and I can see (via the old dos program debug) that it is still used today with XP.

As for programming a PIC I am using Source Boost in C, which is excellent, and I know they have a Basic compiler but as I have not used it I cannot comment on it.

If any of this is unclear please email me direct and I will attempt VB code which you can correct!

Regards

rgammage
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 10-01-2007, 01:51 PM
 
Join Date: Dec 2005
Location: Usa
Posts: 93
Horsedorf is on a distinguished road
Buy me a Beer?

Originally Posted by jhudler View Post
apache405's second suggestion is the optimal solution IMO. Trigger an input when vibration exceeds preset limits.

You should also try to off load the vibration analysis in the basic stamp. Though having programmed basic stamps it's not very powerful for this use; but it doesn't mean you can't do it or get creative.

I also wouldn't want something inserting keystrokes.
I feel you would be asking for an accident... bump the machine and it does something unexpected.

Jack
True... Hmmm... How about a circuit that's like a 'tuneable' filter.. where it takes output from the accelerometer (a voltage, i beleive) and just uses some op amps to apply like.. a notch filter to it that centers around a certain frequency? Might be doable that way. A bit of front end preprocessing with some hardware bitses would make the basic stamp program MUCH much much simpler to implement.

I R intrigued now.
Tweet this Post!Share on Facebook
Reply With Quote

  #12   Ban this user!
Old 10-01-2007, 01:58 PM
 
Join Date: Feb 2006
Location: US
Posts: 72
extrapilot is on a distinguished road

Efrag

A couple of thoughts on the principle-
1. I think you will find that this approach is very similar in concept to knock detection in modern automobiles/ecus. That is, you are looking for a vibration signature that is buried within a lot of machine noise. Without any benefit of test, I suspect that you will find it very difficult to differentiate 'offending' signatures like chatter from other signatures like drive harmonics or system coupling/resonance. Even varying the spindle speed, the cutter geometry, or the stock material will have a significant effect. Long story short, my guess is that without a whole lot of effort, you are going to get a ton of false positives. So far as I know, the big machines do not leverage this approach- they use path speed optimization from the toolpath generator, and also strain gauges on the drives. If an accelerometer was simple and effective, it would be in common use.
2. I dont believe a stamp has the power required to oversample and interpret the vibration signatures. You will probably need to look at the dsPic or equivalent that is designed to do digital signal processing. Or, there are a number of OEM knock detection chips for automotive that you can repurpose- assuming that they are configurable enough to catch the events in question.

I have done a lot of work in knock detection in engines- and it is far more complicated than just looking for a voltage spike. And, the signature of the event changes for each engine geometry and placement of the sensor.

Good luck-
Rob
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
fanuc magnetic sensor keithmech Fanuc 11 05-04-2009 08:30 PM
magnetic sensor keithmech General Electronics Discussion 0 07-28-2007 07:04 PM
non ARC height sensor sunmix General Electronics Discussion 1 11-05-2006 12:51 PM
Help with Irda sensor on computer jtree83 Computers and Networking 0 04-17-2005 10:35 PM
Optical sensor... aghobby DIY-CNC Router Table Machines 1 09-08-2004 12:17 PM




All times are GMT -5. The time now is 11:23 AM.





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