PDA

View Full Version : Opencockpits Encoder 2 card



egkkman
11-12-2011, 01:53 PM
Hi,

I have been trying to get an encoder to work with an Opencockpits encoder 2 card. I cannot connect the encoder directly to the master card as it is a full cycle type.

I have connected the encoder to the encoder two card, following the wiring diagram. I have connected the output from the encoder card to two consecutive inputs and ground in the same group of ten on the master card. I have provided a 5V supply to the encoder card although I am not convinced this is needed.

When running the contolador programme the encoder is not detected at all. Now I feel I am missing the obvious here but have tried for a couple of hours to get this to work.

I am certain the conenctions have been made correctly on the encoder card and the correct inputs have been used on the master card.

I have two encoder cards and have tried both, so unless they are both faulty I am not suspecting a duff card.

Any help or suggestions will be very gratefully recieved.

Thanks

Dave

iwik
11-12-2011, 08:47 PM
Hi Dave,
I tested one of these cards out for someone using a variety of encoders but could not get reliable operation.
The docs dont say what type these can handle. Looking at the layout it appears to me to be an interface
for a Gray optical encoder. Maybe someone else has had luck. Although if i remember rightly i have read
other may have had trouble also.
Sorry i couldnt be of any more help.
Les
P.S se this link.

http://www.hoddo.net/ocboard.html#encoder

egkkman
11-13-2011, 05:13 AM
Hi Les,

Thanks for taking the time to reply.

According to my reserach the card should work with full cycle (1:1) Gray type encoders, which i what I have.

I have read about a PIC code, I assume the card comes with this code as it looks like a technical nightmare to flash the chip (or whatever the correct term is). Accrdomg to Opencockpits, built cards come ready to work.

The thing I find odd is that there is nothing at all shown in the Controlador window when I turn the encoder.

Thanks for the link. I think OC must have changed their design as the card shown in the diagram is not the same as mine.

Anyway, I'll spend some more time on it today.

Thanks again.

Dave

Peter_Pilot
11-13-2011, 07:37 AM
Dave,

When I first tried my encoders card it wouldn't work, the solution in my case was to reduce the refresh time in controlador.ini

I hope have success soon, good luck,

Peter.

jonesthesoftware
11-13-2011, 07:44 AM
Hi Dave
what encoder are you using?( I assume you are using the USB expansion)
Start with basics--- 5volt supply to master card and encoder card?
Run SIOC and see if your USB expansion card comes up with an address e.g IDX=*-IOCARDUSB-device =XX where xx is the address of your USB expansion cards. If no address plug in a different USB port don't use unpowered USB hubs.
Programming the PIC is reallly easy and costs about £10 for a PIC programmer from ebay, the software is free, I've reprogrammed mine to use Elma E37 dual encoders and they work a treat.
regards
geoff

egkkman
11-13-2011, 08:27 AM
hi Peter & Geoff,

Thanks for your replies.

I am using the USB expansion card with 5V supply. The encoders are gray type 1:1 from Sure electronics. They have 20 detents.

I will try altering the refresh rate, thanks for the tip.

I will also check the IDX= address, again thanks for the tip.

Glad to hear programming the PIC is easy. I am assuming that the encoder card must be supplied with a PIC code already?

I've done my chores so am just off to have another go at solving the problem.

Fingers crossed.

Dave

jonesthesoftware
11-13-2011, 09:11 AM
Hi Dave
don't forget the 5v to the encoders card.
Yes the assembled encoder card comes with the PIC programmed but not sure about the kit form though. If you need it I can re-programme your PIC for the software that accepts the ELMA E37 encoders, just post it to me with SAE, I 'm in South Wales.
regards
geoff

egkkman
11-13-2011, 09:33 AM
Hi Geoff,

I have checked the IBX address and that looks good to me.

I have just tried another type of encoder and again nothing.

The card does have a 5V supply to it.

I have other switches working off the master card so I don't think there is a problem there.



Thanks for the offer of flashing the cards for me, I might well take you up on that, but first I feel I should elliminat all other possible issues. It just seems odd to me that neither encoder works and that there is no response at all form controlador.

I tried lowering the refresh rate as Peter suggested, again no change.

