IB2

The Instrumentation Board version 2 (IB2) was designed as part of the control subsystem of the 8kW Power Source. It contains the extra ICs required (ADCs, DACs, expanders, etc.) plus all the necessary signal conditioning circuitry for the sensor inputs and power transistors for the outputs. It can be used with Ethernut2 and Ethernut3.

Features

  • 16 channels for cell voltage measurement
  • 6 NTC channels for temperature measurements with 2nd degree low-pass filters
  • 5 channels for 0-5V voltage measurement with optional RC filtering
  • 1 channel for 0-10V voltage measurement with optional RC filtering
  • 4 channels for 0-20mA/4-20mA current signals
  • 2 0-10V output channels 20mA maximum load
  • 7 0V/5V binary output channels 20mA maximum load
  • 5 0V/24V binary output channels 3A maximum load
  • 4 0V/24V binary output channels 10A maximum load
  • on-board temperature sensor
  • CAN controller
  • I2C connector
  • LCD connector
  • Selectable voltage for MCU (5V or 3,3V)
  • Voltage isolators between Ethernut and board signals
  • Two debug pins from the MCU

Drivers

  • ib2tester. NutDAC_Micro dependent project that contains the drivers and ib2tester, a simple program that helps to test the IB2.
  • ib2tester-gui. NutDAC_GUI dependent project which contains a GUI from which all the IB2 I/Os can be controlled.

The IB2 uses the following ICs:

NutDAC_Micro provides drivers for all of them in the chaldrivers library but the CAN controller. Thus, the drivers for the IB2 board itself that you can find in the ib2tester project are mostly an instantiation and configuration of the ICs, plus the driver for the mcp2515.

Configuration

All the ICs are connected to the micrcontroller of the Ethernut through SPI bus. Thus the SPI driver has to be configured properly. Use the following parameters in your nutdac-config.h (extracted from nutdac-config.h in the ib2tester project)

/*-------------------------SPI settings------------------------*/
#define ND_SPI_ENABLED
#define SPI_CS_ENCODED

#if defined(ETHERNUT2)
#define SPI_CSLINE0_PORT PORTB
#define SPI_CSLINE0_PIN 5
#define SPI_CSLINE1_PORT PORTB
#define SPI_CSLINE1_PIN 6
#define SPI_CSLINE2_PORT PORTB
#define SPI_CSLINE2_PIN 7
#define SPI_CSLINE3_PORT PORTE
#define SPI_CSLINE3_PIN 3
#endif

Using the IB2 with the Ethernut2 requires the definition of the chip select lines, as you can see in the settings above.For use with the Ethernut3, the chip select lines are selected with the configurator of the NutOS. Here you can find files with the appropriate definitions

SPI bus speed

The use of isolators make it possible to use different Ethernuts, but also cause propagation delay in the SPI lines, which limits the SPI speed.

Maximum theoretical SPI frequencies

component frequency
AD7490 20MHz
TLV5638 20MHz
MCP2515 10MHz
MCP23S08 10MHz
TC77 7MHz
Ethernut2 7,3728MHz
Ethernut3 4,6080MHz

Maximum tested SPI speeds with Ethernut 2

chip frequency
AD7490 7,3728MHz
TLV5638 7,3728MHz
MCP2515 7,3728MHz
MCP23S08 7,3728MHz
TC77 3,6864MHz

Powering the Ethernut from the IB2

The IB2 needs 5V only for the digital circuitry. The power is fed through the J14 connector, which contains also GND and 3.3V pins. They are all connected to the Ethernut's Hardware Expansion Port, so you can feed your Ethernut through the IB2.

The pins 3 and 4 of the Ethernut expansion port are dedicated to 5V in the Ehternuts 1 and 2, but in the Ethernut 3 they are unconnected. Thus the instrumentation board can't power the Ethernut through the 5V lines of the Hardware Expansion Port. To power your Ethernut3 from the IB2 you have at least two ways:

  • Solder a wire between the 5V line and the "unregulated voltage" pin of the hardware expansion port (you might want to do this in the IB2 instead of the Ethernut). This way you will feed to the Ethernut's input voltage regulator whatever voltage you apply to the 5V input pin of the J14 connector (Should be 5V).
  • Feed 3,3V to the corresponding pin of the J14 connector of the IB2. This pin is connected straight to the Ethernut's ICs.

Design Files: