Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Photosensor as encoder for bang bang. (http://www.chiefdelphi.com/forums/showthread.php?t=113029)

Bunniy 11-02-2013 16:31

Re: Photosensor as encoder for bang bang.
 
i have it hooked up and i had just hooked it up to the solenoid breakout card. but not there is no power to the photosensor

Bunniy 11-02-2013 16:40

Re: Photosensor as encoder for bang bang.
 
NOw i got it to work at 24 volts. Now i need the code to work

Bunniy 11-02-2013 17:08

Re: Photosensor as encoder for bang bang.
 
I am getting a reeding now of Rpms between 500 to about 3000. But still my motor keeps going very fast

Ether 11-02-2013 17:14

Re: Photosensor as encoder for bang bang.
 
1 Attachment(s)
Quote:

Originally Posted by Bunniy (Post 1231770)
I am getting a reeding now of Rpms between 500 to about 3000. But still my motor keeps going very fast

Post a PNG screenshot of your speed controller code.

With a 20ms execution rate using counts to read a one-per-rev sensor on a wheel spinning at 2000 rpm, you're going to see a *lot* of noise.


Bunniy 11-02-2013 17:19

Re: Photosensor as encoder for bang bang.
 
The value (10) you put underneath the indicator, what does that number mean exactly.

Bunniy 11-02-2013 17:24

Re: Photosensor as encoder for bang bang.
 
1 Attachment(s)
here

Ether 11-02-2013 17:30

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Bunniy (Post 1231779)
The value (10) you put underneath the indicator, what does that number mean exactly.

@ Mr Bill: He's talking to you again.

@ Bunniy: Many folks don't use the threaded display and can't tell who you are talking to if you just use the pronoun "you".



Ether 11-02-2013 17:40

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Bunniy (Post 1231781)
here

I don't think the "counts" method is going to work with a one-per-rev sensor. I think you need to use the "period" method that Mark posted.



Bunniy 11-02-2013 17:41

Re: Photosensor as encoder for bang bang.
 
@ Ether: Thank you, im new to chief delphi so i dont know this

Ether 11-02-2013 17:47

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Bunniy (Post 1231797)
@ Ether: Thank you, im new to chief delphi so i dont know this

We all started out new and had to learn. Try clicking the "quote" icon instead of "quick reply" and it will quote the message to which you are replying.

That will provide sufficient context.



Bunniy 11-02-2013 17:48

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Ether (Post 1231801)
We all started out new. Try clicking the "quote" icon instead of "quick reply" and it will quote the message to which you are replying.

That will provide sufficient context.



thank you

Bunniy 11-02-2013 17:56

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by billbo911 (Post 1230976)
Mark,
I created a "Count only" version of the Bang-Bang control. Does this look correct? If so, I'll add it to my "White Paper" options.

The only modifications needed are to replace the counter and motor names with the actual names.
If actual RPM is needed, that can be added here or elsewhere.

I also put a version together that uses the period approach you described earlier.

the period one is not speeding my motor

Bunniy 11-02-2013 18:12

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Ether (Post 1231796)
I don't think the "counts" method is going to work with a one-per-rev sensor. I think you need to use the "period" method that Mark posted.



Why would using the period method be better?

Bunniy 11-02-2013 18:42

Re: Photosensor as encoder for bang bang.
 
Quote:

Originally Posted by Mark McLeod (Post 1230428)
A feedback node and subtraction would preserve the integrity of the counter.
You do have to be aware of how high the Counter can count and provide for wraparound if resolution makes that a potential problem.
Counter Reset can be used when the shooter is turned off or first turned on, i.e., before or after the count integrity matters.

Also, it should be made clear that a crude filter and a loss of resolution is being applied by converting the Counter to RPMs before doing the tests.
My preference is to do all processing and comparisons in native units and only convert to RPMs for the human display.

Bunniy, your Counter initialization in Begin.vi looks fine.

See, you get your license and immediately you're doing errands.:)

I have literally tried so many times to just get my wheel to my desired rpm. Can you show me or help me in anyway to get it to work with my photosensor

Ether 11-02-2013 18:47

Re: Photosensor as encoder for bang bang.
 
2 Attachment(s)
Quote:

Originally Posted by Bunniy (Post 1231821)
Why would using the period method be better?

To understand why, you have to do the math.

Using the "period" method, like Mark posted earlier in this thread, the FPGA samples the sensor at 153KHz and records the elapsed time between pulses with a 1MHz clock. For a one-per-rev sensor (like yours) on a wheel spinning at, say, 2000 rpm, that gives you a very accurate and hi resolution signal. See attachment.

The "count" method is very accurate for high speeds with high counts-per-rev sensors like a 360CPR encoder. But for a one-per-rev sensor like yours, it's not very good. At a wheel speed of 2000 rpm and sampling every 20ms, you don't get enough counts to accurately determine what the speed is. Sometimes you'll get 1 count, and sometimes you'll get *no* counts. You can't convert that into a useable speed signal.
See attachment.




All times are GMT -5. The time now is 22:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi