Laser Diode to Propeller
AIman
Posts: 531
I am in the process of working on a project that involves some more complicated ideas and I am somewhat stuck in finding answers. I read through the propeller data sheet and didn't find a satisfactory answer and wasn't entirely clear on what was meant either.
The project is basically as follows. A laser diode shoots through a fan to a conveyor belt and needs to measure the distance to each object for sorting purposes. The line moves fairly rapidly and the laser needs to measure the height of each object either from directly above or from an front angle to determine which part goes to what following assembly further downstream. The goal is to accomplish proper distribution of required parts for different items on an assembly line moving at high speed within restricted space.
In my reading I couldn't figure out the speed of each cog or the speed of the internal cycle of the Propeller and need to synch the speed to the fan speed so that the laser can return proper distances. I saw several different references ranging from nanoseconds to milliseconds. I could use a PLC but prefer to use the Propeller if I can. Research has shown that the laser will need to be analog to get distance measurements which means a potential wrinkle for interfacing with the Propeller.
So here's the question - how fast of a scan cycle does the Propeller have for analog inputs?
The project is basically as follows. A laser diode shoots through a fan to a conveyor belt and needs to measure the distance to each object for sorting purposes. The line moves fairly rapidly and the laser needs to measure the height of each object either from directly above or from an front angle to determine which part goes to what following assembly further downstream. The goal is to accomplish proper distribution of required parts for different items on an assembly line moving at high speed within restricted space.
In my reading I couldn't figure out the speed of each cog or the speed of the internal cycle of the Propeller and need to synch the speed to the fan speed so that the laser can return proper distances. I saw several different references ranging from nanoseconds to milliseconds. I could use a PLC but prefer to use the Propeller if I can. Research has shown that the laser will need to be analog to get distance measurements which means a potential wrinkle for interfacing with the Propeller.
So here's the question - how fast of a scan cycle does the Propeller have for analog inputs?
Comments
"how fast of a scan cycle does the Propeller have for analog inputs?" - If using a software Sigma-Delta style of ADC implemented on the Propeller, this depends on the resolution of the ADC sample that you desire.
' At 80MHz the ADC sample resolutions and rates are as follows:
'
' sample sample
' bits rate
'
' 9 156 KHz
' 10 78 KHz
' 11 39 KHz
' 12 19.5 KHz
' 13 9.77 KHz
' 14 4.88 KHz
If on the other hand you use an external ADC for better accuracy, then the resolution depends on the external ADC parameters and how quickly you can communicate with the chip. The Propeller by itself operates internally at 80MHz if supplied with an external 5MHz crystal. That's 12.5ns per clock. It takes 4 clocks per PASM instruction so your looking at about 50ns per PASM instruction. Depending on how many instructions you need to communicate with an external ADC or execute a software ADC will determine how fast you can ultimately read an analog value.
http://www.lightware.co.za/download/doc/SF02%20-%20Laser%20Rangefinder%20Manual%20Rev%2001.pdf
They just recieved permission to sell them in the states