Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

OutputExpander - How to Make a Netduino GO! Module


  • Please log in to reply
13 replies to this topic

#1 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 07 May 2013 - 07:11 PM

Over the past few weeks I have been developing a module which will add 32 digital outputs to the Netduino GO!.  I have also been writing about it.  Yesterday saw the first board assembled and tested, and here it is:

Attached File  CompletedBoard.jpg   107.32KB   45 downloads

 

The blog post which discusses the project can be found here.  The first post and summary is as follows:

 

This series of posts will examine the activities required to take the concept of a module for the Netduino GO! through to production.
 

Project Definition

 

A simple project will allow the series of posts to concentrate on the principles required for the production of a Netduino GO! module without being too distracted by the functional aspects of the module.  The following project definition should meet this brief:

  • Provide 16 or more digital outputs
  • Work with the Netduino GO!
  • Low cost manufacture
  • Use simple tried and tested components/techniques

Meeting the Objectives

 

As you can no doubt see, this is a reasonably simple project and with the exception of cost, we should have no major problems reaching the objectives.  The most obvious solution to this problem is to look at using 74HC595 serial to parallel chips.  These are cheap components and the techniques needed to solve this type of problem are tried and tested.  The project definition looks like the counting example which is discussed in the Counting Using 74HC595 Shift Registers post with the addition of the Netduino Go! functionality.

Project Plan

Initial assessment of the project indicates that the following steps are required in order to take the project from concept to manufacture:

All of the work is open source so please feel free to use it in your own projects.  If you do find the work useful then please drop me a line as I'm always interested in how this work is being used.

 

Regards,

Mark

 


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 07 May 2013 - 07:27 PM

Very good and really nice of you to share everything!



#3 eplaksienko

eplaksienko

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts

Posted 07 May 2013 - 08:04 PM

Mark, it would be nice to have it built similar to Arduino Mega, to accept ready to use Arduino modules



#4 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 06:13 AM

Very good and really nice of you to share everything!

Thanks, I enjoyed taking this from concept to prototype.

 

I'm hoping that this will inspire others to have a go.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#5 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 06:17 AM

Mark, it would be nice to have it built similar to Arduino Mega, to accept ready to use Arduino modules

What an interesting idea.  The reason for me choosing this form factor was simplicity.  I only have Arduino compatible shields (no Mega shields).  Another factor, it fitted into iTead's cheap prototyping form factor.  It is just under 5cm x 10cm.

 

The schematic and code are in the posts, all the tools I used are free...

 

I think DesignSpark has a library of Arduino parts.  There is certainly a library of SparkFun parts.  That should make things easier to layout.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 08 May 2013 - 07:13 AM

If you decide to make such a shield, may I suggest a couple of MCP23S17 16 bit expander IC with SPI instead of shiftregisters. I suppose you drive the shiftregisters with SPI so there's probably no performance benefits.

 

This would give you 32 GPIOs since the MCP23S17 has both input and output and each pin can be configured independantly of the others. Also it has interrupt capabilities on inputs.

 

I've been working on a class the MCP23S17 but I'm not quite there yet.



#7 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 07:38 AM

If you decide to make such a shield, may I suggest a couple of MCP23S17 16 bit expander IC with SPI instead of shiftregisters. I suppose you drive the shiftregisters with SPI so there's probably no performance benefits.

That looks like a really interesting chip...

 

I am actually bit banging the data to the shift registers as the SPI pins are used by the GoBus for communication with the Netduino GO!

 

I2C is free and the MCP23S17 looks to be able to use I2C.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#8 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 08 May 2013 - 08:47 AM

The MCP23017 uses I2C (max 100kHz) while her sister MCP24S17 uses SPI (max 10Mhz). Hence the S.

 

Is the SPI port occupied for host comm on the STM8S or does it not have SPI at all?



#9 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 11:31 AM

Is the SPI port occupied for host comm on the STM8S or does it not have SPI at all?

The STM8S103F3 which is the one I am using only has one SPI port and that is used for GoBus comms.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#10 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 08 May 2013 - 11:47 AM

The STM8S103F3 which is the one I am using only has one SPI port and that is used for GoBus comms.

 

Regards,

Mark

I'm sure the I2C version would work equally well.

 

Out of curiosity - is it not possible to use different CS pins with the STM8S103F3 to support multiple SPI devices on the same bus?



#11 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 12:05 PM

I'm sure the I2C version would work equally well.

 

Out of curiosity - is it not possible to use different CS pins with the STM8S103F3 to support multiple SPI devices on the same bus?

You can do that as I'm using software SPI so the CS effectively becomes another interrupt on a GPIO pin.

 

I've never had ago at dual channel SPI on the chip.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#12 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 08 May 2013 - 12:50 PM

There's a first time for everything ;)

 

Have you measured the maximum IO toggling frequency of your board compared to doing it directly on the host Netduino?

I think that would be interesting.

 

If there's no h/w SPI on the chip, maybe you could use a different one on your next board. As I understand, you can implement GoBus an pretty much any uC because the GoBus devices does not run .NETMF or do they?



#13 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 08 May 2013 - 07:18 PM

There's a first time for everything ;)

 

Have you measured the maximum IO toggling frequency of your board compared to doing it directly on the host Netduino?

I think that would be interesting.

 

If there's no h/w SPI on the chip, maybe you could use a different one on your next board. As I understand, you can implement GoBus an pretty much any uC because the GoBus devices does not run .NETMF or do they?

Interesting exercise - comparing the speed.  I may do that when NETMF 4.3 exits beta.

 

In terms of other uControllers, I want to finish of documenting the STM8S.  I think after that I'll be heading back to the STM32SF4 Discovery board for a while.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#14 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 25 February 2014 - 08:46 PM

Hi Mark,

 

Just a thought, you may have seen the recent library hanzibal made for the MCP23S17. I was wondering if you have looked at the STM8L range?

 

These chips have 2 SPI buses.

 

This is a little beyond me, but I would love a dual MCP23S17 GO bus module.

 

What are your thoughts on the STM8L and is it possible to use both SPI buses, one for GO bus and the other for the MCP23S17s?

 

Many thanks

 

 

andy






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.