Create own module

Aug 29, 2012 at 6:01 PM

Everywhere you look, you only see, how to do something with modules, that are available to you. I have a problem, that i am building something that requires 30 analog inputs. Since this modules does not exists, i say OK, let's build it. After all i read on some blog that this is the Micro framework biggest advantage.

Now, what i am missing is some tutorials, forums, threads, examples. Anything. The only thing that exists is NET Gadgeteer Module Builder's Guide version 1.9.

My idea is that i use multiplekser to switch analog inputs. But for that i would need some digital output on a socket to control multiplekser. But A socket doesn't have enough digital input/output pins. Is there any option to send multiple bit or i must provide some serial interface to read bits one after the other and then connect them to controling pin of a multiplekser.

I think i am missing something here.

Developer
Aug 30, 2012 at 1:19 AM

I think you posted on TinyCLR about this? You can easily create this. Get any SPI analog chip and add few of these on your module, add as many as you need, 40 or even more. When I say "easily" I am assuming you know how to design circuit boards.

 

Also, If you like, you do not need to build any module, the chip used on DL40 has 8 analog inputs http://www.ghielectronics.com/catalog/product/375 and this is daisylink. 4x of these will work on one socket and give you 32 analog inputs.

 

Finally, if this is needed for commercial use, you can hire GHI or anyone with gadgeteer experience to design this module for you. But we continue to add new modules regularly so it is only a matter of time till there is analog input module.

 

Gus - GHI Electronics

Coordinator
Aug 30, 2012 at 10:06 AM

Great to hear you're interested in making your own module!  The ability for people to do that is definitely one of the core design aims of the Gadgeteer platform, and the Module Builder's Guide is a good place to start.  When you get round to the software side, the Gadgeteer Builder Templates (found under "downloads" on this site) will help you out - the module template has a detailed readme.txt to help you get your module into in the Visual Studio designer's list of modules, make an installer for it, etc.

You wanted links to more blogs where people have shared their experiences making modules.  There are quite a few!  I suggest:

http://10rem.net/blog/2011/10/30/building-a-net-gadgeteer-compatible-hardware-and-software-module-der-blinkenled

http://10rem.net/blog/2012/03/13/designing-the-open-source-hardware-net-gadgeteer-midi-module

http://mikedodaro.net/2011/10/31/implement-a-light-sensor-module-for-net-gadgeteer/

To answer your specific question.  Gus's suggestions are good answers.  To throw out other options: if you want to use a specific multiplexer part that requires 5 digital outputs and generates an analog input, then you could for example use 2 sockets, one marked "Y" (for the digital outputs) and one marked "A" (for the analog input).   Or, if you wanted to use a specific mainboard that you know has a socket marked "AY", you can use a single socket and rely on both "A" and "Y" functionality, but then you are limited to mainboards with a socket with an "AY" combination, so I would not recommend this approach if you want your module to be portable across mainboards.

Aug 30, 2012 at 11:21 AM

Yes i did post it. I didn't make any circuit boards yet, but i know electronic basics, so i think i could do it with some help on internet.

I can't find, that DL40 has 8 analog inputs. I can not find also if there is interrupt option. I will try to search the web, if someone did anything with that module and upload the code.

This is not needed for commercial use. I try to build a device to control water collectors. And i need a couple of sensors to measure room temperature (every room), boiler (down, middle, top) reservoir temperature (down, middle, top), second reservoir and a third one, temperature on collectors ... So interrupt on change is almost critical.

Aug 30, 2012 at 12:06 PM

I think, there will be always some new idea, that you would like to do, but then the first problem is that there is not a suitable module for that. So creating own module would be something.

I saw the first link and i think this not what i need, because it uses extender module. The second one is great. That is something that i want to do.

 

For now, i am exploring all possibilities, but i am concentrating on building a new module from scratch.

 

For now, i got an answer (i must use 2 sockets). I really don't know, why has A socket 3 empty pins. Wouldn't be cool if they would be normal GPIO pins.

Coordinator
Aug 30, 2012 at 1:48 PM

The socket types specification was carefully designed as a compromise between the ability of mainboard manufacturers to include lots of sockets with many types each (maximising the functionality present on that processor that is made available for use) and module manufacturers who want single socket types with many functions.  In the specific case of Socket A, if we mandated that the "empty" pins be GPIO capable, then a mainboard manufacturer could not easily group A with I on a single socket, since I sockets are not compatible with GPIOs (that sockets includes I2C lines with pull ups), or A with S, if the SPI pins on a processor were not GPIO-capable.  But, we did not make socket A have zero GPIOs either, since then any module that required one digital IO and a few analog inputs (e.g. joystick with push button) would not be possible with a single socket.  We made a compromise based on our experience.

As you have seen, there are other options to achieve 30+ analog inputs such as using 2 sockets, using only sockets supporting both A and Y, or using an SPI or I2C-based solution, so this compromise does not affect the ability to build modules overall, it just makes some modules a little trickier (and others a little easier).

I hope this has helped explain why we made those design decisions that way, and I look forward to hearing about your module - please do write a blog post or something about your experiences too, if possible!

Developer
Aug 30, 2012 at 4:41 PM

SolderMonkey has mux module, maybe he is working on other modules too so maybe check with him http://wiki.tinyclr.com/index.php?title=Community_Offers

Coordinator
Aug 31, 2012 at 2:42 AM

SolderMonkey's block also has a walkthrough of how he designed his slider modules:  http://www.soldermonkey.net/solderblog/.

Seconding James, please let us know what you make!

-- K

Aug 31, 2012 at 11:17 AM

james: that sounds reasonably. Thanks for explaining that. 

gus, kerryh: Thanks, both links are great. I did already know for wiki tinyclr.