Owon vds1022 question about testing a rotary quadrature encoder - Page 1
Forum section: electronics / testgear

author: bhowden
author_rank: Newbie
timestamp: January 29, 2020, 02:20:16 am
content: I am trying to test a rotary encoder with my Owon vds1022 and there is clearly something I do not understand about how to use this thing! I have the two channels connected to channel A and channel B of the encoder with two pull up resistors feeding VCC to the two channels. When I turn the encoder I see the two channels producing a square wave that is a little out of sync with each other as expected. My plan was to use single triggering on the falling edge of channel A to capture a couple of iterations of the encoder and then use the zoom to drive back and forth across the captured waveform. While the trigger fires, it does not freeze the frame and my pulses scroll off to the left. The only way to get a frozen trace is to try and hit stop at the right moment. Force doesn't seem to do anything either. I guess the first question is what dumb mistake am I making or do I not understand how single trigger is supposed to work? The second issue is that when I use the stop button to freeze the trace I see channel A go low followed by channel B going low followed by both channel A and B both going high at the same time instead of first A and then B. This happens with a whole drawer of encoder so I am pretty sure they are not defective (they also work with an Arduino just fine). Am I missing something with how I am using the triggers that is messing up what is really happening? This is all using the version of the OWON software on their web site. Is there any point in trying the unofficial version on GitHub? Does anybody know what that is?Thanks in advance.Brian

author: indman
author_rank: Super Contributor
timestamp: January 29, 2020, 07:52:33 am
content: Hi Brian!You can ask your question in a specially created topic on OwonVDS1022https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/

author: Gyro
author_rank: Super Contributor
timestamp: January 29, 2020, 09:31:57 am
content: Hi Brian, are you sure you're using the single trigger button: top right? You should be able to set the desired horizontal trigger position on the screen and it will trigger and freeze on the first transition in the selected transition direction.Have you set the trigger source and level correctly? I think the s/w defaults to alternate trigger (trigger on both channels) which might explain your simultaneous transitions. If you can see two channel bubbles bottom right then it is set to alternate. Go into the trigger menu and select single and one of them should disappear. Then you are just triggering on the selected channel.It should certainly be no challenge for the scope.Hope this helps.ChrisP.S. The factory s/w, preferably the one that came on the CD is fine. The custom firmwares are bells and whistles to a large extent, more convenient buttons, colour selections, better icons, keyboard shortcuts etc. rather than basic functionality.

author: bhowden
author_rank: Newbie
timestamp: January 29, 2020, 07:14:14 pm
content: It is a big help thanks. It confirms that what I am trying to do should work even if it doesn't seem to! I have the timebase set to 50ms per div and the triggering set to channel A. When I click the thunderbolt (top right) the status goes to ready and the run light shows red. When I click the encoder the status goes to stopped and the run light goes back to green but there is no trace shown on the screen (actually the trace is a flat line for both A and B at 5 volts with no pulse shown.) If I just hit run and leave the thunderbolt alone it goes back to the way I was describing above where turning the encoder results in a trace showing the pulses but they don't stop scrolling off to the left.Brian

author: Gyro
author_rank: Super Contributor
timestamp: January 29, 2020, 07:28:22 pm
content: At a guess, the scope is triggering on contact noise from the encoder contacts rather than an expected transition (ie. it is triggering as soon as the shaft starts to move). Try changing to a faster timebase to try to visualise what the trigger event actually is, it should become visible at the trigger point.If it is contact noise then a quick fix would be to put something like 10nF to 100nF capacitors across the switch contacts. You will probably need to do some debouncing of the contacts, either in h/w or s/w in your final application anyway.Just a gut feeling.ChrisP.S.Quote from: indman on January 29, 2020, 07:52:33 amSorry, if I deflected you Indman, it just sounds more like a general scoping issue than VDS specific at this stage.

