Difference between revisions of "Actuator-plugin"
(→Links: merge -> internationalization)
|Line 163:||Line 163:|
<!-- Link to german wiki page -->
Revision as of 10:22, 13 March 2006
Controls a linear actuator or an horizon to horizon one through the parallel port. These are the old fashioned traditional actuators, not to be confused with a Diseqc motor. A Diseqc motor takes its power from the antenna cable, while a linear actuator takes its power from a separate cable so it's usually stronger and moves faster. The downsides are that you have to use a separate cable with 2 wires for power+2 for position control, and that digital receivers only speak Diseqc, so you either have to find a model that can drive the motor (very expensive), use an external box that translates diseqc to 36v motor drive, ore use vdr with this plugin and a simple circuit.
- standard pc parallel port
- simple home made interface (schematics included)
- Linux 2.6.x (this is because of the use of a kernel module, if someone is willing to port it to 2.4.x it should work there too)
- vdr >= 1.3.20
The kernel module has to be compiled separately
cd PLUGINS/src/actuator/module make
Now see plugin installation.
There are some patches provided with the plugin. The plugin will work without them but it will be more useful with them.
cd $SOURCEDIR/VDR patch < PLUGINS/src/actuator/patches/vdr-XX.XX-position-display.diff
(change XX with the actual version supplied with the plugin). With this patch vdr will show you when the dish is moving after switching channels
cd $SOURCEDIR/VDR patch < PLUGINS/src/actuator/patches/vdr-XX.XX-sort-by-source.diff
this patch adds more sort options to the channel list, specifically it can sort them grouping by source, and the source is alway shown, so you know if the dish is going to move before switching to a particular channel
cd $SOURCEDIR/VDR patch < PLUGINS/src/actuator/patches/vdr-XX.XX-steerable.diff
Vdr now checks for a lock during 5 seconds after switching channels. If the new channel is on a different satellite there won't be a lock at once: depending on the distance vdr will get stuck up to 5 seconds and then, if the position hasn't been reached yet, will show a black screen. This patch reverse to the old behaviour (i.e. vdr doesn't wait for a lock. It doesn't seem to have adverse effects here but YMMV). The same patch also gives more time for the dish to reach the target after starting a recording.
Remember to recompile vdr if you apply any of these patches
The module uses the parallel port interrupt, so be sure an interrupt is used (default: no interrupt)
modprobe parport_pc io=0x378 irq=7
Then don't forget to load the kernel module
In the setup-menu of the plugin you have to select the dvb card which is connected to the dish driven by the actuator (see below in #Known Problems about multi cards setups).
You can also set a minimum screen refresh time (in ms) that will be used in the plugin main menu: I found that, with a dxr3, if you refresh the screen too often the osd gets garbled. I set it to 250 for my dxr3. Note that too low a value will cause high cpu usage.
The plugins assumes that the position increments when the dish is moving west and decrements when going east. You have to connect the motor according to this rule.
In order to protect the dish, there are two soft limits, and the plugin will take care not to move the dish beyond those limits (you should also set the limit switch on the actuator itself anyway).
The soft East Limit (the origin) is always 0, while the West limit is adjustable in the plugin main menu.
When you switch to a channel that's on a different satellite, the plugin will take care to move the dish. If you patched vdr, a message will show the current dish position while it is moving and eventual error messages.
The plugin main menu allows you to manually move the dish and to store the position for each satellite.
The main menu shows the current dish position and target on the top line, then you can see the signal information and various selectable options in the central area. You select an option with the up, down, left and right buttons, then you activate it pressing ok.
The options are:
- Drive east
- will move the dish east.
- will stop the movement of the dish.
- Drive west
- will move the dish west.
- stores the position of the currently selected satellite as the current dish position, that has the effect of recalculating all positions relative to the current one.
- Goto X
- will move the dish to the specified position (you can enter the position using the numeric keys).
- will store the current dish position as the position of the currently selected satellite.
- X Steps East
- will move the dish X steps east (you can enter the number of steps with the numeric keys).
- Enable/Disable limits
- will either enable or disable the softlimits. Take care when you're moving the dish with the limits disabled.
- X Steps West
- will move the dish X steps west (you can enter the number of steps with the numeric keys).
- Set East Limit
- will use the current position as the east limit (i.e. 0) and it will also recalculate all stored positions relative to the new 0.
- Set Zero
- will use the current position as the east limit but it won't recalculate stored positions.
- Set West Limit
- will store the current position as the West Limit.
- Satellite(source) selection
- using the left and right key you can select a different satellite. If it has a position stored, you will see here the position and pressing OK the dish wil go to that position, otherwise you'll see the message Position not set.
- here you can enter the frequency of a transponder you want to manually tune to by pressing OK. Pressing left and right will select the polarity. Note that you select the other parameters in the following entries (that will also tune to the new transponder by pressing OK).
- enter the symbolrate of the transponder you want to tune manually.
- enter the vpid to select when manually tuning a transponder. If it's possible the new channel will be shown on screen.
- enter the apid to select when manually tuning a transponder. If it's possible the new channel will be shown on screen.
- Scan transponder
- will tune to the transponder selected with the previous parameters and scan it for new/updated channels. Note that the operation will be allowed only if the dish is positioned at the currently selected satellite.
if the plugin can find a file for the current source in the "plugins/transponders" subdirectory of the configuration directory, there will be an additional option "Scan Satellite". The two numbers at right are the index of the transponder from where the scanning will start (so that you can make a partial scan) and the total number of the transponders found in the file. If you press left or right you can select a different transponder and its data will be shown in the Frequency and Symbolrate fields. If you press OK all transponders, starting from the selected index, will be scanned. A message and a progress bar will be shown, and pressing any key will stop the operation, leaving the index at the current position so you can resume scanning later on. The header of the screen will show the total number of channels found and the number of new ones.
The name of the transponder file for a satellite is XXXX.ini, where XXXX represents the satellite position in tenths of degree, eg. for 28.2E the filename will be 0282.ini, for 30.0W the filename will be 3300.ini (i.e. (360.0-30.0)*10). The file format is the same as the channelscan plugin, which in turn claims to use the same format as the windows program prog-dvb.
These messages can either appear on screen after a channel switch (if you patched vdr) or in the plugin main menu.
- Dish target
- x, position: x : will show the current dish position while it is moving.
- Channels found
- x, new: x : while scanning a transponder/satellite this message will show the total number of channels found and the new ones.
- Position reached
- when the dish has reached the target position.
- Motor wait
- when there's a reversal of the direction the motor will stop for a couple of seconds.
- Motor error
- when no pulses are coming from the motor (it can be either the motor is stuck, the reed relay isn't working or a problem with the wires, the parallel port or the interface circuit).
- Position not set
- there's no position stored for the desired satellite.
- Not positioned
- some options in the plugin main menu are only allowed when the dish is positioned at the currently selected satellite.
- Dish at limits
- while manually moving the dish it has reached either the east (0) or the west limit.
- Position outside limits
- the specified position is outside the preset limits.
- Scanning, press any key to stop
- this message appears during the transponder or satellite scan in the plugin main menu.
This is the needed interface between parallel port and satellite dish drive.
Please see the README file for an up to date list of known problems
- The plugin will load the current dish position at start-up and stores it on disk each time it detects it has changed. It's possible to lose the actual position if the pc crashes while the dish is moving. In this case you have to manually peak the dish at a known satellite (it may be necessary to disable the limits) and use the "Recalc" function. I'd like to store the position in the cmos ram (in the kernel module) but I don't know where I can find a couple of free bytes (and if the pc crashes while storing the position, it may not have updated the cmos ram checksum).
- When the pc is turned on or off my parallel port sets all data lines at 1, driving both relays for a very short while. Due to the wiring of the relays the motor should not move anyway. If you don't like it you can modify the circuit to add some more logic to avoid the problem.
- vdr assumes that, as soon as a channel has been switched to, the new source (satellite) is valid, even if the dish is moving, so the autoupdate function will assign new/updated channels to the wrong satellite. The plugin's workaround is to disable autoupdate while the dish is moving and restore the previous setting only when it has reached the target satellite. It's possible that the plugin will fail to restore the value of this setting. If you see that channels aren't updating anymore check this setting (main menu->configuration->dbv->update channels, note that while the dish is moving this setting is always "no", so check and modify it only when the actuator is idle).
- in a multi card setup, vdr considers all cards equally capable of providing any source (satellite), regardless to the dish/lnb the card is connected to. This is obviously wrong. Attached to the following post you'll find a patch to configure which sources (satellites) a card can relly tune to: http://article.gmane.org/gmane.linux.vdr/14038
- Vdr now checks for a lock during 5 seconds after switching channels. If the new channel is on a different satellite there won't be a lock at once: depending on the distance vdr will get stuck up to 5 seconds and then, if the position hasn't been reached yet, will show a black screen. See the #Patches section for a patch to reverse to the old behaviour (i.e. vdr doesn't wait for a lock. It doesn't seem to have adverse effects here but YMMV). The same patch also gives more time for the dish to reach the target after starting a recording.