Thank you leonheuler for your contribution helping me improve the ADC bits resolution handling in the library. If you want to add more examples or improve the library, just create a pull request with proper commit message and right wrapping. If you can cover your sense area to keep out light it works much better. This means you can use it as you want (just dont delete the library header). Oh, and it has a 'sunlight filter' but it really works best if you block room light. If you need to be further away make your marks wider. You may have too many marks or they may be too small, in which case you have to be right against the paper. Also if you need to you can use a 74LS14 to clean up the output or use a 2n2222 to make a darlington pair on the output and increase sensitivity but you should not have to. You can play with the resistor values to change the sensitivity. I have output with emmitter to ground, collector to the arduino pin, and 4.7k from the arduino pin to 5V. I have a 220ohm resistor on the LED for 5V, (you could go as low as 100) and a 4.7k pullup resistor on the output. I have it about 1/8 inch away with the sensor oriented so that the mark crosses the emmiter and detector at the same time. This works very well for an encoder wheel with laser printed 1/8 marks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |