Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - modtro2

Pages: [1] 2 3 4
1
Wireless Modules / Using inAir modules with Raspberry Pi
« on: October 08, 2015, 05:19:47 PM »
An interesting project for using the inAir (inAir4, inAir9 or inAir9B) modules with the Raspberry Pi and Python is located here:
https://github.com/mayeranalytics/pySX127x

2
STM32 Boards (NZ32 Range) / === New NZ32-ST1L board with STM32L151RC ===
« on: November 14, 2014, 10:23:50 PM »
We will soon be introducing a new, low cost range of STM32 boards. Main features are:
  • STM32L151RC Ultra low power CPU, optimized for low power applications (compatible with other STM32L151 and STM32L152 chips).
  • 256K Flash, 32K RAM, 8K EEPROM.
  • 3 x UART/USART ports, 2 x I2C ports, 3 x SPI ports.
  • 1 x Micro B USB Port.
  • Reset and Boot button.
  • 2 LEDs, one for indicating when battery is charging, and a user LED.
  • Firmware upgradable via USB port. If boot butter is pressed at power up(reset), board goes into bootloader mode.
  • Very low power 5V to 3.3V switch mode regulator with 16uA operating, and 0.01uA standby current.
  • Switch mode can be disabled by CPU, resulting in 0.01uA current, which is sufficient to run CPU for minutes in low power mode (run from power stored in Capacitors).
  • On board LiPo (lithium polymer) battery charger, and standard 2.0mm JST connector (many LiPo batteries have this connector). LED indicates when battery is charged. Can be charged from USB or 5V pin headers.
  • Hardware for monitoring input and battery voltage.
  • Additional regulator output capacitors to allow board to run for longer when switch mode is in standby mode (ultra low power 0.01uA operation).

    Click here for larger image.

    Click here for larger image.

=== Wireless Interface ===
These boards will feature 3 iMod ports. One on top, and two at the bottom. Versions of this board will be available with the top iMod port assembled with a WiFi, Bluetooth or SX1276 Wireless module. The SX1276 incorporates Semtech's LoRa technology, making very long range communication (over 10km) possible at low power! The photo below shows the NZ32-ST1L with a SX1276 iMod mounted on top, and pin headers assembled on the bottom (in the 2 bottom iMod ports).


=== Programming and Debugging ===
The boards can be programmed using the following methods:
  • Using the STM32 built in USB or UART bootloader. This mode is enabled by holding the "Boot" button down after reset (pressing reset button).
  • Using 2 wire SWD.  SWD uses an ARM standard bi-directional wire protocol, requiring only 2 wires for programming and debugging.
  • Using a 4 pin header, this board can be connected to an mbed programmer, allowing drag and drop and CMSIS-DAP programming and debugging.
  • Via ST-LINK or J-Link, but connecting a ST-Link or J-Jink programmer to the SWD pin.
The image below shows the location of the 5 pin SWD header. A reduce 4 pin header can also be used.


=== Optional Programming/Debugging daughter board ===
This option is still in prototyping stage. We are developing a small daughter board that plugs onto this new board. It will provide:
  • Debugging and Programming via ST-LINK or CMSIS-DAP interface
  • Virtual Com port allowing communication with main board (via UART)
  • Mass storage (USB Disk drive) for drag'n'drop programming
It will either use exactly the same circuit as present on the STM32 Nucleo boards (ST-Link programming/debugging), or the CMSIS-DAP firmware (CMSIS-DAP programming/debugging) provided by mbed - see this page.
The image below shows how this board will be mounted. To reduce cost, it can be a plug-in module. Only used during prototyping.

3
We will soon be adding Arduino example code showing how to read a matrix keypad, and write to outputs OUT1 and OUT2. The LCD2S has 2 general purpose open collector outputs, OUT1 and OUT2. These outputs can supply up to 1000mA, and have protection circuitry for driving relays.
  • When using only OUT1, a 4x4 (16 button) or smaller keypad can be used.
  • When using OUT1 and OUT2, a 4x3 (12 buttons) or smaller keypad can be used.

