Other blogs in this project

Forget Me Not Design Challenge Week 01: The Introduction

Forget Me Not Design Challenge Week 02: The EnOcean Sensor Kit, EnOcean Pi, and Raspberry Pi Model B+ Unboxing

Forget Me Not Design Challenge Posting 03: The EnOcean Sensor Kit, EnOcean Pi, and Raspberry Pi Model B+ Setup, Configuration, and FHEM Operation

Forget Me Not Design Challenge Week 04: Tektronix TBS1052B-EDU Oscilloscope

Forget Me Not Challenge Design Challenge Post 06: Cadsoft Eagle Schematics

Forget Me Not Challenge Design Challenge Post 07: Door Lock Monitor

Forget Me Not Challenge Design Challenge Post 08: Soldering Iron Monitor

Forget Me Not Challenge Design Challenge Post 09: Soil Moisture Monitor

Forget Me Not Challenge Design Challenge Post 10: Cat Feed Monitor

Forget Me Not Challenge Design Challenge Post 11: Project Summary

 

 


Overview

My new Tek TBS1052B-EDU scope and EnOcean EOP-350 Universal Programmer Board (UPB) arrived recently. Now I can configure and explore the analog and digital IO of a STM332U temperature sensor. The EnOcean EOP-350 UPB and the DolphinStudio software will configure and program the STM3xx series sensors. The programming board brings out most of all of the analog and digital IO signals on the sensor module to test points for probing with the Tek scope. The scope will be used to monitor signals. Figure 1 shows the EOP-350 test configuration. A Windows XP computer running DolphinStudio, DolphinAPI, DolphinView, OpenChoice Desktop, and TekVISA is connected to the EOP-350 and to the scope using a USB cable via a now new USB Hub. A Digital MultiMeter (DMM) will also be used for testing and can be connect to the computer by USB collect logged data if needed.

 

This test configuration will be used to learn more about the EOP350, the sensors, and how the sensors behave when they power up. The three things I want to learn are summarized below:

 

  • Debug the Built-In-Self-Test error reported by the TCM320U transceiver module.
  • Learn more about the output supply voltage from the STM332U sensor module when it wakes up and supplies power for external circuits.
  • Learn more about the analog input range and resolution of the STM332U sensor module.

 

eop350_test_setup.png

Figure 1

 

My first step to getting started answering these questions was to install the DolphinStudio software, which was downloaded from the website [1]. The installation went well and without problems until the EOP-350 UPB was plugged into my USB hub (IOGEAR). Windows XP repeatedly failed to recognize the new hardware. After a lot of troubleshooting the install and drivers, the problems turned out to be with my IOGEAR USB hub. It’s very old now. The output voltage from the USB port used was only 4.04 V, which is not enough to power the board, which needs 5V. After the EOP-350 UPB was plugged directly into my computer, then the Windows XP recognized the board and I was able to read the status of the TCM320U and STM332U modules. The TCM320U reports a Built-In-Self-Test (BIST) fail error, however. The STM332U reports it passes BIST. It took a while to untangle all these issues (Win XP driver error, bad USB hub, and TCM320U module BIST error). Replacing the USB hub has eliminated the Win XP driver error and allows communication with the EOP-350 UPB and modules using DolphinStudio.

 

I also had some issues with using DolphinStudio. The program contains default file locations that do map to files in the installation. Most of the default file locations begin with C:\Programme\EnOcean.., but most of the files are located with locations beginning with C:\Program Files\EnOcean.. in my installation. I’m guessing that this may be due to the difference in file locations between the US and international versions of Windows. It’s fairly easy to map the default file locations to actual file location, but I would think that the install program would set this depending on the specifics of the local machine.

 

DolphinStudio also points to file locations that are missing. It turned out that DolphinAPI was needed and was installed separately. Then it was easy to select the header file needed to read modules using the UPB. The DolphinStudio Backup directory and files appeared to be missing and when I tried to restore a module from a backup it resulted in a missing file error. The backup files are supposed to be generated automatically, so it’s it likely that the TCM320U module is not working correctly and DolphinStudio was not able to create a backup (perhaps related to the BIST error). The sections below chronicle the installation process, troubleshooting, and changes I made to get DolphinStudio to communicate with the EOP-350 EOP and sensor modules. I found the EKP-350 Developer User Manual more helpful for setting up the software then the EOP-350 User Manual [2] [3] [4]. Reading the Dolphin Core Description would have helped a lot if I read it earlier in the process, too [5].

 

DolphinStudio Install

I installed DolphinStudio and let the install program create a desktop icon, added DolphinStudio to my PATH variable, removed the prior version, and installed drivers (see Figure 2).

 

dolphinstudio_install.jpg

Figure 2

 

Windows kept giving me a USB device not recognized error message when ever I plugged in the EOP-350 programming board. It turned out that my USB hub was causing the problem. Connecting the EOP-350 to another USB hub or directly to my computer cleared up this issue, so then DolphinStudio would recognize the EOP-350 on COM30 EOXTJHIOA.

 

DolphinView Advanced Install

I installed the DolphinView Advanced software without issue and followed all the default settings. DolphinView could not communicate with the TCM320U transceiver module as it was not functioning properly.

 

DolphinAPI Install

DolphinAPI was installed with the selected options shown in Figure 3.

 

dolphinapi_install_setup.jpg

Figure 3

 

It installed but generated an error regarding the RadioToSerial.uvproj, which I could not resolve (see Figure 4), but this did seem to be a problem for the questions I’m trying to answer. DolphinAPI also needed a C51.ini file from the Keil development tools. I had not installed this yet, so I created a dump file to continue with this installation. I later installed the Keil development tools. Keil V5 does not contain a C51.ini file and I have not yet resolved this issue.

 

dolphinapi_install_errors.jpg

Figure 4

 

DolphinStudio

I installed DolphinStudio and ran it before installing DolphinView Advanced and DolphinAPI. Some of the default program links in the program must be redirected to the proper location. For example, the link in the System Log under the EOPX [Programmer] tab was changed from

 

C:\Programme\EnOcean\DolphinAPI\EO3000I_API\EO3000I_LIB\EO3000I_API.h

to

C:\Program Files\EnOcean\DolphinAPI\EO3000I_API\EO3000I_LIB\EO3000I_API.h

 

Once DolphinAPI was installed, the system log reported the status of the TCM320U module, as shown in Figures 5 (before) and 6 (after).

 

dolphinstudio_sys_log_conf_errors.jpg

Figure 5

 

 

dolphinstudio_sys_log_conf_fix.jpg

Figure 6

 

I made a similar change to the Programmer section of the EOPX [Programmer] Read Operations tab from:

 

C:\Programme\EnOcean\DolphinAPI\EO3000I_API\ \Examples\LightControl\Output\LightControl_868.hex

to

C:\Program Files\EnOcean\DolphinAPI\EO3000I_API\Examples\LightControl\Output\LightControl_902.hex

 

The program found the conf file too and updated it. Then, it gave me a warning that the files would be overwritten, so I changed the names slightly so the original file selected would not be overwritten by the read operation (see Figures 7 and 8).

 

dolphinstudio_ptog_conf_errors.jpg

Figure 7

 

dolphinstudio_prog_conf_fix.jpg

Figure 8

 

DolphinView Advanced

I get the "You connected a non-compatible device or firmware to DolphinView" error message when connecting an EOP-350 Universal Programmer Board (UPB) to DolphinView v3.4.1.0. The only error report by the Download firmware panel is that Built-in-Self-Test (BIST) Failed, as shown below. Note that much of the information about the module is not reported.

 

 

EOP-EnOcean Programmer v2.3.2.0 (c) Copyright 2009 EnOcean GmbH

-----------------------------------------------------------------

 

Init device 'EOXTJH1OA'........................................OK

Programmer firmware version ' DA'..............................OK

Connected to 'EO3000I' BootLoader 'v2.3.0.0'...................OK

Read chip information..........................................OK

 

--- Chip infomation ---

 

Bootloader        : v2.3.0.0

Chip version      : E03000I v1.3

Blank             : Yes

BIST              : Failed

 

--- Information area ---

 

Chip ID           : 01890BD4

Lot ID            : C4S13B

Lock bit          : Locked

 

--- Configuration area ---

 

Codeprotect bit   : Unlocked

Program size      : 0 pages (0 bytes)

API version       : 255.255.255.255

App version       : 255.255.255.255

App description   : N/A

Radio version     : N/A

CFG Area Version  : 255

 

--- Manufacturer settings ---

 

FracN Rx          : N/A

FracN Tx          : N/A

Shortterm calib.  : N/A

Flywheel calib.   : N/A

Watchdog calib.   : N/A

  Temp. slope       : N/A

  Temp. calib. [°C] : N/A

  Temp. A/D calib.  : N/A

Base ID           : N/A

Conform ID        : N/A

Manufacturer      : N/A

CfgArea version   : N/A

Modul frequency   : N/A

Modul type        : N/A

DMC               : FF FF FF FF FF FF FF FF FF FF FF FF

Stepcode          : N/A

 

--- Firmware information ---

 

Reset chip.....................................................OK

  Disconnect.....................................................OK

 

 

I tried to update the firmware (hex file) STM320 V2.3.0.5 868, 315, & 901 MHz updates using the Programmer section of DolphinStudio to update the TCM320U and received the error message below. Until the EOP-350 UPB communicates correctly with the TCM320U, programming the module won’t be possible.

 

EOP-EnOcean Programmer v2.3.4.0 (c) Copyright 2009 EnOcean GmbH

-----------------------------------------------------------------

 

Init device 'EOXTJH1OA'........................................OK

Programmer firmware version ' DA'..............................OK

Connected to 'EO3000I' BootLoader 'v2.3.0.0'...................OK

Read CfgArea to buffer.........................................OK

 

ERROR: FracN RX/TX values missing, radio is not available!

 

Please restore your config area:

Use DolphinStudio -> Utilities -> Restore config area from backup

 

Aborting programming!

 

Reset chip.....................................................OK

  Disconnect.....................................................OK

 

I could not restore the configuration area because the backup directory is missing from the installation (see Figure 9). The backup was most likely not generated since the TCM320U is not functioning properly.

 

dolphinstudio_backup.jpg

Figure 9

 

As instructed by EnOcean technical support, I re-installed DolphinAPI, DolphinStudio, and DolphinView Advanced. I still had the same default file location problems as before. The TCM320U still reported the BIST failed error.

 

EOP-350 Universal Programmer Board

Figure 10 shows the block diagram of the EOP-350 UPB and Figure 11 shows the layout of the EOP-350 UPB [6]. The EOP-350 UPB has a FT2232D USB serial converter that provides communication between the modules on the UPB board and a computer. The 5V supply from the USB cable is converted to 3.3 V by a Low Drop-Out (LDO) regulator. This 3.3V is the main supply for the modules and is labeled as VDD on the EOP-350.

 

There are four interface connectors. The programmer interface is not used so the connector is not populated. The TCM320U interface connector is a 16 pin single inline connector, the TCM300 interface connector is a 30 pin dual pin plug connector, and the STM332U interface connector is a 20 pin dual pin receptacle connector. Only one interface connector shall be used at a time. The interface connectors are connected together in parallel so two devices will place two outputs on the same signal and cause a conflict.

 

A section of the board is dedicated to LED indicators, control switches like Reset, Clear, and Learn, and there is a configuration jumper to set a module into mode 1 or mode 2 (more about this later). There are also two test point headers for monitor and applying inputs to a module. There are power and ground pins that provide access to VGC and SWPWR, as well. VGC is the voltage of the charge storage from the energy harvesting circuit, and SWPWR is the switch power output from the module. SWPWR provides power to external circuits when the sensor module wakes up.

 

eop350_blk_diagram.png

Figure 10

 

 

eop350_layout.png

Figure 11

 

 

Figure 12 shows the proper TCM320U module installation and Figure 13 shows the proper STM332U module installation.

 

tcm320u_installation.png

Figure 12


stm332u_installation.png

Figure 13

 

