Author Topic: Re-Create the DataHand - Thumb cluster under development. Project 75% done.  (Read 417088 times)

0 Members and 1 Guest are viewing this topic.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #600 on: Sun, 09 October 2016, 10:39:39 »
invultri,

I found some optic-switch parts in my other box.  I will write the firmware and test it on a breadboard.
It will be without buffer amps, but that makes no difference to the firmware.
Will post pictures and results in a few days.
I will check up on this in some time, there is no schematic provided so I must first reconstruct the workings.

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #601 on: Sun, 16 October 2016, 11:10:29 »

I picked the XRA1404 (same as the 1405 but without the level shifter) for the IO and a NCV7608 for driving the leds. The program used is Kicad (http://kicad-pcb.org/). Btw, I did not keep to the SPI pin numbering of the default teensy libraries but that can be changed.

Edit:
To make it a bit easier here is a PDF version: https://github.com/christianvdstap/dodohand/blob/alternative/sch_and_pcb/finger_sch_spi_v1.pdf

Hi invultri,

I did review the datasheets for those chips, and briefly reviewed your
 schematic: They all look reasonable to me. I think you'll be able to
make a reliably functioning circuit with that combo.

I look forward to seeing pics of the first prototype!

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #602 on: Wed, 19 October 2016, 12:23:56 »
Hi invultri,

I did review the datasheets for those chips, and briefly reviewed your
 schematic: They all look reasonable to me. I think you'll be able to
make a reliably functioning circuit with that combo.

I look forward to seeing pics of the first prototype!

Hi OldDataHands,

Thanks for the review, this will give me enough confidence to create the PCB. As for the first proto, I very much look forward to it myself (even though I have underestimated the amount of work and energy it takes :))

In other news, I will try to complete the thumb 3D design (initial version) tomorrow. I only have to create the side and up keycaps, using math to derive everything. After that I will work on getting the PCB design done on the finger unit and maybe even try some test 3d printing (need to swap the nozzle for that).


Offline hanya

  • Posts: 132
  • Location: Japan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #603 on: Wed, 19 October 2016, 22:02:03 »
Edit:
To make it a bit easier here is a PDF version: https://github.com/christianvdstap/dodohand/blob/alternative/sch_and_pcb/finger_sch_spi_v1.pdf
Hi, invultri

NCV7608 is works like Nch-MOSFET. In your circuit, anode of IRLED is connected to drain of NCV7608 (D1 in the case of row0 line) and VCC is connected to source (S1 for row0).
In figure 21 of the NCV7608 datasheet tells it has body diode. The diode current is quite high even in low source-to-drain voltage. It looks these IRLEDs are always on.

VCC pin of NCV7608 is connected to VCC(+5V from teensy 3.2), it makes logic level of NCV7608 VCC level.
Recommended voltage of VS pin of NCV7608 is range 5.5V to 28V. If you can connect 5V to VS pin, on resistance could be smaller.

If each ICs can have decoupling capacitor near each power pins.
PFU HHKB JP, Sanwa MA-TB38 trackball

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #604 on: Thu, 20 October 2016, 01:18:47 »
Here is the schematic I plan to test on a breadboard.
It's a proof of concept with only 4 keys.
It has everything I need to develop the DodoHand scanner firmware.
The KiCad schematics are at https://github.com/wolfv6/keybrd_DH/tree/master/schematics
The files to look at are dodohand_BB.sch and row_shiftReg_photoInterrupt_BB.sch.
A review or the schematic would be appreciated.

There are some KiCaD issues I am struggling with.
When I get those straightened out on the above schematic, I can draw a schematic of the full DodoHand circuit.
Which will add LMC7101 buffer amplifiers for the IR LEDs, and SN74HC595 shift registers for indicator LEDs.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #605 on: Thu, 20 October 2016, 01:26:05 »
Hi, invultri

NCV7608 is works like Nch-MOSFET. In your circuit, anode of IRLED is connected to drain of NCV7608 (D1 in the case of row0 line) and VCC is connected to source (S1 for row0).
In figure 21 of the NCV7608 datasheet tells it has body diode. The diode current is quite high even in low source-to-drain voltage. It looks these IRLEDs are always on.

VCC pin of NCV7608 is connected to VCC(+5V from teensy 3.2), it makes logic level of NCV7608 VCC level.
Recommended voltage of VS pin of NCV7608 is range 5.5V to 28V. If you can connect 5V to VS pin, on resistance could be smaller.

If each ICs can have decoupling capacitor near each power pins.
Hello Hanya,

