An astronomy firend has a True Technology Supaslim 8 position filter wheel.
This is rather old and does not support the latest ASCOM platform.
The filter wheel has two opto sensors.
The filter carrier has holes at each location, plus an extra one to mark the home position.
Initially I blocked all but one of the original holes except one. This allowed me to use this as the home position reference.
I had to invert the A0 value as the software is looking for a 'flag' as opposed to a 'hole' which works OK.
I have carefully set up the number of steps to each filter loaction.
I use home on reset, that works when the filter is moving anticlockwise. As soon as it changes direction and moves clockwise from say location 5 to location 2 it is out of alignment.
I have repeated this numerous times and get similar results with varying degress of misalignment.
I have made sure the wheel is as free as possible to move so there is minimal drag on it in both directions.
I have connected both sensors now A0 is the Index input and A1 the Home.
My idea is to look for both inputs when homing and once set up only use the index input to confirm position of each filter instead of counting steps.
Unfortunately my programming skills are hobby based rather than using pointers and passing variables between modules.
I've written a basic test program that reads back both IR recievers and serial prints the results.
I can follow the code until it gets to returning the variable from.
int Ldr_Led::get_ldr(void) // read value from photocell
{
int photoval;
if (this->get_led_state() == false) // ensure LED is ON
{
this->set_led_state(true);
}
int photoval1;
if (this->get_led_state() == false) // ensure LED is ON
{
this->set_led_state(true);
}
photoval = analogRead( SLOT0LDR );
photoval1 = analogRead( SLOT1LDR );
// If the sensor is normally covered and open at the index point leave the next line in, eg. hole in a disc
// in this case it inverts the analogRead value.
// If the sensor is normally open and a flag covers it when at the index point then comment out the next line, eg. flag on a disc
photoval = 1023 - photoval;
photoval1 = 1023 - photoval1;
DebugPrint(F("LDR:")); // print the value to the serial port if debugging is enabled
DebugPrintln(String(photoval));
DebugPrint(F("LDR1:")); // print the value to the serial port if debugging is enabled
DebugPrintln(String(photoval1));
return photoval,photoval1;
}
I can't follow how the returned photoval values are used
Many thanks in advance
jools
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Only just found this, sorry.
I cannot assist with user code.
The find home only works when the approach is in the same direction always. If not then it will fail.
I think I made some modifications to the firmware re this, cannot remember, but if you are not running the latest version then here is what I suggest
1. upgrade to latest firmware
2. If you have issues homing with the latest version please le me know and I will then see what else I can do,
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
An astronomy firend has a True Technology Supaslim 8 position filter wheel.
This is rather old and does not support the latest ASCOM platform.
The filter wheel has two opto sensors.
The filter carrier has holes at each location, plus an extra one to mark the home position.
Initially I blocked all but one of the original holes except one. This allowed me to use this as the home position reference.
I had to invert the A0 value as the software is looking for a 'flag' as opposed to a 'hole' which works OK.
I have carefully set up the number of steps to each filter loaction.
I use home on reset, that works when the filter is moving anticlockwise. As soon as it changes direction and moves clockwise from say location 5 to location 2 it is out of alignment.
I have repeated this numerous times and get similar results with varying degress of misalignment.
I have made sure the wheel is as free as possible to move so there is minimal drag on it in both directions.
I have connected both sensors now A0 is the Index input and A1 the Home.
My idea is to look for both inputs when homing and once set up only use the index input to confirm position of each filter instead of counting steps.
Unfortunately my programming skills are hobby based rather than using pointers and passing variables between modules.
I've written a basic test program that reads back both IR recievers and serial prints the results.
I can follow the code until it gets to returning the variable from.
int Ldr_Led::get_ldr(void) // read value from photocell
{
int photoval;
if (this->get_led_state() == false) // ensure LED is ON
{
this->set_led_state(true);
}
int photoval1;
if (this->get_led_state() == false) // ensure LED is ON
{
this->set_led_state(true);
}
photoval = analogRead( SLOT0LDR );
photoval1 = analogRead( SLOT1LDR );
// If the sensor is normally covered and open at the index point leave the next line in, eg. hole in a disc
// in this case it inverts the analogRead value.
// If the sensor is normally open and a flag covers it when at the index point then comment out the next line, eg. flag on a disc
photoval = 1023 - photoval;
photoval1 = 1023 - photoval1;
DebugPrint(F("LDR:")); // print the value to the serial port if debugging is enabled
DebugPrintln(String(photoval));
DebugPrint(F("LDR1:")); // print the value to the serial port if debugging is enabled
DebugPrintln(String(photoval1));
return photoval,photoval1;
}
I can't follow how the returned photoval values are used
Many thanks in advance
jools
Hi
Only just found this, sorry.
I cannot assist with user code.
The find home only works when the approach is in the same direction always. If not then it will fail.
I think I made some modifications to the firmware re this, cannot remember, but if you are not running the latest version then here is what I suggest
1. upgrade to latest firmware
2. If you have issues homing with the latest version please le me know and I will then see what else I can do,
Regards
Robert