| Electronics > Beginners |
| Potentiometer value with ADC |
| << < (3/5) > >> |
| ogden:
--- Quote from: admiralk on August 09, 2019, 07:14:26 pm ---I did find out that to get an encoder that would work like I was thinking would cost more than the whole project, or close to it. --- End quote --- Why you say so? On *Bay you can get five rotary encoders with end switch for 2.3$ delivered. If you make your clock using something like Arduino then encoder is all your additional costs. |
| james_s:
The inexpensive encoders are simple to use in principal, but in practice they tend to be glitchy so the software has to account for this in order to provide a nice responsive debounced output. Go ahead and try on your own first if you want, just remember there are libraries out there that do the hard work if you have trouble. If you don't want to set it at all another option is using a GPS module which can be had for around $5 these days and parse the time from the NMEA strings it spits out. You could also use a ESP8266 and pull the time from a NTP server. |
| ogden:
--- Quote from: james_s on August 09, 2019, 08:29:58 pm ---The inexpensive encoders are simple to use in principal, but in practice they tend to be glitchy so the software has to account for this in order to provide a nice responsive debounced output. --- End quote --- Those inexpensive "bouncy" encoders can be easily tamed with debounce capacitor. It will limit maximum rotation speed, but will work even with generic encoder state polling code. |
| admiralk:
--- Quote from: ogden on August 09, 2019, 08:15:12 pm --- --- Quote from: admiralk on August 09, 2019, 07:14:26 pm ---I did find out that to get an encoder that would work like I was thinking would cost more than the whole project, or close to it. --- End quote --- Why you say so? On *Bay you can get five rotary encoders with end switch for 2.3$ delivered. If you make your clock using something like Arduino then encoder is all your additional costs. --- End quote --- I was talking about >100 ppr, you are not going to get that for $.50. 24 ppr should work as I have it figured out. I do not need 5 a month from now, but can add 1 to my Mouser order for ~$1.50 and get it next week. --- Quote from: ogden on August 09, 2019, 09:12:41 pm ---Those inexpensive "bouncy" encoders can be easily tamed with debounce capacitor. It will limit maximum rotation speed, but will work even with generic encoder state polling code. --- End quote --- Until I set something up, I have no idea how fast the numbers will change. I think it is safe to say, now that I have thought about it more, that in a worst case scenario that 30 is the maximum numbers that will need to be traversed. There is absolutely no reason to play wheel of fortune with the knob. --- Quote from: james_s on August 09, 2019, 08:29:58 pm ---The inexpensive encoders are simple to use in principal, but in practice they tend to be glitchy so the software has to account for this in order to provide a nice responsive debounced output. Go ahead and try on your own first if you want, just remember there are libraries out there that do the hard work if you have trouble. If you don't want to set it at all another option is using a GPS module which can be had for around $5 these days and parse the time from the NMEA strings it spits out. You could also use a ESP8266 and pull the time from a NTP server. --- End quote --- Years ago when I worked at a car dealership we used to laugh that you could tell mechanics from body men by what they drove, and for the most part it was true. The mechanic's ride was polished and shiny, but ran like shit. The body man's ride was multi colored and looked like it was about to fall apart, but purred like a kitten. To put that more in this perspective, a hardware guy looks for libraries to make his software work. I do not learn anything by adding a library. I really hope you where not serious about the GPS module. |
| james_s:
Why would you hope I'm not serious about the GPS module? I'm absolutely serious, you're building a clock right? A GPS module is great for a clock, it's an absurdly cheap device that spits out a ridiculously accurate timing signal and there are libraries to parse that down to whatever you need. The potential accuracy achievable will put anything short of a fullblown atomic clock to shame. GPS receivers have many uses outside of navigating, they even use them to synchronize the flashing of buoy beacons without requiring any sort of connection between the buoys. Why do you need 100ppr? Or even 20ppr? Even an encoder with something crazy low like 5ppr would work fine for setting a clock. I'd even go so far as to say that the lowest ppr you can find is probably going to be better because if you have a really high resolution encoder you will either have to scale it in software and throw away a lot of that resolution, or you are going to have to make very small and precise movements to set the time. The beauty of an encoder is you can twirl it multiple revolutions, or a fraction of a revolution, it doesn't matter, it produces a relative output. |
| Navigation |
| Message Index |
| Next page |
| Previous page |