Figure 14, shows the TCM320U transceiver module with a table showing the pin number and signal names [7] [8] [9]. This module is powered with 3.3V between VDD (pin 15), and ground (pins 1, 16). An analog voltage of 0.52 V on ADIO0 (pin 2) sets the module in mode 2 with the configuration jumper in the 1-CH ACT position. The mode is selected by the configuration jumper on the EOP-350 UPB. Communication with the module occurs on ADIO6 (pin 7), and ADIO7 (pin 8). The other pins are inputs or output that can be configured using DolphinStudio and compiled into firmware using the Keil development tools. A more complete description of the signals is shown in Figure 16.

 

tcm320_pinout.png

Figure 14

 

Figure 15 shows STM332U Temperature Sensor Module with tables showing the pin number and signal names [10]. The connections between the STM3XY module interface connector and the test connectors is not specified in the schematic in the EOP-350 user manual so I had to buzz some of them out with the DMM. VCHAR is connected to VDD on the test connector. When power is applied to the EOP-350 UPB via the USB cable, it charges the STM332U with 3.3V from the LDO regulator.

 

stm332u_pinout.png

Figure 15

 

Figure 16 shows the test pin numbers, signal names and the function of each signal for the two modules. The signal types are I=Input, O=Output, and P=Power. If the signal type is in parenthesis then it is an internal signal to the module and can’t be measured on the test pin. Communication with the modules occur using the ADIO6 (receive data) and ADIO7 (transmit data) signals on the module. For the TCM320U, the analog input voltage on ADIO0 selects the operating mode, for the STM332U ADIO0 is an analog set point. The manual is not clear but I’m guessing this is a set point that a user controls to change the room temperature and becomes part of the heating/cooling control system.

 

eop_test_points_table_f14.png

Figure 16

 

The table in Figure17 shows the operating modes of the TCM320U and Figure 18 shows the nominal input voltage and input voltage range need on ADIO0 to select the designed mode.

 

tcm320u_modes_table_f15.png

Figure 17

 

tcm320u_modes_voltage_table_f16.png

Figure 18

 

The table in Figures 19 shows the CW_0 and CW_1 wake-up selection time control bits of the TCM332U and Figure 20 shows the CP_0 and CP_1 redundant transmission control bits.

 

stm332u_wakeup_modes_table_f17.png

Figure 19

 

stm332u_tx_control_table_f18.png

Figure 20

 

EOP-350 UPB & Module Communication

Figure 21 shows the communication connections between the FT2232D Serial Converter and the module. The Serial Converter transmits data (TxD) to the module on ADIO6, and receives data (RxD) back from the module on ADIO7. There are 0 Ohm resistors in series on each of the lines. I presently suspect that there is a problem with the transmit output from the FT2232D. It’s not clear how this might have been damaged. Changing the 0 Ohm series resistors to a resistance between 1000 and 10000 might to help protect the Serial Converter from accidental improper insertion of modules Ohms (value depends on Input Current High (IIH) and Input Current Low (IIL), which are not specified in the Core or module datasheets). The STM332U is particularly tricky to get plugged in correctly without pin or row offsets, for example.

 

rxd_txd_diagram.png

Figure 21

 

Figure 22 shows the transmit (ADIO6) and receive (ADIO7) signals for the TMC320U measured using the Tek 1052B-EDU scope. ADIO6 is on CH1 in yellow an ADIO7 is on CH2 in blue with both channels set for 500 mV/div. The scope was set for a single trigger on CH2 and the time base was set for 25 ms/div so that multiple bits of the message could be captured. The transmit signal from the FT2232D, ADIO6 never changes state and stays at about 3.3V. These signals are triggered when I retrieve Module Information from the EOPX [Programmer] tab in DolphinStudio. The TCM320U reports a BIST Failed error at this point. The receive signal ADIO7 on the other had makes good transitions between 0 and 3.2 V and the highs are greater than the maximum input high voltage (Max VIH) and the lows are less than the minimum input low (Min VIL). ADIO7 floats at about 0.67V before the FT2232D becomes active. I understand from EnOcean support that this is expected.

 

tcm320_rxd_txd_traces.png

