Sorry, 156 keys with a 12x13 matrix would be the max I think.
I know once again I am exhibiting my ignorance, but this computer has 512Mb RAM but isn't enough for any keyboard larger than 16 keys? I don't understand! It looks 100x as powerful as the teensy, but can't do what the teensy can do?What everyone else had already said. But, without knowing the specifics of the processor, it probably has capacity for at least 25 GPIO pins but they may have been left off the board for cost/size reasons.
The Raspberry Pi, for example, has 17 GPIO pins. Enough for a 72-key board. But it's too big to fit inside a keyboard case.
Doesn't count. Most other keyboards can fit inside that case.The Raspberry Pi, for example, has 17 GPIO pins. Enough for a 72-key board. But it's too big to fit inside a keyboard case.
Says who?Show Image(http://i.imgur.com/gn0NGMz.jpg)
:)
What everyone else had already said. But, without knowing the specifics of the processor, it probably has capacity for at least 25 GPIO pins but they may have been left off the board for cost/size reasons.... and because the design isn't finalized. It is not supposed to ship to backers until a year from now.
Only 8 GPIO, not enough for any keyboard larger than 16 keys. Kind of a shame, it would be awesome to build a Linux-powered keyboard. Imagine programming your board by plugging a monitor into it!That's not a valid argument... Just use a 16-bit shift register (e.g. 74165) and you should easily be able to drive 100+ keys. I fail to see how you can solder one hundred keys and as many diods and consider adding a shift register anything more than a "detail".
I suppose at that clock speed you could probably use shift registers and still achieve a 1KHz polling rate.
I know once again I am exhibiting my ignorance, but this computer has 512Mb RAM but isn't enough for any keyboard larger than 16 keys? I don't understand! It looks 100x as powerful as the teensy, but can't do what the teensy can do?What everyone else had already said. But, without knowing the specifics of the processor, it probably has capacity for at least 25 GPIO pins but they may have been left off the board for cost/size reasons.
The Raspberry Pi, for example, has 17 GPIO pins. Enough for a 72-key board. But it's too big to fit inside a keyboard case.
I know once again I am exhibiting my ignorance, but this computer has 512Mb RAM but isn't enough for any keyboard larger than 16 keys? I don't understand! It looks 100x as powerful as the teensy, but can't do what the teensy can do?What everyone else had already said. But, without knowing the specifics of the processor, it probably has capacity for at least 25 GPIO pins but they may have been left off the board for cost/size reasons.
The Raspberry Pi, for example, has 17 GPIO pins. Enough for a 72-key board. But it's too big to fit inside a keyboard case.
Not satisfied with showing you half my ignorance I will proceed to show you the rest by wondering aloud why we can't use that shift register or whatever other people are talking about, and connect to this little computer. I imagine it is just a tiny board with a chip on it and tons of I/O pads like the teensy, no? Production cost of this thing shouldn't be that great?
Teensy has the big disadvantage of offering insufficient IO if you're doing direct wiring on a fullsize board and LEDs. I imagine if a shift register thing existed, it would resolve the problems normally solved by the teensy++, and still give you tons of other great functions. With 512mb memory I think you can store every keypress you ever made in your life. (That's meaningless to normal people, but we're geeks here, so let's not talk about normal behaviour) :thumb:
My original thought was a Bluetooth keyboard that could have a built in web server that could be accessed via wifi that could allow the keyboard to be configured. And yeah, it's about half the price of a Teensy.
I signed up for a chip pocket. not because i want to hack hardware and do things with gpio, but because it looks cool.
Speaking of which, does it mean that this computer might offer a keyboard wifi capabilities if signals were passed through them?If someone created the firmware to do so, yes, a keyboard with this thing inside would be Wi-Fi capable. That said, your computer would also need some kind of software installed to talk to a Wi-Fi keyboard. But since the chip also has Bluetooth, and since all major computer OSes already know how to talk to a Bluetooth keyboard, I'm not sure what you would gain. Wi-Fi is also more battery-hungry.
Samsung has announced a new line of dev boards, called ARTIK (http://artik.io). Three boards - ARTIK 1, 5 and 10. The ARTIK 5 is the most interesting to me - similar to the C.H.I.P. it has 4GB storage and 512MB of RAM, as well as 47 GPIO, 4 I2C, 2 UART, 1 SPI and 1 I2S.
Only 8 GPIO, not enough for any keyboard larger than 16 keys. Kind of a shame, it would be awesome to build a Linux-powered keyboard. Imagine programming your board by plugging a monitor into it!Raspberry pi can achieve MHz rate gpio speed: http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/
I suppose at that clock speed you could probably use shift registers and still achieve a 1KHz polling rate.
Well, a basic question: can this board emulate a USB keyboard for the computer it is connected into?
As for the lack of GPIO pins, there are many ways to wire up a keyboard matrix: http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/Only 8 GPIO, not enough for any keyboard larger than 16 keys. Kind of a shame, it would be awesome to build a Linux-powered keyboard. Imagine programming your board by plugging a monitor into it!Raspberry pi can achieve MHz rate gpio speed: http://codeandlife.com/2012/07/03/benchmarking-raspberry-pi-gpio-speed/
I suppose at that clock speed you could probably use shift registers and still achieve a 1KHz polling rate.
For scanning a keyboard matrix, why would shift registers be too slow?
Of course, unlike a real microcontroller, it runs a non-realtime OS that may steal control from you for many miliseconds if it wants, especially as it is a single core.
I don't remember saying the Raspberry Pi would be too slow. But why would you use that? It's huge compared to a Teensy and doesn't add anything the Teensy can't do. The CHIP at least has native Bluetooth, which is a big plus. It's also a lot smaller than the Raspberry Pi and cheaper than a Teensy.I linked that Raspberry pi post because it should have a similar GPIO speed to this C.H.I.P. It seems you were wondering what speed it would be for driving shift registers.
I don't remember saying the Raspberry Pi would be too slow. But why would you use that? It's huge compared to a Teensy and doesn't add anything the Teensy can't do. The CHIP at least has native Bluetooth, which is a big plus. It's also a lot smaller than the Raspberry Pi and cheaper than a Teensy.I linked that Raspberry pi post because it should have a similar GPIO speed to this C.H.I.P. It seems you were wondering what speed it would be for driving shift registers.
No, I didn't doubt this board could handle a 1KHz polling rate, even with shift registers. But I think an I2C I/O expander chip would be a better way to go for this board, since it's easier to find those with 20+ I/O pins, and I think I2C usually runs at about 100kHz or something, so no speed issues there...I2C seems to be much slower than shift registers in this case (only 100kHz as you said), and you can chain shift registers infinitely to get more I/O pins with no impact in the speed (correct me if I'm wrong) for this use case. But Ergodox used an I2C for matrix scanning, as it needs only 2 data pins plus 2 for power to communicate between halves, and it seems to work sufficiently well. I just read about this this week, but I suspect shift registers are better and cheaper for this, as you can probably spare 3 data pins.
Of course, unlike a real microcontroller, it runs a non-realtime OS that may steal control from you for many miliseconds if it wants, especially as it is a single core.... and there's the rub.
No, I didn't doubt this board could handle a 1KHz polling rate, even with shift registers.Not really "even with"... Teensy emulate a shift register when it's scanning the keys. You won't loose any speed. And it'll be faster (and simpler) than I2/C, although you don't need this speed at all.
Of course, unlike a real microcontroller, it runs a non-realtime OS that may steal control from you for many miliseconds if it wants, especially as it is a single core.Should you run it in a keyboard, I think you may want to use a RT Linux or RT OS. But keyboard scanning is such a slow process that I don't think that's really needed in practice.
A user isn't going to be happy with a keyboard that needs 30 seconds from plugging in to working, either.I agree, but shut down all useless services in a keyboard and tweak a little bit the boot and you'll get a 2s, 3s tops cold boot time.
I2C seems to be much slower than shift registers in this case (only 100kHz as you said), and you can chain shift registers infinitely to get more I/O pins with no impact in the speed (correct me if I'm wrong)You're perfectly right (although of course the more bits you use on the shift register, the longer the scan, but it's the same for direct teensy, shift registers and I2C solutions)
At all the hardware freaks, if you want bluetooth why not combine a ATMega32u4 with a simple bluetooth module? Could be done <10$ all I am saying .. :)
http://www.ebay.com/itm/30ft-Wireless-Bluetooth-RF-Transceiver-Module-serial-RS232-TTL-HC-05-for-arduino-/310540196588?pt=LH_DefaultDomain_0&hash=item484da35aec (http://www.ebay.com/itm/30ft-Wireless-Bluetooth-RF-Transceiver-Module-serial-RS232-TTL-HC-05-for-arduino-/310540196588?pt=LH_DefaultDomain_0&hash=item484da35aec)
Now, I want to try it just for the fun ^_^
In fact, the following kickstarter may be a better solution:But with this chip it would not work as an USB keyboard, right? Only via wifi with an adapter or driver?
https://www.kickstarter.com/projects/piccolino/piccolino-arduino-compatible-wifi-oled-sram-sd-car
(Small form-factor arduino-compatible 328p microcontroller with WiFi, µSD and a 128x64 oled screen for the price of a teensy, although it's currently sold out... it's open hardware, though)
The Ergodox indeed use I2C because it reduce the number of wires between the two parts (and could connect more than a second part), since it's quite straightforward to achieve a 2-wire communications with this.Another possible shift register configuration would be using a 74HC164 driven by two wires to light the columns, and then a single wire as a line in a Nx1 "matrix". You write a single bit on the shift register and then just move it by the matrix via the clocking pin, reading the line for each step. That way you don't need the resistors/diodes for each key that other solutions require, and thus is the one that uses the least components and is the cheapest (of course, the price difference is just a couple of dollars). I'm not sure how more complicated or easier is to wire a shift-register brigade configuration vs a matrix one.
Although creating a 2-wire solution with shift-registers isn't a hard task: use a GPIO to drive a 74HC165 (parallel-to-serial 8-bits), connect the serial output of the 74HC165 to a second GPIO, and slave one (or several) 16-bits shift registers to the 74HC165 reset input. Connect the parallel output of your shift registers and the parallel input of your 74HC165 to your keyboard matrix and you'll get a 128 keys solution (for a single shift register) on only two GPIOs with two ICs (maybe three to handle the slaving correctly).
You'll probably want to use a third wire/GPIO for synchronization, though, because it'll make everything easier.
Now, I want to try it just for the fun ^_^
Koren, want to post a diagram of all that? I've been planning to experiment with an I/O expander and shift registers for making keyboards, so it would be nice to see.Will do... I'd rather test the circuitry before posting it, though, because there's sometimes strange timing issues you miss at first. And with shift registers and parallel to serial, it can be a bit tricky if you want to avoid too many wires.
But with this chip it would not work as an USB keyboard, right? Only via wifi with an adapter or driver?That's a good question. Usually, the 328P in common Arduinos boards can easily act as an USB keyboard brain because they have a 8U2 (or 16U2) on board. The details on Piccolino are a bit scarse, but indeed, the 8U2 is probably missing, so you'd have to include it (assuming that you can connect it to the 328P). I'd say it's probably doable.
Another possible shift register configuration would be using a 74HC164 driven by two wires to light the columns, and then a single wire as a line in a Nx1 "matrix".Won't you need a lot of serial registers for a 50+ keys keyboard, though? Or did I understood you incorrectly?
Yes, for N keys you need N/8 shift registers daisy-chained, each responsible for 8 keys around it. N/8 is still less than N diodes/resistors, and one 74HC164 is cheaper than 8 diodes, so my claims remains. I don't know if using the same wire for data and output is safe though, or if I need some other components to make it safe.Another possible shift register configuration would be using a 74HC164 driven by two wires to light the columns, and then a single wire as a line in a Nx1 "matrix".Won't you need a lot of serial registers for a 50+ keys keyboard, though? Or did I understood you incorrectly?
Yes, for N keys you need N/8 shift registers daisy-chained, each responsible for 8 keys around it. N/8 is still less than N diodes/resistors, and one 74HC164 is cheaper than 8 diodes, so my claims remains.I wasn't disputing your claim*... It's just that it was a lot of 74x164, so I was wondering if I had understand incorrectly your idea.
In the link I posted earlier there are also shift register hacks to use only 2 or 1 line to communicate with daisy-chained 74HC165 shift registers: http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/hacks/The "two line" solution was similar to the one I was toying with yesterday, although I wanted to control both the shift register AND the parralel-to-serial chip, which was making things a bit harder to implement correctly.
I don't know if using the same wire for data and output is safe though, or if I need some other components to make it safe.If you're thinking about the same kind of idea suggested in your link to use a single GPIO in both directions, it can work (I did something similar once), but I don't think you're in such a need of GPIOs you can't use two (or three) of lines.
Yes, that's a perfectly doable solution, maybe a bit harder to wire than the usual matrix.Yeah, the diode/resistor legs are actually handy for hand wiring. My solution might be better for a PCB where wiring complexity isn't that much of a issue, and not having to solder something for each switch is a win, right?
If you're thinking about the same kind of idea suggested in your link to use a single GPIO in both directions, it can work (I did something similar once), but I don't think you're in such a need of GPIOs you can't use two (or three) of lines.Yeah, this CHIP has 8 GPIOs, and any solution using less than 3 data lines for shift registers drives up the complexity really fast. This indeed only makes sense if the payoff is being able to use a USB cable between two halves of a keyboard, for example, so we are drifting off-topic. Maybe it's better to open another topic, where you can also explain that power line sharing trick?
You could protect everything with 3-states IC if you really want to use a bidirectionnal line, but that'll make everything more complex for a small gain. Speaking of that, I'm amazed by what a circuit can survive... On my first ISA card (I'm feeling old), I was reading on the data bus of a PC and writing on the address bus, because I was given a mirrored pinout of the ISA bus... Of course, the PC didn't boot, but I was surprised that it was perfectly fine afterwards!
If you want to use less wire that connect the two halves of a keyboard, there's plently of tricks to use the power line as a data line at the same time, too ^_^
At all the hardware freaks, if you want bluetooth why not combine a ATMega32u4 with a simple bluetooth module? Could be done <10$ all I am saying .. :)
http://www.ebay.com/itm/30ft-Wireless-Bluetooth-RF-Transceiver-Module-serial-RS232-TTL-HC-05-for-arduino-/310540196588?pt=LH_DefaultDomain_0&hash=item484da35aec (http://www.ebay.com/itm/30ft-Wireless-Bluetooth-RF-Transceiver-Module-serial-RS232-TTL-HC-05-for-arduino-/310540196588?pt=LH_DefaultDomain_0&hash=item484da35aec)
Does that Bluetooth module support a keyboard Bluetooth profile? I didn't see mention of that in the specs. I'm not an covert on Bluetooth, but I don't think you can use a Bluetooth module to interface as a keyboard without having built-in support for the proper profile.
So I came across a blogger who claims that the CHIP is actually not a $9 computer, but the $9 price is a low ball price to get better exposure and thus more capital. He claims to have heard this from the SOC manufacturer.That's not just a blogger - Olimex is an established company that designs, makes and sells embedded stuff. They have quite a lot of experience with this.
Not sure if it's true, but interesting read:
https://olimex.wordpress.com/2015/06/05/how-to-get-in-the-news-tell-people-that-you-will-make-and-sell-something-which-cost-you-20-for-9/
So I came across a blogger who claims that the CHIP is actually not a $9 computer, but the $9 price is a low ball price to get better exposure and thus more capital. He claims to have heard this from the SOC manufacturer.Olimex aren't just "some blogger", they are a respected company manufacturing and selling open source boards for all manner of platforms, including Allwinner's chips. They understand the concepts of BOM price, and they have probably one of the closest western contacts there is with Allwinner.
Not sure if it's true, but interesting read:
https://olimex.wordpress.com/2015/06/05/how-to-get-in-the-news-tell-people-that-you-will-make-and-sell-something-which-cost-you-20-for-9/
Alternatively, they could have made the effort to make it *interesting* rather than just another "Linux on an SoC with minimal carrier" effort.