Rotary encoder alternative - Blackberry Trackball

Post Reply
solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Hi,

I'm looking at an alternative to the Rotary Encoder and looking at this Blackberry Trackball breakout board as seen below.

I'm looking to get the the LEFT/RIGHT or DOWN/UP to replace the Rotary Encoder anti-clockwise/clockwise directions.

As a direct/drop-in replacement for the Rotary Encoder, I am finding that I can get the switch/button to work; but for file selection direction I can only get it to work in the 'clockwise' direction - the one that is connected to the CK pin (as per https://hxc2001.com/docs/gotek-floppy-e ... otary.html). If I connect the CK pin to any of UP, DOWN, LEFT and RIGHT (well actually not RIGHT, since I have a hall effect chip missing on my board, if you look carefully at the picture below), the I can get the file selection to move right/clockwise.

Would it be possible to get support for this trackball so that it works in both directions - i.e for the DIR pin to receive input like the CK pin?

Code: Select all

                           _____|
                          |     |
                          | USB |
                          |_____|
    Dir OO Ck___________________|
    SDA OO|SCL
    GND OO|VCC3V3
        J7|
          |
__________|


Image

EDIT: More technical details about the trackball breakout board can be found below. It's not exactly the same board, but the it is good reference material:

https://www.sparkfun.com/products/retired/13169

Specifically, the schematics:

https://cdn.sparkfun.com/datasheets/Com ... ut_v13.pdf

EDIT: For the LEDs, I can only turn it either on or off, since the LED pins are meant to connected to a VCC source. So I cannot get it to flash for disk activity, like I can for the RGB encoder.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

Yes this seems definitively possible.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

Jeff wrote:
Sun Mar 17, 2019 9:19 am
Yes this seems definitively possible.
Done !
https://hxc2001.com/custom_fw/

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Jeff wrote:
Sun Mar 17, 2019 12:01 pm
Done !
https://hxc2001.com/custom_fw/
Thank you, that is amazing! Just tried it and it works perfectly!

So now I I can choose to use either UP/DOWN or RIGHT/LEFT (I might join UP to scroll forwards or backwards (or I could join UP with RIGHT and DOWN with LEFT to use both options at the same time.)

Using the trackball to scroll is so much easier.

Now all I need to figure out is how to get the LED lights working correctly on the trackball.

Remember, with my 2.42" OLED screen, I had used the cathode pin of the L4 LED? Well, I'm looking to use the anode pin of the L4 to connect to one of the LEDs of the trackball, which is actually expecting 3.3V or 5V.

The example below won't actually work, and I think I need to put in an inverter circuit between it to interpret the floppy disk activity signal correctly. I assume pin 14 pulls down to GND so that L4 LED lights up when there is floppy disk activity? (Or is that FPI5V_DSELn driving it?)

Image
Last edited by solarmon on Sun Mar 17, 2019 5:05 pm, edited 1 time in total.

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Maybe a circuit like this:

http://www.falstad.com/circuit/circuitj ... %5CsLED%0A

Image

I would have the BLUE LED on all the time, and floppy disk activity will trigger the RED LED - so so the trackball will actually turn purple. This is similar to how I had the RGB Rotary encoder LEDs set up.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

i think i will use the left gpio as multipurposes/functions. One of them will be the step event.

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Jeff wrote:
Thu Mar 21, 2019 11:39 am
i think i will use the left gpio as multipurposes/functions. One of them will be the step event.
OK, that sounds like a great feature!

I'm not really "au fait" with floppy drive technology but I assume you mean "step" as in the the "/STEP" function for stepping between tracks?

Looking at the above schematic snapshot for the Gotek, I'm always confused as to why the L4 LED is connected to the 'DSEL' input - assuming that 'DSEL' stands for 'Drive Select'? I thought the L4 LED is meant to show floppy disk 'activity', not 'selection'?

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Hi Jeff,

Just been testing the Blackberry trackball some more today.

In practice, it seems to be a bit too sensitive - it can step on the slightest of touches. I tried changing to double step, from the menu, but it does not seem to make any difference. Any suggestions on how to make it less sensitive?

Also, the button select also seem to suffer from bouncing. Is there any debouncing that can be done by the custom firmware - or do I need to add some debouncing circuit to it?

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

solarmon wrote:
Mon May 27, 2019 9:39 am
Also, the button select also seem to suffer from bouncing. Is there any debouncing that can be done by the custom firmware - or do I need to add some debouncing circuit to it?
Actually, what I'm noticing is that the issue is when you hold down the button for too long. A very quick press is OK, but if it is too long (but less than when the 'select a drive' option is activated) then it seems to 'bounce' when you release the button (i.e. another select is activated on release).

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

I don't understand : What have you changed ? You have reported that all was fine 2 months ago.
Is it related with the latest version or some kind of regression ?

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Jeff wrote:
Tue May 28, 2019 7:46 am
I don't understand : What have you changed ? You have reported that all was fine 2 months ago.
Is it related with the latest version or some kind of regression ?
Sorry, I should have been a bit more clear. What is different is that previously I was testing it just by holding the Blackberry trackball board in my hands. Now, I have it installed properly in my Amiga 1200:

Image

I am finding that pressing the button is not as easy and I am tending to press the button down slightly longer.

I'll test with other buttons that I had previously tested with and see if I notice the same behaviour.

I think the scrolling sensitivity issue was probably always there, but previously I was not testing for accuracy - just testing that it was scrolling up and down. But now that I'm trying to use it properly, it is more noticeable.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

solarmon wrote:
Mon May 27, 2019 10:05 am
solarmon wrote:
Mon May 27, 2019 9:39 am
Also, the button select also seem to suffer from bouncing. Is there any debouncing that can be done by the custom firmware - or do I need to add some debouncing circuit to it?
Actually, what I'm noticing is that the issue is when you hold down the button for too long. A very quick press is OK, but if it is too long (but less than when the 'select a drive' option is activated) then it seems to 'bounce' when you release the button (i.e. another select is activated on release).
i bet that the up/down signals are changing too randomly when you press/release the trackball ?
So i suppose that masking the up/down signals and adding some timing filtering is necessary when the select button is used.
What do you think ? (Note : I don't have this trackball here ;) )

solarmon
Posts: 82
Joined: Tue Feb 26, 2019 9:38 am

Re: Rotary encoder alternative - Blackberry Trackball

Post by solarmon »

Jeff wrote:
Thu May 30, 2019 11:30 am
i bet that the up/down signals are changing too randomly when you press/release the trackball ?
So i suppose that masking the up/down signals and adding some timing filtering is necessary when the select button is used.
What do you think ? (Note : I don't have this trackball here ;) )
Thinking that it is a 'bounce' issue with the select button, I have tried adding a 1uF capacitor across the JA pins - as per:

http://www.gammon.com.au/forum/?id=11955

Image

However, the same behavior happens, during testing (without connected to the Amiga and with just a normal switch (actually, just bare wires), not with the Blackberry trackball):

1. When I make/break the switch briefly ( up to 0.5 secs?) it works - it switches between "Choose a file" to "T:000/080 S:0", as expected.
2. When I make the switch connection for about 2 seconds it displays the 'Select a drive' option, as expected.
3. When I make/break the switch between 0.5 to 1 seconds it seems to 'bounce' - it goes from "Choose a file" to "T:000/080 S:0" then "Choose a file" again. This is not what I expect. This does not happen the other way around - when it is already on "T:000/080 S:0" and I hold the switch down between 0.5 and 1 second it just goes back to "Choose a file" - it does not go back to "T:000/080 S:0".

(Edit: these behaviors occur with or without the debouncing capacitor).

I expect behaviors 1 and 2, but I do not expect behavior 3.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

ok i will test again this !

(i must admit that i personally don't use the additional select button since the auto-select feature is perfectly fine for me).

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Rotary encoder alternative - Blackberry Trackball

Post by Jeff »

Fixed in the last version. The cause wasn't an "electrical glitch" effect. This was more a behavioural issue.
Thanks for the report.
5 June 2019 : Firmware STM32 USB HxCFloppyEmulator v3.2.2.3a ( -> In the "WIP_Firmware" Folder and https://hxc2001.com/custom_fw/)

- External/Additional select button support : Behavioural fix -> remove glitch-like effect when selecting images.
HXCFEUSB_HFE_beta_firmware.zip

USB_HFE_hxc_floppy_emulator_firmware_release_notes.txt

Post Reply