Michael Lee wrote: [snip] > For my part, I think that an analysis of the functionality should be your > first objective. > No one appears to have mentioned the problem of determining the correct > mathematical syntax. i.e number-operator-number-equals-number(and possibly > more operators & numbers) [snip] Well, you are right, but this issue should be solved *after* he solve the connectivity problems. Any module can be the server, it doesn't matter so much, if the server can talk to all modules, and understand the formula complexity by observing the modules disposition. In real, the server can be not even connected to the modules, if using some kind of wireless communication. If it needs to be there physically, and thinking that in each formula there is at least and only one "=" sign, then it is the best candidate to be the server, just for this reason. Of course he needs to define the modular logic. As a gross example of the the analog calculator, he could use just resistors inside of the "number" modules, any add or subtract operation should be equal balanced in both sides of the "=" sign, that can be as simple as a balanced bridge that can turn a red light whenever it is not balanced. In the analog calculator, each "operator block" computes its own results and feed other operators, so the "=" operator does the final accounting. In the digital idea, after the physical disposition and electronic identification is done, it is not different than do a simple math calculation using a syntax checking algorithm. I think its major problem right now, is to develop a communication technique that challenges a skinny 5 years old boy with his hands full of melted chocolate and accidentally pouring orange juice at the connectors, then, trying to connect those modules, by force, to his Lego blocks. If you never had accidents with orange juice in electronics... consider yourself a happy person. There are some interesting connectors at the market, just take a look at what the "masters" use, like Nintendo and Sega games pads connectors, but the blocks would end up costing more than $5.00 each and will demand a nice and undestrutive inject molded case, with or without batteries. It is not an easy task. The use of 2 or 6 connector pins, doesn't change so much the cost as you can imagine. If he can solve the connection problem, *here goes the best solution* I can think for a while: ----------------------------------------- Less than $0.50 of electronics per module Less than $6.00 of electronics per master ----------------------------------------- I would suggest a "serial bit ring technique", using a simple parallel to serial shift register in each block with the parallel inputs tied up/down according to the representative code of each block. A 4 bits chip allows 16 combinations, enough to do all the 0-9 digits plus "+ - / * % =". The master block (powered by a PIC and batteries) installed at the far left (always) of the equation, does supply power to the serial loop, all the module's shift registers will load its value (at power on) and then PIC step out "sqr sqr % sqr sqr" (FFEFF) code to the modules close to it, and steps in as many bits he needs until he receives back the FFEFF, so he will have the math formula representation immediately from both sides of the "=" module. The non returning of FFEFF after 100 step clocks means the loop is open. Each module should has only 6 pins (Vcc, Gnd, GndRet, Clock, Data and DataReturn) at each side (to propagate the signal). The GndRet at the left side connector is just a tied down, so it can tells the module at its left "I am here". In the absence of this signal, the module automatically connects Data to DataReturn wires, using a transistor, gate logic, whatever is low cost. This is an auto-loop-back. 74HCT194/195 are a nice 4 bits solution. A simple capacitor serving the "LOAD parallel bits" into the shift register at power on. All the electronics at the master (to read the rings) would be just 2 transistors to switch power to the rings and 6 port I/O pins, 3 per side (clock, data out, data in), that's it. What the software needs to do is just steps out 20 bits "FFEFF" at data out pin, and keep stepping out (any) bits until FFEFF arrives at the data in, for both sides, that's all. It should cost less than $0.50 in electronics per module, no oscillators or resonators, while the server uses less than $6.00 in electronics with a PIC (probably less than $4.00 with an Atmel, or less than $2.50 with a small Zilog), plus the audible/visual feedback, etc. Want to turn it into a scientific calculator? just use 8 bit shift registers, and you will have 10 digits plus 246 different operators.. 74HCT165 :) A MODULE DRAWING: ----------------- +VCC +Vcc >-------------------o------------------------------------------> | StepClock | StepClock >------------------------o-------------------------------------> | | .--------------------------------. Data In | | Data Out >-----------| shift register |------o----------> | coded as "7" | | '--------------------------------' | +Vcc | 3 2 1 0 Load | | | | | | | | | R | | | | | | o R GndRet | Gnd + + + --- \ | <--------------o --- 4066 \<---o--< | | o \ GndRet Ground | | | >--------------o------------------------o---------------------< | | Ground Gnd | DataReturn | DataReturn <---------------------------------------------------o---------< Cap at Vcc and a pullup resistor at Load. Can we start the production? :) Wagner.