Frame Lock Working!

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Steve Anderson, Dave Moll, Andrew Davie

Re: Frame Lock Working!

Postby Klaas Robers » Thu Apr 13, 2017 5:49 pm

Well, in the beginning of the lock routine you will have some overshoot anyway, as the speed will have some deviation at the moment of switching the routines. Otherwise it will take minutes before your first file starts.

May be that you can play back an electronically generated simple test frame during the bringing to speed of the disc. This could be done in sync with the still too slow speed of the disc. Or only during the last seconds of the speed routine...... You might start the test frame each time the IR hole is detected.

The test frame has again an extra degree of freedom: you can restart it on each revolution of the starting disc. Use the degrees of freedom that you get.
User avatar
Klaas Robers
Frankenstein was my uncle.
 
Posts: 1318
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: Frame Lock Working!

Postby Andrew Davie » Fri Apr 21, 2017 10:28 pm

Andrew Davie wrote:
Klaas Robers wrote:Even simpler it will be to:
- bring the disc to speed. This is a separate routine that is only run when starting.
- When at speed switch to a "hold" routine just at the moment that the IR hole is sensed.
- This routine locks the disc IR hole to a cristal stable 12.5 Hz.
- Then play the files locked to the same cristal stable 12.5 Hz.



Yes, I was thinking along the same lines. But perhaps tune it a little to turn to the hold routine a bit earlier so there's minimal overshoot.




OK, I've pared things back and starting afresh. I am using the PID to get the disc spinning to 12.5 frames per second. Every infrared-interrupt (i.e., the synch hole detected) I determine the delta between last detection and now (in terms of samples) This should be a constant (stored in a variable as singleFrame) and so the PID tries to get to a target value of 'singleFrame' and when it's there, the disc will be at 12.5 Hz. I did a short video showing the initial spin-up, and then the behaviour as the disc is perturbed - it's VERY strong at maintaining correct RPM and seems quite stable keeping the picture steady. Of course the playback of the video is not locked to the disc position anymore - that will come soon. But I'm getting a reasonably quick PID lock, and stable behaviour so that's a good start.


youtu.be/3SBVb48YoXU
User avatar
Andrew Davie
Frankenstein was my uncle.
 
Posts: 1373
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Re: Frame Lock Working!

Postby Klaas Robers » Sat Apr 22, 2017 1:34 am

Well done. I hear a sound when the disc is held on speed, that is familiar to me. This looks good.

However I see that the disc speed has an enormeous overshoot. That is: the disc is running far too fast shortly after starting up. And then it goes to an enormeous undershoot, too slow. That should not be needed. This is caused by the Integrating effect of the PID. Can you not spin up the disc by a simpler routine and switch over to the PID when the disc is almost at speed? Then you will skip the large overshoots. Or can you minimise the integrating effect of the PID during start up? So: when the deviation of the speed is larger than a certain amount have a PD, and when the deviation is less introduce the I and continue with a PID?

And then realise that synchronising the digital video to the IR-pulses is much easier and faster than the other way around.
User avatar
Klaas Robers
Frankenstein was my uncle.
 
Posts: 1318
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: Frame Lock Working!

Postby Andrew Davie » Sat Apr 22, 2017 1:58 am

Klaas Robers wrote:Well done. I hear a sound when the disc is held on speed, that is familiar to me. This looks good.

However I see that the disc speed has an enormeous overshoot. That is: the disc is running far too fast shortly after starting up. And then it goes to an enormeous undershoot, too slow. That should not be needed. This is caused by the Integrating effect of the PID. Can you not spin up the disc by a simpler routine and switch over to the PID when the disc is almost at speed? Then you will skip the large overshoots. Or can you minimise the integrating effect of the PID during start up? So: when the deviation of the speed is larger than a certain amount have a PD, and when the deviation is less introduce the I and continue with a PID?

And then realise that synchronising the digital video to the IR-pulses is much easier and faster than the other way around.



Yes, I will have a play with the things you suggest. But I will just point out that under 15 seconds from a complete standstill to synchronised isn't really that bad, and I could happily live with it as it is now. But I will come back to the startup time a bit later. I'm very happy right now to have an extremely stable 12.5Hz lock on the disc and rapid correction when there are perturbations. The PID code is incredibly simple - amazing that it can behave so nicely when tuned properly (apart from the startup issues you point out).
User avatar
Andrew Davie
Frankenstein was my uncle.
 
Posts: 1373
Joined: Wed Jan 24, 2007 4:42 pm
Location: Hobart, Tasmania, Australia

Previous

Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 1 guest