Raspberry Pi 433Mhz RF Communication Via ATtiny85




The Experiment: In this experiment were going to explore the possibility to replace the Arduino UNO Wireless Weather Station web server, with a Raspberry Pi Web Server. Will use an ATtiny85 to convert the 433Mhz data stream from the remote Weather Station to RS232. The Raspberry Pi will poll the serial port and convert the received ATtiny serial data to .xml file for the flash Web Weather Station plugin.

Table of Contents

1. Project Progress
2. Required Software
3. Raspberry Pi Software Install
Raspbian Debian Wheezy
Set Static IP Address
NGINX
PHP
GNASH
MATCHBOX
UNCLUTTER
4. Hardware
5. Prototype
6. Notes
7. Conclusion
8. Credits

Raspberry Pi 433Mhz RF Communication Via ATtiny85Progress:

Mar 20, 2015: Created a ATtiny 433Mhz to RS232 Data Converter schematic. Built the ATtiny 433Mhz to RS232 Data converter on a proto board and wrote the ATtiny 433Mhz to RS232 sketch. Testing  / working on  the Raspberry Pi Python Serial Port Script.

Installed the NGINX Webserver. Things are looking good weather data .xml file is up dating every second in the background on the Raspberry Pi. Tested the Flash Weather Station Plugin hosted from Raspberry Pi Web server and all working well.

Mar 21, 2015: Decided to boot the Raspberry Pi in kiosk mode, will display the Flash Weather Station Plugin in full screen mode. Will  run the Weather Station 433Mhz to RS232 Data Converter \ Web server in the background. All is working well, the ATtiny 433Mhz to RS232 sketch, Python Serial Port Script have been running without any problems.

Mar 22, 2015: Installed Unclutter to hide kiosk mouse pointer.

Mar 26, 2015: Installed PHP. Created wxTrend.py script to store weather trend data for wind, direction, temperature and humidity. Created index.php to display weather trend data with google charts. The serClient.py script which poles the Rpi RS232 port then converts weather data to weather.xml file is working without any problems. The Kiosk display is also working well.

Mar 27, 2015: Now have all the scripts in place, was able to run all weather station applications from the Raspberry Pi and all worked as expected.

Apr 1, 2015: A small problem with the VGA display, looks like it is going out of  sync, but discover that it might be caused by either the  Screen Saver or Blank Screen or Power Saver or Power Down. Not sure which one causing the problem.

Was able to resolve the problem in console text mode with the following:

1. sudo nano /etc/rc.local

# Add this line to rc.local
sudo sh -c 'setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1' 

2. Ctrl+x-y-<enter>


1. sudo nano /etc/kbd/config 

# Change BLANK_TIME to 0 
BLANK_TIME=0 

# Change BLANK_DPMS to off 
BLANK_DPMS=off 

# Change POWERDOWN_TIME to 0 
POWERDOWN_TIME=0 

2. Ctrl+x-y-<enter>

This resolves the display problem in console mode, but it does not fix’s the problem in X Window Kiosk mode. Working on that problem.

Apr 2, 2015: Might have resolution for display problem in X Window Kiosk mode with the following:

1. sudo nano /etc/X11/xinit/xinitrc

# Insert the following
xset s off     # don't activate screensaver
xset s noblank # don't blank the video device
xset -dpms     # disable DPMS (Energy Star) features

exec /etc/alternatives/x-session-manager # start lxde

2. Ctrl+x-y-<enter>


1. sudo nano /etc/X11/Xwrapper.config

# Change this: allowed_users=console to
allowed_users=anybody

2. Ctrl+x-y-<enter>


1. sudo nono /etc/lightdm/lightdm.conf 

# Under [SeatDefaults] change this: xserver-command=X to 
xserver-command=X -s 0 dpms 

2. Ctrl+x-y-<enter> 


1. sudo nano /etc/xdg/lxsession/LXDE/autostart 

# Change this: @xscreensaver -no-splash to 
#@xscreensaver -no-splash 

# Copy/Past text below 
@xset s off      # don't activate screensaver 
@xset s noblank  # don't blank the video device 
@xset -dpms      # disable DPMS (Energy Star) features 

2. Ctrl+x-y-<enter>

The above kinda resolves the display problem in the X Window Kiosk mode. But it is not consistently working after a shutdown or reboot.

Apr 4, 2015: Since the Kiosk X Window display is still a problem, decided to re-install a clean copy of Raspbian Debian Wheezy, and all the other required programs and script for the experiment. Happy to say that after re-installing everything the Kiosk X Window display has not had a problem. Only used the following settings to disable screensaver, blank video, power saver, power down:

1. sudo nano /etc/rc.local

# Add this line:
sudo sh -c 'setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1' 

2. Ctrl+x-y-<enter>


1. sudo nano /etc/kbd/config 

# Change BLANK_TIME to 0 
BLANK_TIME=0 

# Change BLANK_DPMS to off 
BLANK_DPMS=off 

# Change POWERDOWN_TIME to 0 
POWERDOWN_TIME=0 

2. Ctrl+x-y-<enter>

Have Shutdown -h now, Shutdown -r now many time and so far the Kiosk display has not had a display problems all day. Will test Kiosk display over night. All the other scrips are working fine. Note:  After 2(Two) days of testing still having the same problem.

Apr 6, 2015: Found a none related solution for this display issue on the web. With the following settings: Re-route console system messages from  tty1 to tty9 this stops system messages from displaying on tty1 be-hind the X-Window. Level3 restricts the tty9 system messages to critical errors only. Press Ctrl+Alt+F9 to see system messages, did not try this.

Raspberry Pi 433Mhz RF Communication Via ATtiny85 schematic

1. sudo nano /etc/rc.local

# Removed this line which was added to rc.local after the re-install:
sudo sh -c 'setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1' 
2. Ctrl+x-y-<enter>
1. sudo nano /etc/kbd/config 
# Change BLANK_TIME to 0 
BLANK_TIME=0 
# Change BLANK_DPMS to off 
BLANK_DPMS=off 

# Change POWERDOWN_TIME to 0 
POWERDOWN_TIME=0 
2. Ctrl+x-y-<enter>
1. sudo nano /boot/cmdline.txt 
# Comment out this line: 
#dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait 
# Past this line under that:
dwc_otg.lpm_enable=0 console=tty9 loglevel=3 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait 
2. Ctrl+x-y-<enter>

Worked all night without any display issues. Well worked all day without any display issues, looks like re-routing the console system messages to tty9 re-solved the display issue. Note: This display issue is possible only related to the way this kiosk has been configured.

 

For more detail: Raspberry Pi 433Mhz RF Communication Via ATtiny85




© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top