Thanks for taking a look, it seems that I have indeed made a couple of mistakes (I am still learning this stuff).
- VCC and VS should be inverted VCC is the logic level and that should be 3.3v. This would have been a sad event in the making.
- The VS being 5v can not be helped by much but it is above the lockout voltage and other parts of the datasheet do use VS at 3V.
- Looking at the datasheet again I need to invert the source and the drain lines as well (looking at the typical application diagram). The leds and photo transistors need to be driven on the high side. Does this solve the problem with the diode current as well ?
- Voltage stabilization capacitors should be placed between VCC and GND on each cmos chip, I have had conflicting advice on this one :)  But I could add them to the XRA1404 and NCV7608, 0.1uF between the VCC and GND seems to be an accepted rule of thumb. Is that good enough or should I start hunting down books on the topic since it seems a bit complicated to do properly ?


Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #606 on: Thu, 20 October 2016, 02:37:02 »
Here is the schematic I plan to test on a breadboard.
It's a proof of concept with only 4 keys.
It has everything I need to develop the DodoHand scanner firmware.
The KiCad schematics are at https://github.com/wolfv6/keybrd_DH/tree/master/schematics
The files to look at are dodohand_BB.sch and row_shiftReg_photoInterrupt_BB.sch.
A review or the schematic would be appreciated.

There are some KiCaD issues I am struggling with.
When I get those straightened out on the above schematic, I can draw a schematic of the full DodoHand circuit.
Which will add LMC7101 buffer amplifiers for the IR LEDs, and SN74HC595 shift registers for indicator LEDs.

I find your design interesting. It could make things easier on the chip side and remove the mosfet driver, at the cost of more chips (board space, soldering). Since you are strobing the leds it is just a matter of a big capacitor to handle the power spikes.

What are the datalines?
5V
MISO
MOSI
CLK
CS1
CS2
Strobe
GND

There is at least one problem I see, the PL is not on triggered on a clock flank but transparent. This means that as long as the CS line is low you can not shift the data. Qoute from datasheet: "When the parallel load input (PL) is LOW the data from D0 to D7 is loaded into the shift register asynchronously. When PL is HIGH data enters the register serially at DS." You can not just connect the CS to the PL, this is the part where I got "stuck" with using the piso chips as you need some additional control for PL.

EDIT: Maybe using a Monostable Multivibrator that puts both the PL high and generates the strobe signal that triggers on the down flank of the CS with an RC time big enough to get a stable signal on the leds would resolve the issue. This would make the strobe signal from the teensy obsolete. You can start shifting the bits out after the RC time has elapsed. Maybe something like: http://i.imgur.com/MuGwLbe.png WARNING needs verification!

EDIT2: Or ... we use that line that is called MOSI to trigger the load, but that depends on how much control you have over the SPI protocol
« Last Edit: Thu, 20 October 2016, 04:37:09 by invultri »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #607 on: Thu, 20 October 2016, 04:12:44 »
Since you are strobing the leds it is just a matter of a big capacitor to handle the power spikes.
By "strobe" I mean power to the IR LEDs is on for a short time while the shift registers read the photo transistors.
In dodohand_BB.sch, strobe power is provided by Teensy LC pins 16 and 17.  No strobe capacitor is used.

What are the datalines?
5V
MISO
MOSI
CLK
CS1
CS2
Strobe
GND
I don't understand the question.

There is at least one problem I see, the PL is not on triggered on a clock flank but transparent. This means that as long as the CS line is low you can not shift the data. Qoute from datasheet: "When the parallel load input (PL) is LOW the data from D0 to D7 is loaded into the shift register asynchronously. When PL is HIGH data enters the register serially at DS." You can not just connect the CS to the PL, this is the part where I got "stuck" with using the piso chips as you need some additional control for PL.
The CS pin is not connected to the 8 parallel load input pins.
In row_shiftReg_photoInterrupt_BB.sch, the 8 parallel load input pins are named A, B, C, D, E, F, G, H.
Pins A and F read two 2 photo transistors.  The other parallel load input pins are grounded, they don't do anything.

A similar setup with one row of keys has been demonstrated on https://github.com/wolfv6/keybrd/blob/master/tutorials/tutorial_4b_split_keyboard_with_shift_registers.md
row_shiftReg_photoInterrupt_BB.sch adds a 74HC125 tri-state buffer chip because dodohand_BB.sch is running two rows of keys.
The 74HC125 only allows the active row access to the MISO line, so that only one row at a time can transmit on MISO.

These pages explain better than I can:
http://www.dorkbotpdx.org/blog/paul/better_spi_bus_design_in_3_steps
http://www.electronics-tutorials.ws/logic/logic_9.html  (74HC125 is an Active “LOW” Tri-state Buffer)


Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #608 on: Thu, 20 October 2016, 05:14:26 »
@wolfw
Ok I get the other guys schematic a bit more now, he does connect the chip select (CS) to the parallel load (PL) line of the 74165. This basically means "As long as CS is low the data on the data lines (DX) present at the moment CS was pulled low is being shifted on each clock (CLK or CP), but any changes on DX during this time is not observed (which is fine)".

As for the strobing, be careful with the power. You are going to need 13 (26 leds in series of 2) * 5mA = 80mA to turn on all leds for one hand.

Good spot on the tristate buffer, it is very much needed. I did notice that the clock enable (CE) inputs are not used, might as well connect them to the CS line as well.

My suggestion not needing the strobe and automatically triggering the parallel load but introducing yet another chip: http://i.imgur.com/Jntical.png