Figure 22

 

Figure 23 shows a table of voltage at the test points for the TCM320U with and without the TCM320U module installed in the EOP-350 UPB. When the TCM320U was plugged into the EOP-350 UPB, ADIO7 went from a low to a high and some of the unused digital outputs from about 0.5 V to 0.8V which would probably be interpreted as a logic low. I buzzed out the connector pins for ADIO6 and ADIO7 looking for shorts or low impedance connections on ADIO6 and test points and other circuits on the board but did not find anything that looked like a problems. The impedance between ADIO6 and other pins or connections on the board range from about 50k ohms to more than 10 M Ohms (open circuit). So this all seems typical and the ADIO6 pin on the TCM320U does not look shorted to the external pins on the module either. The cover on this module prevents me from checking possible shorts to DVDD and IOVDD within the module.

 

tcm320U_signal_voltage_table_f21.png

Figure 23

 

Figure 24 shows the transmit (ADIO6) and receive (ADIO7) signals again but for the STM332U measured using the Tek 1052B-EDU scope. The setup is the same as before with ADIO6 is on CH1 in yellow an ADIO7 is on CH2 in blue with both channels set for 500 mV/div. The scope was set for a single trigger on CH2 and the time base was set for 25 ms/div so that multiple bits of the message could be captured. The transmit signal from the FT2232D ADIO6 swings between 2 and 3 V. This swing provides a good high voltage, but the low voltage isn’t good enough to be a minimum low input voltage, so although the module responds, it still indicates something is not right. Again, these signals are triggered when I retrieve Module Information from the EOPX [Programmer] tab in DolphinStudio. The STM332U reports that BIST passes and provides internal data that the TCM320U would not. The receive signal ADIO7 makes different but good transitions between 0 and 1.7 V, and the highs are greater than the maximum input high voltage (Max VIH), and the lows are less than the minimum input low (Min VIL) most of the time. ADIO7 also floats at about 0.67V before the FT2232D becomes active.

 

stm332u_rxd_txd_traces.png

Figure 24

 

Figure 25 shows a table of measured voltages for the STM332U using the EOP-350 UPB test points.

 

stm332u_signal_voltage_table_f21.png

Figure 25

 

I was able to program the STM332U with some of the example files provided with DolphinAPI like the SmartACK Sensor and ReadAnalog examples [11]. The STM332U was programmed with the STMRH program initially and the Module Information section of DolphinStudio reports that the module passes the BIST. After programming this module with either of the two firmware examples, this module fails the BIST. I found the STMRH firmware on the EnOcean website and reprogrammed the STM332U back to the original state but the Programmer section of DolphinStudio reports that the cfg.hex file was of the wrong format. It turns out that the source files on the EnOcean website also contain the STMRH hex files and these files programmed the module correctly.

 

 

EOP-EnOcean Programmer v2.3.4.0 (c) Copyright 2009 EnOcean GmbH

-----------------------------------------------------------------

 

Init device 'EOXTJH1OA'........................................OK

Programmer firmware version ' DA'..............................OK

Connected to 'EO3000I' BootLoader 'v2.3.0.0'...................OK

Read CfgArea to buffer.........................................OK

Read chip information..........................................OK

Backup for ChipID: 0x1833131 already exists....................OK

Check ChipID...................................................OK

Write PrgArea..................................................OK

Verify PrgArea.................................................OK

Write CfgArea..................................................OK

Verify CfgArea.................................................OK

Build-In-Self-Test.............................................OK

Reset chip.....................................................OK

  Disconnect.....................................................OK

 

The Module Information section also reports that the BIST passes. Something is wrong with the two example programs as they must not write something correctly and cause the BIST to fail. It’s a relief that the module was not damaged by programming using the example files or by UPB. I repeated this test with the TCM320U with one of the TCM320U firmware files, but unfortunately the write operation in the EOPX [Programmer] section of DolphinStudio gives a write error message so I believe the TCM320U is probably fried due to the ADIO6 signal not changing state.

 

Testing the EnOcean Sensor Analog Input