author: bhowden
author_rank: Newbie
timestamp: January 29, 2020, 08:56:56 pm
content: Possibly this doesn't work the way I expect. Without a lot of thought, I expected the trigger to start recording and stop when the buffer was full. This probably makes a lot less sense for a scope with a larger buffer. Is there a way to specify how many samples or for how long you want it to record after the trigger and before it stops?Brian

author: Gyro
author_rank: Super Contributor
timestamp: January 30, 2020, 07:40:38 pm
content: No, it's a fixed 4k samples (modest but should be fine for an encoder). You are correct that a DSO will start recording when triggered and stops when the buffer is full... almost - by default, the trigger position is set to the 50% point in the buffer - you get 50% recorded after the trigger and 50% pre-trigger (ie. what happened immediatelybeforethe trigger).If you're looking at rotary encoder timings, you don't really care what happened before the transition, so you can drag the trigger point forward to, say, 5-10%.How long it records for is purely down to the timebase setting. If you are finding that the encoder transitions are too far apart to see on single trigger before the timebase gets so slow that it goes into roll mode, you could just try turning the encoder quicker.

author: bhowden
author_rank: Newbie
timestamp: January 30, 2020, 08:39:25 pm
content: Well it is reassuring that my understanding of how it is supposed to work is close(ish). Now to solve the frustration of it not actually working! I have the trigger point set to be about 2 volts and it reliably switches from running to stopped when I turn the encoder so I am pretty sure I have the trigger set up properly. I have the time base set to 50ms which shows as 5k samples / second which should be plenty. By moving the trigger point forward I am assuming you mean move the trigger point to the right of the screen. When the mode is set to run I get a nice looking waveform (other than the two channels both rising at the same time but I am viewing that as a separate problem for now). When I use the single trigger I get nothing. Status switches to stopped but there is no change in the trace (just two horizontal lines, one for each channel). I added a couple of caps to reduce bounce and it is significantly improved but there is some room for playing with cap and pullup resistor values.Any other suggestions gratefully appreciated. Your previous posts have been a big help so far.Brian

author: indman
author_rank: Super Contributor
timestamp: January 31, 2020, 05:51:19 am
content: Quote from: Gyro on January 29, 2020, 07:28:22 pmI 'm sorry, but I don 't agree with you. Why create new topics when you discuss issues that apply directly to a particular VDS1022 model. This distracts people from the main theme of thehttps://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/which was previously discovered and supported by interested participants. I would like to remind you thatflorentbrhas significantly improved and refined the functionality of the software shell, for example:fixed horizontal zoom when stoppedfixed single trigger triggered unexpectedly once initiatedadded localized trigger status messageschanged trigger limit to 200ms

author: Gyro
author_rank: Super Contributor
timestamp: January 31, 2020, 04:01:18 pm
content: As I say, the OP sounded new to DSOs in general (OP, forgive me if I'm wrong). It sounded more like a more general problem (contact bounce on the encoder causing unintended triggering), still does.Quote from: indman on January 31, 2020, 05:51:19 amI hadn't noticed that florentbr had added slower timebase single trigger capability than the stock s/w [EDIT: Actually only seems functional down to 100ms/div, not 200ms/div on my 1.0.30-cf9 installation], that would indeed be useful to the OP. I hadn't personally suffered any issues with single trigger on the other versions but it's good to know that he has improved it.At some point there is always going to be a differentiation between general measurement issues (which will never all manage to fit in one thread) and instrument specific issues / new developments. Adding capacitors to reduce contact bounce seems to have made an improvement. Maybe I'm wrong... I don't know.@bhowden:Maybe you should install the florentbr version, as detailed in indman's posts in the main thread, in that case (and post any installation questions / issues there) and see if it helps with your problem.

author: bhowden
author_rank: Newbie
timestamp: January 31, 2020, 07:45:06 pm
content: Thanks for the suggestions Gyro. You are correct in that most of my experience has been with analogue scopes and I am still learning the subtleties of a DSO. I will give the upgraded software a try and move my questions to the other forum. Thanks again for your help and support.Brian