- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am attempting to read the speed of a dc motor using a disk encoder which causes an opto coupler to generate a square wave based on the slits on the disk. My question is this:
How do I read the frequency of the pulse train generated by the device?
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Tags:
- dc motor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CaDu,
The trick is to create a good sensor strategy. If you can see the armature spinning through the vent holes, you can use a modified opto transmitter/receiver where the transmitter bounces the light off the rotating armature and some of the reflected light comes back to the receiver sensor. You then can count these pulses.
Optimally if there are vent holes on opposite sides of the motor and the armature allows some light to flow straight through, you could put the transmitter and receiver on opposite sides. This could give you optimum signal.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CaDu,
If you're using a opto-coupler then your output is digital. If the opto disk has 'n' slots, the speed of the motor is computed as 'n' / period_of_the_pulses in msecs. To convert to RPM, you have to multiply this result by 1000 * 60.
Does the motor have any ventilation holes in it that would expose the armature?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No it does not, why?
I am currently using only one slot on the on disk since the all the others would generate a really messy signal.
P.S This is to apply a PID control.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CaDu,
You can try this frequency meter demo project.
Re: HELP, with example of frequency measurement Error
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CaDu,
Some small motors have ventilation slots. If you could see the armature spinning in the vent slot, you could devise a modified opto-coupler system that uses the light reflection off the armature to measure rotational pulses. This would eliminate the need to mount a disk on the shaft.
A disk with one slot should work.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, the motor does have ventilation shafts. Now, do you happen to know of a program to count the number of revolutions per second?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CaDu,
The trick is to create a good sensor strategy. If you can see the armature spinning through the vent holes, you can use a modified opto transmitter/receiver where the transmitter bounces the light off the rotating armature and some of the reflected light comes back to the receiver sensor. You then can count these pulses.
Optimally if there are vent holes on opposite sides of the motor and the armature allows some light to flow straight through, you could put the transmitter and receiver on opposite sides. This could give you optimum signal.
Len
"Engineering is an Art. The Art of Compromise."