Shop OBEX P1 Docs P2 Docs Learn Events
Customer needs consultant, quickly for dual encoder project — Parallax Forums

Customer needs consultant, quickly for dual encoder project

Ken GraceyKen Gracey Posts: 7,392
edited 2015-03-26 17:49 in Propeller 1
Hey there,

I have a customer who has a two-stage need for a consultant who can immediately support their electronic engineering needs.

A computer running Unity is connected to a USB mouse. The customer needs to mimic the mouse input by selecting and using two external encoders connected to hand wheels to simulate the same input signal to Unity. This first phase could use the guts of an optical encoder mouse, or could be recreated on a perf board. This has to be completed within days from today. This simple proof of concept gets the customer over a time-sensitive hurdle. Provided an existing mouse could be used this could be quite easy - selecting the right encoder and wiring several together may take most of the time.

The second phase moves the project into product design, with a Propeller. The Propeller would take the two encoder inputs, and somehow (for you to figure out) mimic the identify of a USB mouse and send the data over USB to the PC. Clearly, at this point the Propeller would provide freedom for additional control needs.

If you are interested please e-mail me today at kgracey@parallax.com. Briefly state your qualifications in a sentence or two. Include rate information. I will forward these to the customer, who is local and nearby Parallax.

Parallax would not be involved in the transaction. Please do not expect a reply from me about why you were or were not chosen.

Thanks -

Ken Gracey
Parallax Inc.

Comments

  • jmgjmg Posts: 15,173
    edited 2015-03-26 12:30
    Ken Gracey wrote: »
    A computer running Unity is connected to a USB mouse. The customer needs to mimic the mouse input by selecting and using two external encoders connected to hand wheels to simulate the same input signal to Unity. This first phase could use the guts of an optical encoder mouse, or could be recreated on a perf board. This has to be completed within days from today. This simple proof of concept gets the customer over a time-sensitive hurdle. Provided an existing mouse could be used this could be quite easy - selecting the right encoder and wiring several together may take most of the time.

    How many does this customer need to build ?
    Ken Gracey wrote: »
    The second phase moves the project into product design, with a Propeller. The Propeller would take the two encoder inputs, and somehow (for you to figure out) mimic the identify of a USB mouse and send the data over USB to the PC. Clearly, at this point the Propeller would provide freedom for additional control needs.
    This is a little unclear - I think you mean the Prop is talking full USB protocol here ?
    ie the Mouse has gone, and the PC thinks the Prop is a genuine Mouse ?
    If so, which one, or is HID emulation required ?

    Is this a full signed-off USB, or a kludge that does not mind half-working ?
    SW-only struggles to do USB properly, so probably should be avoided in commercial designs, but the customer could get a tiny USB chip with mouse-internals, and use the Prop to condition the external encoders.
    SiLabs have little-USB in 3mm x 3mm packages and press release claims 43c/10k
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2015-03-26 12:38
    Hey jog,

    At first, he needs a few. One for the trade show prototype and a backup in case if trouble.

    Second part - Propeller mimicking (perhaps with other hardware?) the mouse, so that the PC thinks it's connected to an HID device. The approach with the USB chip with mouse internals is likely the way to go, using the Prop to condition the external encoders. Yes, it seems you'd want to avoid using the Prop to emulate such hardware that exists.

    I should point out that it is possible all of the goals could be achieved without a Propeller, too, using the chip you mentioned. It depends on what the customer expects in terms of future product capabilities, and what the flexibility is of the PC software (perhaps it can handle serial input from P30/31 too). That's to be worked out with the customer.

    Ken Gracey
  • jmgjmg Posts: 15,173
    edited 2015-03-26 16:05
    Ken Gracey wrote: »
    I should point out that it is possible all of the goals could be achieved without a Propeller, too, using the chip you mentioned. It depends on what the customer expects in terms of future product capabilities, and what the flexibility is of the PC software (perhaps it can handle serial input from P30/31 too). That's to be worked out with the customer.
    Yes, but it can be simpler to use focused blocks, and use KISS.

    I had a quick dig, and I find these 'canned code examples' on the EFM8UB1
    The USB side uses a reasonable portion of the device code space.
     SiLabs Applications examples, UB1, Code Sizes 
    Devices sizes : 8K & 16K 
    
    C:\SiliconLabs\SimplicityStudio\v3\developer\sdks\si8051\v3\examples\EFM8UB1_SLSTK2000A\USB\HID_Keyboard\bin\EFM8UB1_HID_Keyboard.hex
    Code Size :  5361 Bytes
    
    C:\SiliconLabs\SimplicityStudio\v3\developer\sdks\si8051\v3\examples\EFM8UB1_SLSTK2000A\USB\HID_Joystick\bin\EFM8UB1_HID_Joystick.hex
    Code Size :  6910 Bytes
    
    C:\SiliconLabs\SimplicityStudio\v3\developer\sdks\si8051\v3\examples\EFM8UB1_SLSTK2000A\USB\HID_Mouse\bin\EFM8UB1_HID_Mouse_Orig.hex
    Code Size :  13822 Bytes  (includes LCD functions, & printf)
    

    Those all seem to use an ADC Switch Joystick (on the target eval board) as the interface, giving the choice of a DAC output from a Prop, to work as-is, or they would need some code-patching to replace the Joystick with serial input from Prop P30/31 ( which would be more precise than a Switch-joystick.).
    The HID-USB code areas would remain unchanged.
  • jmgjmg Posts: 15,173
    edited 2015-03-26 17:16
    Ken Gracey wrote: »
    The second phase moves the project into product design, with a Propeller. The Propeller would take the two encoder inputs, and somehow (for you to figure out) mimic the identify of a USB mouse and send the data over USB to the PC. Clearly, at this point the Propeller would provide freedom for additional control needs.

    Replying to another thread, (about Parallax no longer selling PS/2 Mice/Keyboards) I came across this on eBay, which is more relevant to this topic...

    http://www.ebay.com/itm/USB-TO-PS-2-PS2-MOUSE-KEYBOARD-CONVERTER-CABLE-ADAPTER-For-PC-Tide-NEW-/161615814111?pt=LH_DefaultDomain_15&hash=item25a10d9ddf

    For moderate volumes, that adapter cable would allow a Prop-centric Mouse emulation, with the USB-Bit all done in a molded cable.

    With this bridge, the Prop now just needs to emulate a PS/2 mouse, and I'd guess there are already OBEX libraries doing that.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-03-26 17:49
    A couple of examples:

    Hacking a Mouse for Encoders
    http://www.boondog.com/tutorials/mouse/mouseHack.htm


    HID-Knob, USB HID keyboard rotary encoder
    https://www.youtube.com/watch?v=t0HXBEH2BeE
Sign In or Register to comment.