« Last Edit: Thu, 20 October 2016, 05:18:24 by invultri »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #609 on: Thu, 20 October 2016, 11:14:07 »
As for the strobing, be careful with the power. You are going to need 13 (26 leds in series of 2) * 5mA = 80mA to turn on all leds for one hand.
...
My suggestion not needing the strobe and automatically triggering the parallel load but introducing yet another chip: http://i.imgur.com/Jntical.png
Ha ha.  Clever use of a 74LS121 pulse-width modulation chip.
But firmware would be complicated because 74LS121 pulses would be asynchronous with Teensy.

The simplest option would be to leave 52 IR LEDs always on.
My schematic of the full DodoHand circuit will show LMC7101 buffer amplifiers stobing the 26 IR LEDs.

the clock enable (CE) inputs are not used, might as well connect them to the CS line as well.
Good idea, I will test this on the breadboard.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #610 on: Thu, 20 October 2016, 16:23:53 »
As for the strobing, be careful with the power. You are going to need 13 (26 leds in series of 2) * 5mA = 80mA to turn on all leds for one hand.
...
My suggestion not needing the strobe and automatically triggering the parallel load but introducing yet another chip: http://i.imgur.com/Jntical.png
Ha ha.  Clever use of a 74LS121 pulse-width modulation chip.
But firmware would be complicated because 74LS121 pulses would be asynchronous with Teensy.

The simplest option would be to leave 52 IR LEDs always on.
My schematic of the full DodoHand circuit will show LMC7101 buffer amplifiers stobing the 26 IR LEDs.

the clock enable (CE) inputs are not used, might as well connect them to the CS line as well.
Good idea, I will test this on the breadboard.

Its not asynchronous its CS low + RC time (which we know) + some margin (10% of RC time?) of "Startup time" this is actually OK according to what I read from the SPI interface specification. Just wait a little before starting to shift. I recon an RC time of 0.1ms would be plenty to get a stable signal  (cap of 72uF would give 0.1008 ms using the internal 2k resistor) ?
The horror that I see coming is soldering 52 resistors (or 64 if the extra inputs are used). There would be more resistors on the IR leds as well (1 for each led pair, 13 total) to deal with the difference in resistance in the leds themselves.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #611 on: Thu, 20 October 2016, 17:54:49 »
The horror that I see coming is soldering 52 resistors (or 64 if the extra inputs are used). There would be more resistors on the IR leds as well (1 for each led pair, 13 total) to deal with the difference in resistance in the leds themselves.
The 52 pull-down resistors can be SMT resistor arrays (4 resistors per array).
Unused input pins would simply be grounded (no resistor needed).

There are no current-limiting resistors on the IE LEDs.
Instead, current is limited by the number of LMC7101 buffer amplifiers.
2 or 3 LMC7101 in parallel for 26 IR LEDs might be about right, I don't know.
Someone that knows buffer amplifier electronics should do the math or test on a breadboard with 26 IR LEDs.

The 2-row shift register design has advantages compared to 2 I/O expander matrices:
* simpler firmware because strobe is via Teensy pins rather than IOE pins
  (debugging I/O expander code is hard because programming the I/O expander adds a level of indirection i.e. the controller programs the I/O expander)
* faster firmware because strobe is via Teensy pins rather than IOE pins
* faster firmware because scanning 2 rows is faster than scanning 10 rows
* lower-cost parts
* the Scanner_ShiftRegsPISOMultiRow class is already integrated into the keybrd library and tested

disadvantages:
* more solder joints
* larger foot print may require a slightly larger case
« Last Edit: Thu, 20 October 2016, 19:00:51 by wolfv »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #612 on: Sun, 23 October 2016, 14:38:55 »
New DodoHand schematics are at https://github.com/wolfv6/keybrd_DH/tree/master/schematics  ;D

There are two sets of schematics:
1) dodohand_BB will be tested on a broadboard
2) dodohand_PCB is for the DodoHand PCB

Schematics are provided in .pdf and KiCad formats.
An explanation of the schematics is in the README.md.
A review or the schematic would be appreciated.

Next week I will post the results of the breadboard and firmware test.

Thank you.
« Last Edit: Sun, 23 October 2016, 16:28:10 by wolfv »

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #613 on: Wed, 26 October 2016, 13:22:54 »
Next week I will post the results of the breadboard and firmware test.

Thank you.

I look forward to your results :)

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #614 on: Sun, 06 November 2016, 03:58:09 »
The new shift registers design for DodoHand is at https://github.com/wolfv6/keybrd_DH/tree/master/examples/shiftRegs
README, schematics, Arduino sketches, and pictures of breadboards are included.
The breadboard and scanner firmware passed testing.
This is the simplest design that can support both IR LEDs and a trackball.

I will be happy to answer any questions about the documentation.

I did notice that the clock enable (CE) inputs are not used, might as well connect them to the CS line as well.
I tested this, but it did not work because SPI.transfer() is called when slaveSelect is HIGH (inverse of SPI convention is explained in keybrd/src/Scanner_ShiftRegsReadStrobed.cpp)

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #615 on: Sat, 12 November 2016, 14:46:15 »
I had some time to work on the thumb unit again, with the following result:



but I ran into a little snag, it will not fit the PCB as designed...

@OldDataHands
How did you decide on the positions of the thumb keys? I modeled the thumb down key based on the right image and then the PCB seems to be simply to small to fit the side buttons. Am I missing something ?

@wolfv
I did take a look at your schematics. How did the experiments go thus far? Did you try it with the IR Leds already, since you did not plan to add resistors on each led branch I wonder if you got consistent signals on all leds (there will be 13 branches so I wonder if all of them got adequate power due to resistence differences in the leds).

Edit:
For fun after reading the comment that the 74165 was not following the SPI rules (and my brain needing to do something else after being in openscad all day). Here is an autonomous schematic that is following the SPI rules (if all the components work like I think they do). 
« Last Edit: Sat, 12 November 2016, 16:27:15 by invultri »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #616 on: Sat, 12 November 2016, 18:31:17 »
Good to see progress on the thumb cluster.  Looks nice.  :thumb:

For fun after reading the comment that the 74165 was not following the SPI rules (and my brain needing to do something else after being in openscad all day). Here is an autonomous schematic that is following the SPI rules (if all the components work like I think they do). 
Show Image


What is he schematic circuit supposed to do?  Is it a shift register array?  Where are the IR LEDs?  What are the five JFETs for?

@wolfv
I did take a look at your schematics. How did the experiments go thus far? Did you try it with the IR Leds already...

I only tested with two IR LEDs.  "Strobe buffers" on 26 IR LEDs was not attempted.
All other elements in sr4_keys folder passed testing, including the two IR LEDs.
https://github.com/wolfv6/keybrd_DH/tree/master/examples/shiftRegs/sr4_keys

I read some datasheets on "digital buffer", "buffer amplifier", and "Schmitt-trigger buffer" but don't understand enough electronics to figure out which one is suitable for strobing 26 IR LEDs simultaneously.  Any EE out there care to advise us on which one to use?

The following two sections are from https://github.com/wolfv6/keybrd_DH/blob/master/examples/shiftRegs/README.md

# sr4_keys overview (this was tested on breadboard)
The right row has two photoInterrupt switches, which consist of an IR LED and photo transistor.
A 20mA Teensy pin strobes two IR LEDs.
(The 52-key PCB will use strobe buffers instead.  Adding strobe buffers to the circuit does not affect the firmware.)

# Strobe buffer (this is the schematic in sr5_dodohand_PCB, not tested)
To achieve fast polling, 26 keys are strobed simultaneously.
By "strobe" I mean power to the IR LEDs is on for a short time while the shift registers read the photo transistors.
Strobing 26 IR LEDs simultaneously requires much current (high fan-out capability):

    All the IR LEDs at DigiKey are at least 20mA.
    IR LED forward voltage: typ. 1.2 at 20 mA
    26 LEDs * 20 mA/(2 LEDs in series) = 260 mA
    26 LEDs *  5 mA/(2 LEDs in series) =  65 mA

The dodohand_PCB schematic powers the IR LEDs with "strobe buffers".
Some strobe buffer candidates are:
* digital buffer
* buffer amplifier e.g. LMC7101
* Schmitt-trigger buffer

I don't understand enough electronics to know which strobe buffer would work.
Someone that understands electronics can can figure this out.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #617 on: Sat, 12 November 2016, 18:56:44 »
Good to see progress on the thumb cluster.  Looks nice.  :thumb:

What is he schematic circuit supposed to do?  Is it a shift register array?  Where are the IR LEDs?  What are the five JFETs for?
*snip*
Its a replacement for the matrix driver but now SPI style as a single SPI device (and SPI can read and write in parallel, that is what is done in this schematic). It works as annotated, row0-4 and col0-5 are the same ones as on the original schematics (thus the leds / photo transistors are not drawn). Fets are there to deal with the current, the matrix is still sourced and I do not think the 595 can handle it. The only gotcha while using the circuit is that you write the row you want to read for N+1 whilst reading the sample N.

Also I do suggest that you calculate the current based on the typical voltage drop of the IR Leds and the resistors in the original circuit of OldDataHands. The leds are powered by less current than you think, which is a good thing :).

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #618 on: Sat, 12 November 2016, 20:59:42 »
It works as annotated, row0-4 and col0-5 are the same ones as on the original schematics (thus the leds / photo transistors are not drawn).
That sounds a lot like "Shift register matrix" section in https://github.com/wolfv6/keybrd_DH/blob/master/examples/shiftRegs/README.md

Also I do suggest that you calculate the current based on the typical voltage drop of the IR Leds and the resistors in the original circuit of OldDataHands. The leds are powered by less current than you think, which is a good thing :).

Ohm's Law:  If = (Vs - Vf) / R
R = 470 Ohms (IR LED current limiting resistor used in original DodoHand matrix)
Vs = 5 V
Vf = 1.2 V
If = (Vs - Vf) / R = (5 - 1.2) / 470 = 8 mA / IR LED
13 IR LEDs * 8 mA / IR LED = 105 mA strobe buffer

And if a buffer is less than 105 mA, they can be put in parallel.
So now I still need to find out which component to use: "digital buffer", "buffer amplifier", "Schmitt-trigger buffer", or "FETs"?
« Last Edit: Sun, 13 November 2016, 00:49:58 by wolfv »

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #619 on: Sat, 12 November 2016, 21:14:28 »

but I ran into a little snag, it will not fit the PCB as designed...

@OldDataHands
How did you decide on the positions of the thumb keys? I modeled the thumb down key based on the right image and then the PCB seems to be simply to small to fit the side buttons. Am I missing something ?


I didn't refer to the mechanical shape/size of the original thumb switches in my design.
There's relatively little work in the thumb PCB design. If you have a mechanical design that works, I can help get a new PCB designed.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #620 on: Sat, 12 November 2016, 23:28:51 »
Fets are there to deal with the current, the matrix is still sourced and I do not think the 595 can handle it.
TPIC6B595 shift register has same pin out as 595, but is able to sink 150mA per pin, thus eliminating the need for FETs.
http://www.ti.com/lit/ds/symlink/tpic6b595.pdf Continuous drain current, each output: 150 mA Max
https://www.adafruit.com/products/457

Edit:
Another option is to drive the matrix with a MCP23S18 (SPI I/O expander), with FETs on the MCP23S18 strobe pins.
« Last Edit: Sun, 13 November 2016, 00:57:40 by wolfv »

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #621 on: Sun, 13 November 2016, 04:49:28 »
I didn't refer to the mechanical shape/size of the original thumb switches in my design.
There's relatively little work in the thumb PCB design. If you have a mechanical design that works, I can help get a new PCB designed.
Ok, I will continue the work in this direction and redefine the PCB surface area.

That sounds a lot like "Shift register matrix" section in https://github.com/wolfv6/keybrd_DH/blob/master/examples/shiftRegs/README.md
Correct, but it will deal with the timing problem and allows the full duplex writing / reading (just remember that you write for the next read cycle). It will also do the strobe internally.

TPIC6B595 shift register has same pin out as 595, but is able to sink 150mA per pin, thus eliminating the need for FETs.
http://www.ti.com/lit/ds/symlink/tpic6b595.pdf Continuous drain current, each output: 150 mA Max
https://www.adafruit.com/products/457
Unfortunately I want to drive the leds and photo transistors not sink them to prevent crossplay. This makes all the open-drain types unsuitable, if you can find a high drive 8bit SIPO that can source about 35mA for its maximum ratings the fets can be replaced. Do note that the entire circuit runs on 3.3v as well now.

Edit:
Another option is to drive the matrix with a MCP23S18 (SPI I/O expander), with FETs on the MCP23S18 strobe pins.
Yes, a single MCP23S18 could handle it with the external fets. This design does everything by itself and uses the shift registers where with the MCP23S18 you need to do the strobing from software.

Also.. bugfixes and more annotations in the schematic:
« Last Edit: Sun, 13 November 2016, 06:31:37 by invultri »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #622 on: Sun, 13 November 2016, 13:03:20 »
That sounds a lot like "Shift register matrix" section in https://github.com/wolfv6/keybrd_DH/blob/master/examples/shiftRegs/README.md
Correct, but it will deal with the timing problem and allows the full duplex writing / reading (just remember that you write for the next read cycle). It will also do the strobe internally.
So that's what the 74LS121 monostable multivibrator is for. :)

TPIC6B595 shift register has same pin out as 595, but is able to sink 150mA per pin, thus eliminating the need for FETs.
http://www.ti.com/lit/ds/symlink/tpic6b595.pdf Continuous drain current, each output: 150 mA Max
https://www.adafruit.com/products/457
Unfortunately I want to drive the leds and photo transistors not sink them to prevent crossplay. This makes all the open-drain types unsuitable, if you can find a high drive 8bit SIPO that can source about 35mA for its maximum ratings the fets can be replaced. Do note that the entire circuit runs on 3.3v as well now.
Photo transistors can be powered all the time at 3.3v.  Only the IR LEDs are turned on and off.  This was tested on https://github.com/wolfv6/keybrd_DH/tree/master/examples/shiftRegs/sr4_keys
For a 5x6 matrix, all phototransistor always powered is OK if LEDs are strobed one row at a time.
    46 phototransistor not strobed, Collector Dark Current = .1mA
     6 phototransistor strobed, On State Collector Current = 2mA
    46*.1mA + 6*2mA = 16.6mA < 100mA max for Teensy LC 3.3V pin
« Last Edit: Sun, 13 November 2016, 22:05:40 by wolfv »

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #623 on: Sun, 13 November 2016, 19:29:42 »
Hi invultri,

Based on my early testing: https://geekhack.org/index.php?topic=41422.msg838207#msg838207
You may need to consider 200us for reading a stabil result of the switch evaluation (seems to take that long to fully stabilize).

Hi wolfv,

Invultri and I agree that powering all of the leds and/or all of the phototransistors is a mistake as it would tend to add noise into the system. Extra leds means unwanted light possibly hitting the sensor. Extra phototransistors means extra,  unwanted current on the column from each phototransistor that isn't under evaluation.

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #624 on: Sun, 13 November 2016, 21:03:56 »
I didn't refer to the mechanical shape/size of the original thumb switches in my design.
There's relatively little work in the thumb PCB design. If you have a mechanical design that works, I can help get a new PCB designed.
Ok, I will continue the work in this direction and redefine the PCB surface area.


Cool. If you can provide me with the locations of the required holes, both for electronics and switch mounting, then I'll create a new PCB.
You'll (of course) also have to enlighten me regarding the layout of the matrix that you'd like to have.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #625 on: Sun, 13 November 2016, 22:04:11 »
powering all of the leds and/or all of the phototransistors is a mistake as it would tend to add noise into the system. Extra leds means unwanted light possibly hitting the sensor.

Good call.  Glad you caught that one. :thumb:

So DodoHand with photoInterrupt switches will have to be on 5x6 matrices.
« Last Edit: Sun, 13 November 2016, 22:11:32 by wolfv »

Offline test321

  • Posts: 15
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #626 on: Mon, 14 November 2016, 01:55:27 »
what happened with sinusoid?

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #627 on: Tue, 15 November 2016, 14:30:50 »
Hi invultri,

Based on my early testing: https://geekhack.org/index.php?topic=41422.msg838207#msg838207
You may need to consider 200us for reading a stabil result of the switch evaluation (seems to take that long to fully stabilize).
Changed the setup to make it 200us

Hi wolfv,

Invultri and I agree that powering all of the leds and/or all of the phototransistors is a mistake as it would tend to add noise into the system. Extra leds means unwanted light possibly hitting the sensor. Extra phototransistors means extra,  unwanted current on the column from each phototransistor that isn't under evaluation.
Here is a version with the matrix where the leds are sunk via the fets and the photo transistors are sourced via the 595.

And.. this should make a roll-your-own SPI compatible matrix driver based on shift register and supporting full duplex. Not sure if this is the circuit to go for, but its pretty neat.
Edit: Now if only I did not forget the 3.3v that needs to be forwarded to the thumb unit as well.

Cool. If you can provide me with the locations of the required holes, both for electronics and switch mounting, then I'll create a new PCB.
You'll (of course) also have to enlighten me regarding the layout of the matrix that you'd like to have.
Will do, I think I can sneak in some more design time this friday. I need to create and place the "up" button, reinforce the backside of the anvils and make the frontside of the anvils a bit sturdier. Some assembly drawings would be nice as well. It will be bear time once I get the thumb design V1 done.

Now if I am really awake this weekend I am considering of swapping the hotend of the 3D printer to the 0.25mm and actually try to print some of the designs. ... makes me wonder where that tinned metal sheet went that I ordered some time back.
« Last Edit: Tue, 15 November 2016, 14:50:43 by invultri »

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #628 on: Tue, 15 November 2016, 15:51:37 »
this should make a roll-your-own SPI compatible matrix driver based on shift register and supporting full duplex.

Very nice!   :thumb:

Offline sinusoid

  • Posts: 160
  • fd > ESC
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #629 on: Tue, 15 November 2016, 17:06:35 »
what happened with sinusoid?

The usual stuff. Food, money, deadlines.

Worry not, I see Invultri's at it! :D

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #630 on: Sun, 27 November 2016, 11:50:30 »
The usual stuff. Food, money, deadlines.
Worry not, I see Invultri's at it! :D
I am still at it yes, it takes a bit of effort :)

The first revision of the thumb unit is now live on my github. Next step would be to actually try and print it, hopefully this week.


@wolfw
Do you have an open drain IC in your electronics box? If so could you test this:

This would allow the use of the MCP23S18, but I do not believe it will work. Do note that the schematic uses a germanium diode.
« Last Edit: Sun, 27 November 2016, 16:04:48 by invultri »

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #631 on: Sun, 27 November 2016, 14:57:22 »

Do you have an open drain IC in your electronics box? If so could you test this:
Show Image

This would allow the use of the MCP23S18, but I do not believe it will work. Do note that the schematic uses a germanium diode.

I don't understand how this could could be useful with more than one switch on a column.
What I see is that the output on the column would be high if any switch is not pressed (i.e. can only be low if all switches on the coulmn are pressed).
Am I missing something?

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #632 on: Sun, 27 November 2016, 16:55:10 »
I don't understand how this could could be useful with more than one switch on a column.
What I see is that the output on the column would be high if any switch is not pressed (i.e. can only be low if all switches on the coulmn are pressed).
Am I missing something?

Well I am often wrong about these things that is why I asked for a test. My mind sees this:

I still do not believe it is going to work however. I need either a) a good simulator for circuits or b) a breadboard and some components and definitely some sleep as the alarm will ring in less than 6 hours.

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #633 on: Sun, 27 November 2016, 19:35:52 »
Well I am often wrong about these things that is why I asked for a test. My mind sees this:
Show Image

I still do not believe it is going to work however. I need either a) a good simulator for circuits or b) a breadboard and some components and definitely some sleep as the alarm will ring in less than 6 hours.

Ahh. I think this will work with one small tweak: A high-ohm pull-down after the diode to ensure
that the voltage after the diode discharges when the switch is closed. (Level of need will depend
on the characteristics of the input, but shouldn't hurt in any case. something like 500kOhm would be a
good place to start.

Thanks for the extended diagram - I needed the extra help understanding your column concept.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #634 on: Sun, 27 November 2016, 19:52:34 »
I need either a) a good simulator for circuits or b) a breadboard and some components.
Yes.  There will be many more trial and error before it's all done.
It's better to do your own testing because trial & error iterations are faster that way.

