Categories

WREN 12S SDK V2 – Basics

WIKI:

This is a living (Work in Progress), document.

Basics

The heart of the WREN SDK is an ESP-12S, which is a small package variation to the industry standard ESP8266, so enabling a vast range of support from many IoT developers.  Standard ESP8266 firmware will run on the WREN SDK, after simple assignment of ports to suit the board.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Power to the WREN SDK would normally be provided via the main DC input (Pin 1 = 9V to 38V), and then the onboard DC-DC to derive the 3V3.   You may however, provide 3V3 directly to the ESP circuitry, via the UART, or I2C ports.   A diode is included which protects the remainder of the board and thus your 3V3 will not be ‘loaded’ by any connected motors.

The input and outputs of WREN SDK are electrically isolated as the ESP effectively ‘sits’ in between.  This enables continued use of any existing manual controls or buttons, while allowing safe IoT control via the WREN SDK driver(s).  Ensure you allow pass-through control in your firmware code, so pressing a manual up or down, will make the motor respond as normal.

 

 

 

 

 

 

On the subject of drivers.  The WREN SDK PCB has been designed to allow either one, or two, L6205 DC motor drivers to be fitted (This all depends on the version of board you purchase).  These drivers each offer dual motor outputs but in order to facilitate higher current, per motor, each driver is configured as full bridge parallel.  This allows up to 5.6A RMS maximum, DC load current.

 

 

 

 

 

 

 

 

 

As the ESP series operates within the 2.4GHz WLAN band, you will need to ensure your Wi-Fi is setup  and you will need the router SSID and Password.

Safety

As with any project, safety is always priority.  Any device that can be ‘retrofitted’ to the host (electric reclining chair for example), has to consider many things, including:

  • Impact of installation
    • WREN SDK has been designed to simply connect in-line with existing 5 pin DIN connector.
    • With firmware configured.  Standard operation will co-exist with IoT.
  • Supply Feed and Loading
    • WREN SDK has been designed to take the DC feed from the host and control the motors in the same way.
    • Current consumption of WREN SDK, is very low and will not impact the host in any way.
  • Thermals
    • With consideration of PCB layout and design, the WREN SDK provides TWO thermal controls to the user.
      • L6205 Thermal Shutdown
      • PCB Temperature Sensor
  • Current
    • With consideration of PCB layout and design, the WREN SDK provides over current controls, via the L6205 safety shutdown
  • Safety Shutdown
    • A separate hardware logic circuit on the WREN SDK monitors the motor driver controls and motor enable safety shutdown.  Upon the L6205 alerting, this provides a logic 1 from the SFLAG.
    • SFLAG is connected to the GPIO16 pin on the ESP.  So upon detecting a logic high, the firmware code could easily be set to shutdown, restart, send a IoT alert etc.

 

 

 

 

 

 

 

 

Connections

With the standard WREN SDK, you will require to solder the motor control input and output cables to the board.  Colour code of our DEVKIT cable is:

  • DIN 1 = Pin 1 = Green
  • DIN 4 = Pin 2 = Black
  • DIN 2 = Pin 3 = Yellow
  • DIN 5 = Pin 4 = Brown
  • DIN 3 = Pin 5 = Red
  • DIN Screen = Pin 6 = White

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Firmware

Many flavours of IoT firmware is available and people equally have personal preferences to even using a hosted / Cloud based, or local, MQTT Cloud Broker.  As such, the WREN SDK was designed to be as flexible as possible.  Future expansion is also provided via an I2C and SPI port, should it be needed.

Although this is normally completed automatically as part of flashing process, ensure the ESP flash memory is erased first and ideally power cycle afterwards, before uploading the new firmware binary. Not erasing may leave behind remnants of the previous flash code which could interfere with the new firmware operation.

All WREN SDK boards are flashed with the production test code (wiki).  This is used to test the various elements of the board, prior to shipping.   The native code could equally be adapted by you, as needed, as it has a lot of useful information included.

Data control is via both ESP-12S GPIO and I2C GPIO Expander (MCP23017). to control the board functionality.  Further details on the GPIO can be found in our Wiki.

A standard TTL USB UART provides the easy method to flash new firmware and code to the WREN SDK.  Two connector methods are provided (pin solder header or optional 6 way JST), depending on your preferences.  Should you additionally connect the DTR and RTS to your Serial-to-USB adaptor, then flashing is straight forward as it removes the need for you to manually put the ESP into programming mode.

 

 

 

 

 

 

 

 

 

 

Typical connections to the Serial-to-USB adaptor are:

  • TXD > RXD
  • RXD > TXD
  • RTS > RTS
  • DTR > DTR
  • GND > GND
  • 3V3 > 3V3

Please ensure you do NOT connect the Serial-to-USB adaptor 5V to the WREN SDK 3V3.  This WILL damage the WREN SDK board!

An example firmware guide for Tasmota, is provided in https://tasmota.github.io/docs/Getting-Started/

WREN SDK templates to follow..

Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.