dgouramanis / OPTOCAPE

Opto Isolated signal buffer cape for BeagleBone Black

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Touch LCD and MachineKit hints?

JetForMe opened this issue · comments

I tried messaging on Tindie but got no reply.

Do you know if your cape will work with the 4D Systems touch cape?

Also, I just got MachineKit installed on my BBB, and I'm having trouble getting going. Do you have an example configuration for OPTOCAPE or any hints? Obviously I'll have to customize it for my specific I/O, but it should be able to at least pretend the cape is attached.

The 4D touch cape & Optocape would conflict. Page 10 shows connections to the headers. First, both capes are interfacing with the LCD pins. Usually that's ok, but in this case the video signals are very high speed. You're likely to get video distortions. Also P1_B pins 14-30 share many connections with Optocape. You could potentially get them working together by modifying the PCBs...

But no reason to do that. Optocape has Touch + LCD capabilities. Optocape can do Resistive touch with no external hardware. You can also do Capacitive or IR touch via USB device (kits like this are popular on eBay). My setup uses an old Sharp 14.1" laptop LCD. I was able to find a resistive touch overlay to match the size. Both the LCD and Touch sensor wire directly to Optocape.

Here is a link to the .dts example. You can adjust the resolution and resistance values to fit your needs. I expect Optocape works with most used screens on eBay. "LVDS Flatlink" is a standardized protocol across many laptops. Although I did try briefly with a newer Samsung screen, and haven't got it working yet. I suggest going for an older model <2010. If you run into problems I'm here to help.

Last I tried Machinekit they were using a Version 3.8 kernel. I was unable to get a custom LCD working with that version. I upgraded to the latest BeagleBone image, and installed BeagleG instead. Works perfectly. https://youtu.be/vZw_jr8YovY

Ah, regarding the cape LCD connection, that's a pity. I really like this touch display. It's capacitive, for one, and generally quite nice. I may end up desoldering the serializer, but I'll look at the pins used by both to be sure before I do.

I'm currently running a Stretch-based MachineKit with a 4.14 kernel. Everything seems to be working, I just don't know yet how to configure it. I'll take a look at BeagleG, too.

Won't damage anything by running both serializers connected, so it's worth a try. You can set 8.11 low to disable Optocape serializer. It may work. Worst case the picture is shaky.

Bigger problem is with GPIO pins 9.14-9.19, 9.21, 9.23, 9.26, 9.30 are conflicting.

So, P9.15, 16, 21, 23, and 30 only conflict if a button board is connected to the other FPC connector. I don't need to use those.

P9.14 is the backlight PWM, connected to JP2. p9.17 (JP14 & 15), 18 (JP5), and 26 (JP1) are part of the capacitive touch sensor, so those would have to be made available. P9.19 (JP30 & 31) & 20 (unconnected on OPTOCAPE) are part of the CAPE EEPROM support.

Conflicting Pins

BBB Header Pin OPTOCAPE Function
P9.14 JP2
P9.17 JP14 & JP15
P9.18 JP5
P9.19 JP30 & JP31
P9.26 JP1

So far, I think I need six direct PRU outputs and 12 direct inputs (although I can probably reduce the number of inputs substantially), plus five additional outputs and two additional inputs. I haven’t yet tried to map those to the available I/O.

Hmm, the ICs aren't labeled. Could you tell me which ones (inputs) to pull, to avoid the conflicts above? I can poke at it to try to find them, but I figure you'd be able to tell me more reliably.

Here is a diagram.

P9.14, P9.17, P9.18 and P9.26 are connected to outputs. If you pull the optos from the sockets the conflict is resolved.
P9.19 is an input, and has a 10K pullup resistor on Optocape.

Thanks. P9.19 should be fine, I think. 10K plenty weak. I have to go out of town for a few days, and this weekend is slammed, but I'll let you know how it goes!

Hmm. I pulled the ICs, plugged in both capes, but the board doesn't come up (no console output, no lights, just the main power LED on the BBB). I tried each cape individually, and it comes up fine. Something's still in conflict.

A bit more info: If I disconnect the LCD/touchscreen from 30-pin FPC connector, but leave both capes stacked, it boots. Doesn't narrow it down much, but it’s less than 30 pins to check.