Breadboard has the advantage of testing the scanner firmware before making a PCB.
Scanner firmware can be developed and tested on a 2x2 matrix on breadboard similar to this:
https://github.com/wolfv6/keybrd/blob/master/tutorials/tutorial_4c_split_keyboard_with_IOE.md

Breadboards and jumpers from China are inexpensive.  I bought a few from eBay so I don't have to take one breadboard apart to start another test.
If you're looking for ideas on what parts to stock up on, here is a parts list for a keyboard breadboard kit: https://github.com/wolfv6/keybrd/blob/master/tutorials/breadboard_keyboard_supplies.ods
« Last Edit: Mon, 28 November 2016, 03:10:33 by wolfv »

Offline Interface

  • Posts: 9
  • Location: Sweden
    • Chronicle of my projects
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #635 on: Mon, 28 November 2016, 01:13:05 »
Great you're making progress guys! I created a channel #dodohand on Freenode if you're interested.
I thought it could speed up the process a bit if we can talk to eachother directly.

Decided today I should work on the thumb cluster too instead of making my own design from scratch. Which I haven't gotten very far with yet anyway.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #636 on: Mon, 28 November 2016, 15:34:56 »
Great you're making progress guys! I created a channel #dodohand on Freenode if you're interested.
I will lurk around in there :)


Well I am often wrong about these things that is why I asked for a test. My mind sees this:
Show Image

I still do not believe it is going to work however. I need either a) a good simulator for circuits or b) a breadboard and some components and definitely some sleep as the alarm will ring in less than 6 hours.