Using a 4x4 Keypad and OUT1
When using a 4x4 keypad, the OUT1 output is NOT available. The keypad is connected to the pins marked R1 to R4 (rows) and C1 to C4 (columns) on the X1 1x10 pin header. The LCD2S has built in button debouncing, which can be configured for different values. The default should work fine though.


Click for larger view

Using a 4x3 Keypad, OUT1 and OUT2
When using OUT1 and OUT2 outputs, the largest keypad that can be used is a 4x3, 12 button keypad. The keypad is connected to the pins marked R1 to R4 (rows) and C1 to C3 (columns) on the X1 1x10 pin header. The C4 pin can not be used (function is shared with OUT1). The "OUT1" jumper on the X1 (1x10 pin) header also has to be inserted.


Click for larger view


4
Serial LCD Displays / == Arduino I2C Source Code for IO functions ==
« on: August 17, 2014, 12:54:17 AM »
We will soon be adding Arduino example code to this post showing how control the OUT1 and OUT2 outputs. The LCD2S has 2 general purpose open collector outputs. These outputs can supply up to 1000mA, and have protection circuitry for driving relays. Both OUT1 and OUT2 are enabled by default. They are available via the X3 connector (2x6 pin header).

Output OUT2 does not share port pins with any other function, and is always enabled.

Output OUT1 shares a port pin with the keypad encoder, and can only be used when the keypad encoder is configured for a 4x3 keypad (4 rows by 3 columns = 12 keys) or smaller. It is enabled by inserting a jumper on the end of the 2x6 pin header (marked OUT1 on PCB). It is enabled by default, and this jumper is present. When the keypad encoder is configured for a 4x4 keypad, this jumper must be removed! Output OUT1 can not be used when using a 16 key, 4x4 keypad!



Click for larger view

5
Serial LCD Displays / == Arduino I2C Source Code for Keypad functions ==
« on: August 17, 2014, 12:53:56 AM »
We will soon be adding Arduino example code showing how to read a 4x4 matrix, 16 button keypad with Arduino. The keypad is connected to the pins marked R1 to R4 (rows) and C1 to C4 (columns) on the X1 1x10 pin header. The LCD2S has built in button debouncing, which can be configured for different values. The default should work fine though. The OUT2 output is also available when using a 16 button keypad.



Click for larger view - with 16 button keypad.


Click for larger view - with 16 button keypad and relay connected to OUT2.