I'll double check the 5V supply is okay other than that I'm running out of things to try!

Thanks again

Dave

jonesthesoftware
11-13-2011, 09:47 AM
Hi Dave
check that if you are using only 1 master card it is plugged into J1 on the USB expansion card. Next master card goes to J2 etc.Then check the connection from J2 or J3 of the master card, pins 1-9 are input with the common ground on pin 10. this ground should go to pin 9 on the encoders card. the encoder connections are 1-phase A, 2-GND, 3-phase B, 4-not used
regards
geoff

egkkman
11-14-2011, 03:54 AM
Hi Geoff,

Okay, I'm stumped!

I have tried your suggestions plus I have altered the connections and used number four encoder position on the encoder card instead of number one, I have tried a different encoder, I have checked (with a meter) continuity of connections via the ribbon cable, the 5V supply is exactly 5V and does not fluctuate and used your advice, all to no avail.

In your latest post you mention ensuring that I have used J2 & J3 for inputs 'into' the master card, I stand to be corrected but I think the inputs are J3 & J4, J2 is general output and J1 is the output to the display card. If you are correct and I am not, it might explain the problem however, I am pretty sure I am correct.

I do have other inputs into the same ribbon cable and they work perfectly.

I also have a servo card and two display cards. I hope these are not as frustrating to set up, I might just pack up and go home!!

I do appreciate you trying to help, you have given me some items to check and knock off the possible problem list which is very useful.

Thanks

Dave

jonesthesoftware
11-14-2011, 05:18 AM
Hi Dave
sorry fumble fingers on keyboard, yes of course it's J2/J3, have you got a CTS288 encoder you could try? This is guaranteed to work with the encoders card right out of the box. If that doesn't work maybe the card is faulty.
Do you have skype? I could possibly help you via that.
regards
geoff

egkkman
11-16-2011, 06:45 AM
Hi Geoff,

Sorry to have gone quiet, I have been busy at work but also have tried some other things to get the encoder to work, no joy though. I have another thing to try and then I might take up your kind offer to flash the encoder card to see if it solves the problem.

I tried connecting two encoders, one at a time, using the same master card inputs (32 & 33) as I am using for the encoder 2 card. The 1st encoder, the one built into the MCP only showed up one input, 33 and not input 32 (I guess if I swapped the connections over 32 would have shown and not 33). Nonetheless I tried a SIOC script but it did not work.

I tried the same with a second different type of encoder, this time inputs 32 & 33 showed up in controlador. Again it did not work in the sim.

I am going to check my script or find one of the Internet in case I have made an error in it (likely).

I hope to try the alternative script this evening.

Thanks

Dave

Dawid Szczeblewski
02-22-2012, 12:26 PM
Dave
Did you have any success with the encoders??
I am having exactly the same problem and have spend hours on it to no avail.
I am using grayhill optical encoders with 32 detents for 1 full rotation. I am pretty sure my connections are right ( all according to sketchy OC instructions)
i want to try changing refresh rate.. but which line in sioc.ini is it??

Dawid

egkkman
02-22-2012, 01:47 PM
Hi Dawid,

Firstly I am sorry to hear of your frustration, I can truly sympathise.

I have not been able to solve the encoder problem. The OC card just will not register the encoders at all.

I have tried to contact OC via their forum but they simply do not respond. I wrote to them via their sales e-mail address but could not make head nor tail of their reply.

I have the ecoders connected to Leo Bodnar cards but it means they are very slow, I have lived with this for months now and as it happens a light is shining from the end of the tunnel.

I have bought some POKEYS 55 cards, they are very good (Wendy who sells them is extremely helpful, I cannot recommend her highly enough). I plan to try one of them with one of my encoders this weekend. If that fails I will be removing my MCP and EFIS units and rebuilding them, something I have tried hard to avoid. If it works then Wendy will be getting a bit more of my childrens inheritance.

If the POKEYS does not work (I'll let you know either way) my advice to you is bite the bullet and either use an alternative I/O set up or use the recommened encoders, or else book yourself a nice rubber room in the local loony bin!!!

Sorry I could not be more helpful.

Good luck.

Dave