Ahh. I think this will work with one small tweak: A high-ohm pull-down after the diode to ensure
that the voltage after the diode discharges when the switch is closed. (Level of need will depend
on the characteristics of the input, but shouldn't hurt in any case. something like 500kOhm would be a
good place to start.

Thanks for the extended diagram - I needed the extra help understanding your column concept.
I thought that those pulldowns would be needed. Its a shame that there will be a continues leakage current though. The only reason I wanted to explore it was to investigate if I could use open drain chips (like the MCP23S18 but that still can only sink 25mA -_-) to simplify the design.

However, with a bit of thinking I managed to get the last negative effects out of the SPI driver. It will not engage any rows when the row address is 0 (not set), it will engage at most 1 row, it switches on the high side and it will have 5 spare outputs.

I name it: A full duplex 8bit SPI matrix driver with internal strobe function and 5 external outputs, 2 external inputs. That means all basic functions are covered on a single SPI address.
But ... deary me that is a lot of chips  :-\.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #637 on: Mon, 28 November 2016, 16:53:54 »
full duplex 8bit SPI matrix driver with internal strobe function and 5 external outputs, 2 external inputs
Fast, with room for 5 indicator LEDs, and only 6 connecting wires between hands. :thumb:  I am impressed!

Offline OldDataHands

  • Thread Starter
  • Posts: 280
  • Location: Michigan
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #638 on: Tue, 29 November 2016, 01:50:22 »

The first revision of the thumb unit is now live on my github. Next step would be to actually try and print it, hopefully this week.
Show Image



I finally checked out your scad and had a very brief look at the thumb: Looks to me like 2 out of 3 of the
thumb switch mounting holes don't leave room for the head of the screw. Other than that it looks really
promising. I'll have a look at some of the inner geometries later this week.  Exciting Stuff!

Let me know when you've got some confidence in the layout and I'll start at the PCB.

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #639 on: Tue, 29 November 2016, 03:59:30 »

I finally checked out your scad and had a very brief look at the thumb: Looks to me like 2 out of 3 of the
thumb switch mounting holes don't leave room for the head of the screw. Other than that it looks really
promising. I'll have a look at some of the inner geometries later this week.  Exciting Stuff!

Let me know when you've got some confidence in the layout and I'll start at the PCB.

I totally did not think about screw heads :x making everything fit took my attention. Will fix that minor issue this week. I have also changed the positions of the leds and screws. If you need help with understanding the scribles just shout, the code style is quite a bit different.

For testing the layout I created a printable pcb which has pins instead of holes. Using that we can verify everything before creating the pcb.
« Last Edit: Tue, 29 November 2016, 04:04:56 by invultri »

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #640 on: Tue, 29 November 2016, 14:14:29 »
So ... I wrecked the hotend, ordered a new one to replace it. I am afraid there is a slight delay in the printing.

Offline wolfv

  • Posts: 269
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #641 on: Tue, 29 November 2016, 14:46:01 »
But ... deary me that is a lot of chips  :-\.
Tristate ICs come in packages with 1, 2, or 4 tristates in one IC.
So one tristate IC could replace the four tristate ICs.

The 74AHC1G126 worked on my breadboard keyboard on  Reply #616 (the 74HC125 shown on your schematic did not work).

Are you putting as trackball on this version?
« Last Edit: Tue, 29 November 2016, 15:42:20 by wolfv »

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #642 on: Fri, 09 December 2016, 10:18:23 »
A quick update from me, the hotend arrived so I can restore the printer. However I have the flu throwing a monkey wrench into that plan.

(Edit) Up and running again


(Edit2)
@OldDataHands
Added clearance for the screws to the thumb side carriers
« Last Edit: Sat, 10 December 2016, 08:53:12 by invultri »

Offline invultri

  • Posts: 40
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #643 on: Sat, 24 December 2016, 11:45:47 »
Hello All,

Currently I am trying to print the pieces of the thumb unit. The good news with this is that it seems that I can get the level of detail required even with the parts this small. There are several issues that I am facing however:

- Stringing / Oozing during print. I did not have any issues when printing bigger objects with the 0.4 but with these tiny things I get a lot of stringing, this makes the fitting of the parts difficult
- Small bridges sagging. Bridges (on top of the led housings) have a tendency to sag, I need a solution for that otherwise the leds just won't fit.
- Small imperfections around corners. This leads to rough walls at parts which will make the sliding more difficult
- Strength. The parts are just not as tough as I hoped, especially with the other 3 issues, I can easily break them. This is not good if I want lasting parts.

So on and off I am experimenting with different printer settings where I can hopefully get to a point where I have workable parts.

Offline 1

  • Posts: 1
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #644 on: Tue, 28 February 2017, 03:36:21 »
How far along is this? I may be able to provide a bit of funding to take this into production at a larger scale if anyone's interested.

Offline Interface

  • Posts: 9
  • Location: Sweden
    • Chronicle of my projects
How far along is this? I may be able to provide a bit of funding to take this into production at a larger scale if anyone's interested.
Pretty far I'd say, invultri has designed a thumb cluster to go along with OldDataHands OpenSCAD-files of the finger keys, those have been printed through Shapeways. invultri's thumb cluster hasn't been printed yet afaik. Also they seem to have gotten far on the electronics and software.

Now that I'm working full time and have a decent income I should order prints from Shapeways for invultri's thumb cluster. He's trying to print it using FDM, I tried printing OldDataHands parts on a Zyyx 3d printer but it melted into a puddle because the keys were too thin, didn't even bother with the key carriage. The outer barrier around the keys printed without issues but I think some parts are probably too small for FDM because of heat conduction. In my view there should ideally be a version that can be printed using FDM to lower the barrier of access to a HID like this to potentially lowering the barrier of access to as many as possible who suffers from repetitive strain injuries.

Anyways I've made some more progress on my own "version" of a HID optimized for ergonomy recently. I don't have any time frame for release or anything, it might not even ever be finished because of technical reasons(as an optimization problem the search space might be too large to ever find an optimal solution, the software I'm using contains bugs that might get in the way, moreover the execution speed overall is a bit slow). It's more like a personal research project and I might start over and make a more customized software solution for solving the problem. My hope is to make it work eventually anyway and be better than anything before it.

So for a while I've been writing a genetic programming algorithm for Grasshopper, an algorithmic CAD-software. I found a genetic programming plugin for Grasshopper called Embryo but it lacked the features I needed for this project but then last week the developer released a new version that solved those issues so now I'm back on track.

https://github.com/johnharding/Embryo

Here's some progress from last weekend:


I've gotten further than what's in the gif since last weekend. Now it can place keys randomly over a surface where the material gets cut away to make slots for the keys. The next step is to make the surface be able to take any shape even surround the hand. The keys needs to have more shape parameters with different mechanisms, right now there's only buttons that can be pushed linearly not angularly.

I recently got a hall sensor to play with, so it'd be nice to use those. Potentially every key could be analog and not just simple switches and they'd practically never wear out.

Now is also the time to figure out how to to make a feedback loop between any of the computational biomechanics softwares out there. I'm looking at OpenSim since it has a Python API. I've looked for simulation models that can give feedback on wear of tissues in the hands and arms but haven't found anything that completely fits the bill yet.

I'll also be ordering a Leap Motion soon for motion capture of hands where I'll be rating motions on myself and friends by how easy they are to carry out individually and in combination with other motions. Ease of motion and least amount of wear on tissues will be the objective function for the driving the optimization loop.

If you've got any questions or suggestions I'm happy to respond :)
« Last Edit: Thu, 16 March 2017, 00:19:43 by Interface »

Offline dantan

  • Posts: 288
Very exciting to think that maybe by this time next year, the Datahand II will be available on Massdrop...

Offline jameschaucer

  • Posts: 3
If this happens, put me on the list to buy one immediately. I now have 2 broken dataHands and I'm on my last one. Waiting on ebay for another one.

Offline ldwoodworth

  • Posts: 1
I remember seeing one of the original Datahands as a child and wanting to try it, but never got the chance. I'd love to get one of these if they become available! Currently working on making an Ergodox.

Offline feeQs

  • Posts: 2
Re: Re-Create the DataHand - Thumb cluster under development. Project 75% done.
« Reply #649 on: Mon, 11 December 2017, 16:01:21 »
Hey guys, it's almost a year since your last activity, is the work still going? There're plenty of fancy new keyboards on the market but none of them beats the DodoHand's potential. If you need any kind of help to keep it going just tell me.