I loaded the SmartACK Sensor example firmware into the STM332U module and connected the scope to the SWPWR and ADIO7 pins to see how the sensor module powers external circuitry. The STM332U user manual indicates that the SWPWR pin is controlled by ADIO5 output pin on the chip (it is not accessible) and provides 1.8V at 5mA to external circuits. The SWPWR power pin is switched on, and the processor waits 0.25 ms before sampling an analog input. Figure 26 shows the SWPWR signal (CH2 in blue) and the ADIO7 signal (CH1 in yellow). The SmartACK Sensor firmware sets ADIO7 high when an analog sample occurs. It’s not clear that the SWPWR power signal is turning on correctly since the output voltage only reach 952 mV at its peak (expecting 1.8V). It is not on very long either as the peak signal only lasts about 0.20 ms. I’m not able to find much in the EnOcean documentation on using this signal for powering external circuits by searching the knowledge base either. Also, I was not able to collect the analog values using the FHEM server running on the RPi.

 

stm332u_swpwr_adio7.png

Figure 26

 

Figure 27 shows the same signals as above but using the ReadAnalog firmware example. This is a neat example. The analog signal on ADIO1 is sampled and then the value is transmitted to a TCM module using the UART communication port. CH2 shows the SWPWR signal, and CH1 shows the data to be transmitted by the UART. Unfortunately, my TCM320U is fried so I can’t receive the value. I used the RPi, EnOcean Pi, and FHEM to collect the analog reading but could not correlate the pot setting to a sensor value reported on the FHEM server. Also, a 10 k Ohm pot between SWPWR and ground with the center tap connected ADIO1 causes the SWPWR to collapse. Again, it’s not clear that the module is configured properly.

 

stm332u_swpwr_adio7_analogread.png

Figure 27

 

Summary

Answering my three simple questions turned out not to be quite so easy due to a failed USB hub and a failed TCM320U transceiver module. This was also compounded a little by an ad-hoc software installation process on my part. The overall process flow involved:

 

  • Installing DolphinStudio
  • Troubleshooting Windows XP failure to recognize the new EOP-350 UPB as new hardware. This was traced to a bad USB hub.
  • Learning that the EO3000I_API.h file was missing and installing DolphinAPI
  • Mapping default file locations to actual file locations
  • Troubleshooting the TCM320U and EOP-350 for a BIST failure and a failed module write operation.
  • Installing DolphinView
  • Troubleshooting a communication error with DolphinView
  • Troubleshooting transmit (AIO6) and receive (AIO7) signal of the TCM320U and STM332u modules
  • Programming the STM332U module with the SmartACK Sensor and ReadAnalog firmware examples to test the analog inputs (ADIO0, ADIO1, & ADIO2), and the external power supply signal SWPWR

 

The modules are capable of making very complex analog and digital measurements, and powering external circuits. Due to some hardware failures, I was not able to fully demonstrate this process completely. Lastly, I suggest installing the Keil development tools [12], then DophinAPI, DolpinStudio, and DophinView for a more streamlined software installation process.

 

Reference

[1] enocean.com, Development Tools Download

[2] enocean.com, EnOcean Programmers Board EOP-350 User Manual

[3] enocean.com, EDK 350 Developer Kit, EDK 352 Thermo Developer Kit, EPK 350 Programmer Kit User Manual

[4] enocean.com, EDK 300 / EDK 300C Developer’s Kit for EnOcean Dolphin Modules User Manual V1.4

[5] enocean.com, Dolphin Core Description V1.1

[6] enocean.com, EOP-350 Universal Programmer Board User Manual

[7] enocean.com, TCM 320 Transceiver module for programmable system components

[8] enocean.com, Basic videos on EnOcean Kits

[9] enocean.com, Transceiver Module TCM 300 / TCM 300C / TCM 300U TCM 320 / TCM 320C / TCM 320U User Manual V1.43

[10] enocean.com, Scavenger Transmitter Module STM 330 / STM 331 / STM 330C / STM 332U / STM 333U User Manual V1.15 June 21, 2013

[11] enocean.com, Dolphin API Manual

[12] keil.com, Keil Software Development Tools