If you are looking for interfacing your custom made Analog and Digital Sensor with STM330, This post will be like fireman minion for you.... So this post is dedicated to fireman minion...
Introduction :
As like me, may be you are also amazed by ultra low power and energy harvesting capabilities of Enocean Sensors. I have looked at many initial proposals for "forget_me_not design challenge", planned to use STM330 with DIY Sensors, including proposal of mine...
I have progressed well in this direction and came up with fruitful solution for same today with this post.
First demonstration of interfacing two analog inputs with STM330...
All the juice of this post is at bottom of post... "Attachment"
Lets start...............
Interfacing Possibilities with STM330 As per my attached firmwares...
1. Two Analog Input (ADIO0 and ADIO1)
2. One Analog Input (ADIO0) and One Digital Input (WAKE0)
3. One Analog Input (On Chip Temp-Sensor) and One Digital Input (WAKE0)
4. One Analog Input (On Chip Temp-Sensor) and One Analog Input (ADIO0)
Now its Time for DIY.....
Interfacing Two Analog Input (ADIO0 and ADIO1) with STM330.
What you need for this?
A. EOP350 EnOcean Programmer (We all Have... Thanks to EnOcean)
B. STM330 Temperature Sensor (Obviously!!!)
C. Dolphin Studio (To burn Hex file and Setup configuration Area on STM330..)
D. Attachment with this post (All type of firmware you may need....)
E. Rpi with Enocean Transceiver and OpenHAB Installed (To check results...)
Steps at Dolphin Studio Side....
Step1 : Download Attachment of this post and unzip to any directory
Step2 : Attach STM330 on EOP350 Programmer and Power-up EOP350 from USB port of PC.
Step3 : Run Dolphin Studio on your PC.
Step4 : Select EOPX Programmer Tab and set File location from unzipped attachment as per your STM330 Freq and required Interface, finally Execute to burn new firmware to your STM330.
Step5: Still Default EEP profile is A5:02:05 (T Only) with Hardware configuration, Change this to A5:04:01 (T-H) and some extra setup to override hardware setting for Redundant transmission and wakeup cycles timing To speed up testing.
Step 6: STM330 is ready with new firmware... Now it works with power supply from EOP350... So dont remove STM330 from EOP350 because new firmware send out teligrms quickly and solarcell cant provide enough for power at this transmission rate...(after testing you can reconfigure redundant transmission and wakeup cycle to control it from hardware to save power by decreasing transmission rate)
Step 7: Hardware Setup for ADIO_0 and ADIO_1 on EOP350
Now steps to test new firmware at raspberrypi side...
Step 8: As all my STM330 firmware supports EEP profile A5:04:01 with Temperature and humidity sensor, you need to use different bindings with openhab. So move org.openhab.binding.enocean-1.5.1.jar from attachment to addons directory of Runtime OpenHAB Installation and remove org.openhab.binding.enocean-1.5.0.jar from addons directory.
Step 9: add this lines to demo.items with your STM330 Device ID
Number EnOcean_sensor_temp "Temperature [%.1f °C]" <temperature> (enocean) {enocean="{id=00:83:02:70, eep=A5:04:01, parameter=TEMPERATURE}"} Number EnOcean_sensor_humd "Humidity [%.1f %%]" <humidity> (enocean) {enocean="{id=00:83:02:70, eep=A5:04:01, parameter=HUMIDITY}"}
Step 10: add this lines to demo.sitemap
Text item=EnOcean_sensor_temp valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"] Text item=EnOcean_sensor_humd valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Step 11: run openHAB ....move pot of ADIO0 and ADIO1 and see the readings on openHAB URL.... ENJOY.....
Note:
** Firmware used for this test shows ADIO0 readings with temperature parameter (mapped between 0 to 40) and ADIO1 readings on Humidity Parameter (mapped between 0 to 100)
** You can use any firmware as per your interface requirement.
readme.txt file with each firmware have details for mapping and other hardware specific information
All 315MHz firmwares I have tested on my STM330, and other are compiled for 902MHz and 868MHz but not tested...
for any query please let me know....
I have used keil C51 for modify source code of STM330 to interface Analog and digital sensors to STM330.
If you need updated source codes to play with please let me know...
This post is all about Fruits .... My work to get these fruits will come soon....Because This time my daughter is all prepared to welcome "fireman minion " at his new Home in INDIA... and I don't want to miss dead line...
In next post I will share step by step working with keil to modify STM330 Sourcecode as per need and some of my custom build sensors working with STM330...
Hope this post will be useful to all....your valuable feedback invited here...
Top Comments