I'm reading this because I'm a PIC coder. My first thought is ... why not use the electronics from a mouse, which works pretty similarly?
If some one is interested in exchanging your micro development skills for cnc related items let me know. I have a project that I need to finish up but not enough brain to make it happen. It can be a PIC or Atmel. Here is a quick overview, track two encoders X Y, and send the position numbers through a USB keyboard emulator IC to the PC when a external button is pushed. I have the emulator IC working nice but can't figure out a way to track the encoders. The encoders will be 500 line max and around ~20kHz speed or less.
I was experimenting with a CubLoc micro.
Let me know!
Dennis
I'm reading this because I'm a PIC coder. My first thought is ... why not use the electronics from a mouse, which works pretty similarly?
a few questions:
Would you mind just using a pic with usb, as it saves the hassle of the converter?
do you really want this to behave as a HID keyboard? What i mean is are you using this with your own software? if so could you just use a virtual serial port instead?
What frequency do you need to be able to read from the encoder? (how fast is the max supported shaft speed). The reason i ask is the easiest way to do this would be doing the decoding in software, but obviously you are not going to be able to read as high a frequency as dedicated hardware decoders.
PS:
If your not producing lots of this device it might turn out cheaper to take something like this, wire the encoders and button on, and save doing a pcb alltogether:
http://www.sparkfun.com/commerce/pro...roducts_id=762
I dont know about the bitwacker stuff, but they come with a usb bootloader, so can just load different firmware on over usb. I have a couple laying around somewhere, use them for small run projects.
That is how I started with this project, try to use a mouse but I need the position numbers entered in to CAD to plot points.
I only need one for now.
Dennis
well there are a few ways of doing that:
one would be to connect a second mouse, then write some software to read specifically the second mouse position, and calculate the absolute offset, then put the resulting numbers in clipboard, or fake key presses locally.
Another would be to use a second hand graphics tablet of ebay, some are pretty cheap if it suits the task.
it would help if you mentioned what you are trying to measure, and what accuracy you need
ok, was bored earlier so pieced together a little app to test this out. Basically what it does is measure relative movement only on the second mouse, ignoring what the first mouse is doing.
When you click the second mouse button, it creates a string with the two numbers in it and copies the string to clipboard. To put into cad you then just ctrl-v. Its a trival proof of concept, but it works.
It can measure distances greater then your monitors width, but there is one issue, the program needs focus to read mouse movement. That said it isnt a problem as long as you only move mouse 2 with the program in focus.
Your welcome to the code if your interested, let me know.