I am looking to develop a coding panel to create a "placing blocks" interface for kids.
In a way, having kids playing with blocks on a panel where slots are on the panel to fit the blocks, then the Arduino is interpreting the blocks and send them to another arduino or through Wi-Fi / Bluetooth to a computer which reacts to the blocks placed.
My major issue is to figure out the best solution to codify the information into the blocks in order to differentiate them. I have read about Cubetto project and they use resistor values then analog input to "find out" which blocks are placed and in which order.
My constraints are the following:
I would like to have 50-60 blocks placement
Block order is important
20 to 60 block types (not yet defined and a constraint which can be changed based on the solution found
Based on above information, I have figured out few solutions:
Pushing it to the limit, digital coding of each block, I was thinking to have each blocks containing 8 jumpers (16 contacts) which can be open or closed, which allow to create 128 type of blocks. These jumpers then touch contacts on a PCB which "codify" and recognize one block type and location on the board. But the problem with some simple math, I would need 60(max)*8 bits coded for the whole board which represents 480 digital input. So I thought, no problem through 60#8 channels or 30#16 channels addressed multiplexers. But then I need to enable them one by one and read their values, where I would need additional multiplexer even using a ARDUINO MEGA. Speed is not a requirement, I feel that this solution can work with some logics and additional code... But it will take some time and will require a PCB or it will simply be a forest of cables! One more risk is the number of contacts and the potential failure risk due to bad contact.
Resistor analog coding, I would still need some logic with analog multiplexing sensing voltage response based on the different resistor of the blocks. Much less contact, only 120!
Color sensor? few blocks of color, the advantage is that the blocks are completely "dumb" no contact or electronic, but the color needs to be more or less accurate. Then I need 60 color sensors, ouch!! that might be expensive and also quite hard to control...
RFID, similar than 3. but losing the advantage of "dumb" blocks, but the information coded can be much more than 128 combinations. but here... Price price price with 60 RFID sensors...
I was thinking to a good alternative, with pushed blocks, each line the blocks can be pushed on a rail, at that time the system "record" its value, can use contact or RFID, the order is kept but it is less kid friendly. But why not in a more sequential mode...
No more idea at the moment.
Any idea from the community? I would be pleased to have some external point of view on this topic.
When electric contacts are allowed, I have an idea:
Put a shift register into each block, whose parallel inputs are jumperd for distinct addresses. Then a matrix of chip select and clock lines can be used to address each position and read out the individual value.
Yes to reverse the problem, that's sound feasible and easier to realize on the main board.
So I create a matrix of CS 6x10 which I activate one by one and read the value on the serial output bus, right?
So I would need 6 columns+10 rows (CS matrix) + 1 clock (do I need to create as many clock lines? they can be shared right?) as output and 3 serial input on the ARDUINO to read the value of the activated block. Then I scan through the CS matrix by activating a column and a row (only one at a time) and reading the serial data out from the selected block. Is this making sense?
I will think about it in more details because it sounds like a good solution, increasing potential blocks investment but if it is making sense...
For further thoughts look at e.g. 74165/166/597/598 for 8 bit or 674 for 16 bit parallel-in shift registers.
A diode or other device may have to be added to the serial outputs, to allow for wired AND onto a single processor input pin. Or a gate (open collector or tristate NAND) that allows to combine the row and column select with the serial output.
Put a distinctive image on the upper face of each block to identify its type.
Put all the blocks in place as required
Take a photo.
Use image processing software to interpret which block is where (obviously not possible with an Arduino)
OR (better?)
Write a PC based program that uses images of blocks (icons) rather than real physical blocks.
I don't immediately see any learning value from using physical blocks if all they do is signify different functions or actions.
The shift register idea may be able to read the entire array with 2 pins if they are daisy-chained. Shift-out on each block goes to shift-in on the next. Send 60*8 clock pulses into the array and get all the data out in a millisecond.
Then you just need a connector that joins out to in when the block is not present. A 3.5mm socket can do this. Maybe put an empty shift register in each socket so that it responds with the empty-socket code when the block isn't there.
A switching jacket is a nice idea, but the total number of connections (including Gnd, Vcc...) is too high for a single connector.
A shift register in every position would allow to read the encoded addresses from every block, regardless of a block placed or not, using 8 pins and only jumpers in the blocks. When finally all positions are occupied, the placement of the registers on the board doesn't cost more than placing them into the blocks. Then in fact the entire board can be read out with a minimal number of wires.
Robin2:
Put a distinctive image on the upper face of each block to identify its type.
Put all the blocks in place as required
Take a photo.
Use image processing software to interpret which block is where (obviously not possible with an Arduino)
OR (better?)
Write a PC based program that uses images of blocks (icons) rather than real physical blocks.
I don't immediately see any learning value from using physical blocks if all they do is signify different functions or actions.
Plus physical blocks can easily go missing, especially if kids are involved.
It would be hard to write any meaningful program if the 'if' block and the 'for' block are both missing.