6
This tutorial was created by Matt (http://forum.modtronix.com/index.php?action=profile;u=10810). It shows the procedure for finding the I2C address of a device with an unknown I2C address. This is useful if the LCD2S module's base address has been changed to an unknown address.

The Modtronix LCD2S family of Serial LCD Displays can be configured to communicate via the I2C or SPI (mode 0) protocol. To use the I2C mode, both switches on the DIP switch must be set to the off (0) position. Please refer to the LCD2S data sheet (link: http://modtronix.com/shop/lcd2s-204yhy.html) to find the possible DIP switches combination for different I2C addresses.

Note: The documented I2C addresses are different when the module is connected to an Arduino. This problem can be overcome by using I2CScanner program which will be explained below

LCD2S via I2C with Arduino tutorial, for UNKNOWN I2C address:

Step 1: Connect the LCD2S module with an Arduino. In this case the I2C bus pin on an Adruino UNO is as follow: (Refer to Adruino page for other boards' I2C pins)
===== For I2C operation =====
- LCD2S SDI to Uno SDA (A4)
- LCD2S CLK to Uno SCL (A5)
- LCD2S 5V to Uno 5V
- LCD2S 0V to Uno Gnd


Fire up the the LCD!!!


Step 2: Find what I2C address the LCD2C board is:
-Go to: http://playground.arduino.cc/Main/I2cScanner.
-Copy the given code and paste to a new sketch in Adruino IDE. Alternatively, the I2CScanner code can be found below:
Code: [Select]
#include <Wire.h>


void setup()
{
  Wire.begin();

  Serial.begin(9600);
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknow error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }   
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}
-Upload to your Arduino
-Make sure both DIP switches are in the correct position


-Open Serial monitor and see what address the scanner returned, note this address down as you will need it later. In my case, my scan returned address 0x28


Step 3: Write your own sketch:
-Open a new sketch
-Copy and paste the following skeleton code for writing "Hello World" into your new sketch:
Code: [Select]

#include <Wire.h>

void setup()
{
  Wire.begin();  //Join bus as master
 
  Wire.beginTransmission(0x28);  //Start condition at the given I2C address or Mark the begining of a data packet, change 0x28 address to what your I2C scan returned
 
  Wire.write(0x80);  //Initiate Display Commands
  Wire.write(0x0c);  //Clear display and go to first line
 
  Wire.write("Hello World!");  //Write message
 
  Wire.endTransmission(false);  //End condition or Mark the end of data packet and send to LCD, and hold I2C bus connection
}

void loop()
{
}
-Change the "0x28" address in the skeleton with what you got from the I2CScanner in the previous step.
-Upload and enjoy.


-To begin using the LCD2S, there are two pages you need to visit and learn
1. For further LCD commands, refer to LCD2S data sheet which can be found here: http://modtronix.com/shop/lcd2s-204yhy.html
2. To enable Arduino to communicate via I2C, you need to use Wire library. For I2C commands for Arduino, visit: http://arduino.cc/en/reference/wire

7
Serial LCD Displays / == Arduino SPI Source Code ==
« on: May 29, 2014, 05:50:17 PM »
Source code and details to follow.

8
Serial LCD Displays / == Arduino I2C Source Code ==
« on: May 29, 2014, 05:48:08 PM »
  • See first post below (created by Matt) for connecting to Arduino UNO and sending "Hello World" message.
  • See second post for Turning the backlight on and off, and changing it's brightness
  • See third post for Turning the display on and off, and changing it's contrast

9
Projects / === RS232, RS485 & Ethernet with SBC66EC & PT66EI ===
« on: April 17, 2014, 04:25:16 AM »
This project is for a low cost RS232, RS485 and Ethernet board, using the SBC66EC (with a Ethernet and USB port). These boards are assembled on the PT66EI-10P prototyping board, and mounted in an enclosure. It uses the following parts:
- SBC66EC with Ethernet, USB port and PIC24FJ256GB206 16-bit CPU
- in485P-M RS-485 iMod module
- im232P RS-232 iMod module
- PT66EI-10P prototype board for SBC66 single board computer
- ENC2015S-BK-NZ enclosure

The two 5 pin connectors, LEDs and prototyping space can be used for custom requirements.

The aim of this project is to provide skeleton C code, using the free XC16 C Compiler and MPLAB X IDE. It uses the Netcruzer Webserver for basic functionality. For details on building projects, click here.





Click to enlarge

===== We will soon be adding source code for this project! =====

10
Projects / === RS232 & RS485 with SBC66ZL & PT66EI ===
« on: April 17, 2014, 04:19:07 AM »
This project is for a low cost RS232 & RS485 board, using the SBC66ZL (with a USB port). These boards are assembled on the PT66EI-10P prototyping board, and mounted in an enclosure. It uses the following parts:
- SBC66ZL with USB port and PIC24FJ128GB106 16-bit CPU
- in485P-M RS-485 iMod module
- im232P RS-232 iMod module
- PT66EI-10P prototype board for SBC66 single board computer
- ENC2015S-BK-NZ enclosure

The two 5 pin connectors, LEDs and prototyping space can be used for custom requirements.

The aim of this project is to provide skeleton C code, using the free XC16 C Compiler and MPLAB X IDE. For details on building projects, click here.





Click to enlarge

===== We will soon be adding source code for this project! =====

12
SBC66EC & SBC66ECL / === New V2.03 Beta Firmware Available ===
« on: May 30, 2012, 01:19:58 AM »
There is a new V2.03 Beta (14 Mar 2014) firmware available. Have added many new HTTP and USB commands, RTOS Fiber support, DS18B20, DHT11, DHT22 sensors and more. Also added I2C and 1-Wire support.

The firmware contains many new features, and can be downloaded here.

The firmware documentation is included with the documentation, and an online version is also available here.

13
SBC66EC & SBC66ECL / == TCPIP Demo App ==
« on: March 28, 2011, 04:23:01 AM »
===== UPDATE 2014 =====
The post below was for the first, prototype software for the SBC66EC released a couple of years ago. Since then, the SBC66EC has been integrated into the Netcruzer Download software. This software contains many TCP/IP and Webserver demos. Please see main SBC66EC product page for links. Also, see this forum for early releases of current Beta software.

===== Introduction =====
The zip file available for download by clicking here contains the "TCPIP Demo App" from the "Microchip Application Libraries v2010-10-19". The current, unmodified version can be downloaded for free from www.microchip.com/mal. In addition to this (Modtronix) code, we recommend you download and install the Microchip Application Libraries, seeing that it contains lots of additional information and documentaion. The example projects in this zip file have been modified to work with the Modtronix SBC66EC board.

===== Microchip TCP/IP Stack Help and Utilities =====
  • The ".\Microchip\Help" folder contains the "Microchip TCP/IP Stack Help" document.
  • The ".\Microchip\TCPIP Stack\Utilities" folder contains various utilities. See help document for details.
  • The Microchip forum contains lots of additional information.

   
===== Buiding project and programming SBC66EC =====
To build this project, do the following:
  • Download and install Microchip MPLAB IDE (available for free)
  • Download and install Microchip C30 Compiler (available for free)
  • Start MPLAB, and open the MPLAB workspace ".\TCPIP Demo App\TCPIP Demo App - C30 - SBC66EC.mcw"
  • Build project, and program SBC66EC. For details on programming Modtronix board, click here. A PIC
    programmer is required. The cheapest option will be the PICKit 3 available here.
  • Plug the SBC66EC into a network with a DHCP server. You can run the ".\Microchip\TCPIP Stack\Utilities\TCPIP Discoverer - Java.exe"
    application to get IP address of board (will get assigned an IP address when plugged into network with DHCP server).
  • In a browser, enter the IP address of board, or it's NETBIOS name. For example http://192.168.1.100 or http://mchpboard/

===== Modifications required for Modtronix SBC66EC =====
This folder contains the original "TCPIP Demo App" from "Microchip Application Libraries v2010-10-19",
modified to work with the Modtronix SBC66EC. The following modifications were made for it to work with
the Modtronix SBC66EC board:
  • Copied MPLAB Project file "TCPIP Demo App - C30 - PIC24FJ256DA210_DEV_BOARD_ENC624J600.mcp" to "TCPIP Demo App - C30 - SBC66EC.mcp". Edited file, and changed all "PIC24FJ256DA210_DEV_BOARD_ENC624J600" strings to "SBC66EC".
  • Created new workspace with, added "TCPIP Demo App - C30 - SBC66EC.mcp" project, and saved as "TCPIP Demo App - C30 - SBC66EC.mcw"
  • Replace TCPIPConfig.h with new version for SBC66EC
  • Replace HardwareProfile.h with new version for SBC66EC
  • In MainDemo.c file, added code for PIC24FJ256GB206 chip. Search for following string to see changes:
    "defined(__PIC24FJ256GB206__)"
  • In "Include/TCPIP Stack" folder, modified following files. Search for "MODTRONIX" to see modifications made.
       
    • SPIFlash.h, changed page size to 256 for Winbond flash
  • In "TCPIP Stack" folder, modified following files. Search for "MODTRONIX" to see modifications made.
       
    • SPIFlash.h, changed page size to 256 for Winbond flash
    • SPIEEPROM.c, changed eeprom page size to 32 (from 64) for 25LC640 eeprom

14
SBC66EC & SBC66ECL / == New SBC66EC and SBC66ECL Boards ==
« on: February 23, 2011, 04:37:14 PM »
We will soon be introducing two new 10/100 Mbit/sec Ethernet Boards (with micro USB), the SBC66EC and SBC66ECL. The SBC66ECL will be a low cost version, with fewer features then the SBC66EC. The SBC66EC board is expected to be available end of March, with the SBC66ECL following a bit later.

They will be delivered with a modified version of the current Microchip TCP/IP stack. Modifications will include adding commands for setting and reading port values, buffers for using port, bootloader and more.
The boards will be compatible with our current MicroX product range, with the only difference being that they are mixed 3.3V/5V boards, where all current MicroX boards are 5V only.

Schematic and PCB Layout can be downloaded here.

================================
SBC66EC Details
================================
  • Estimated price USD75 (Discount of 30% for 100+).
  • PIC24FJ256GB206 CPU with 256K of FLASH, 96K of RAM.
  • 32MBits (4 MBytes) of external serial FLASH for web pages and user data.
  • 64KBits (8 KBytes) of external serial EEPROM for configuration data and user non-volatile data.
  • External RTC with crystal and CR2032 battery (over 20 years life with Lithium battery).
  • DC/DC 5V converter using quality National Semiconductor regulator and extra long life capacitors.
  • 3.3V Linear regulator for CPU supply.
  • 10/100 MBit/sec Ethernet port.
  • USB port via Micro B USB connector. Can also power board.
  • Board can be powered via:
     
    • 6 to 40V supply via 2.1mm connector.
    • Micro USB connector (Micro USB chargers are becoming standard for mobile devices).
    • Placing power of 6V to 40V on Ethernet Connector. This is a custom PoE implementation.
  • Two 20 pin Daughter board connectors with power and user I/O ports.
  • 6 pin Micro Match connector for external I2C devices, like Modtronix serial LCD displays and keypads.
  • 10 pin FFC (Flat Flexible Cable) connector. Have Ground, 3V and 8 IO ports. Can be used for user implementations.
  • 26 Digital 3.3V User I/O ports, of which 8 have on board 5V pull-up resistors to allow them to be used with 5V logic.
  • 11 of the I/O ports can be configured as 10-bit Analog Inputs (0 to 3.3V).
  • 4 USARTS (RS-232, RS-485, LIN Bus...), that can be routed (via Microchip's Peripheral Pin Select feature) to any of 18 user I/O Ports.
  • 2 SPI Ports, that can be routed (via Microchip's Peripheral Pin Select feature) to any of 18 user I/O Ports.
  • 9 PWM Modules, that can be routed (via Microchip's Peripheral Pin Select feature) to any of 18 user I/O Ports.
  • 2 I2C ports.

================================
SBC66ECL Details
================================
  • Estimated Price USD65 (Discount of 30% for 100+).
  • PIC24FJ128GB106 CPU with 128K of FLASH, 16K of RAM.
  • No RTC, RTC crystal and RTC battery.
  • No DC/DC converter.
  • Must be powered by 5V, either via Micro USB connector (commonly available charger) or via main board (if used as daughter board).

================================
Photos of SBC66EC Prototype Board. Please note photos are of prototypes!
================================
Battery holder was removed for some photos (to allow components under it to be seen).

15
Ethernet Boards (8-bit) / Microchip V5.20 on SBC83I board
« on: May 21, 2010, 02:04:14 PM »
See http://forum.modtronix.com/index.php?topic=1314.0 for post by Marco on using Modtronix SBC83I (or SBC83IL) with Microchip stack V5.20 and new Modtronix PD216LCD daughter board.

Pages: [1] 2 3 4