Saturday, April 27, 2013

Raspberry Pi Zigbee for Wireless puTTY communication

As part of the robotics project, decided to use Zigbee instead of physical UART / LAN cable to make a wireless Raspberry Pi.. Not much information is available on Raspberry Pi interfacing with PC through Zigbee, maybe it is because the system is very simple. Below is the picture of a wireless Raspberry Pi that can be controlled from half a kilometer away.




Sponsor: www.avmicrotech.com/shop  eshop for your electronic needs





One of the main advantage of above hardware is that it uses the 5V to 3.3V regulator on board the Zigbee board and hence does not load the meager 50mA 3.3V of Raspberry pi. I am still using puTTY (at serial 115200) to control the raspberry pi. Below is snapshot while editing code wirelessly.



Used X-CTU to configure Zigbee Pro to 115200 baud.


Raspberry Pi H Bridge DC motor driver


As we all know, the Raspberry Pi has powerful computing power. In order to put these to use, I am planning to develop a vision based Robot. Maybe a vision based line follower. The first step was to develop locomotion. I am always in favour of using optoisolated boards for DC motor drive, as high inductance and commutation produce a good amount of noise in the circuit.




Sponsor: www.avmicrotech.com/shop  eshop for your electronic needs




 In this trial, I have used a SPI controlled Attiny2313 based board producing 100hz PWM (configurable from 100Hz to 700Hz). The board need 7 bytes to configure all the parameters of the two DC motors like PWM (speed), direction and frequency. The SPI frequency is 25000Hz. The code on Raspeberry Pi is slightly modified spidev_test.c The motor driver board is running off the Raspberry PI 3.3V which is limited to 50mA. My estimate is worst case scenario of less than 30 mA.




Sunday, April 7, 2013

Raspberry Pi PuTTY Xming GPIO WebOb Python

Below is my experience from 2 days of tinkering with Raspberry Pi.

Purchased: Raspberry Pi 500MB with cover Plus 4GB preloaded SD card from Farnell.



Day 1.
Connected with 42" LCD TV and though Bootup took some time but was able to complete all without any problem.  Installed Putty and Xming on my laptop to free the LCD TV. In 2 hours my Raspberry Pi was setup near my router remotely connected to my laptop.
Decided to move from 4GB to 8GB and a faster Raspberry Pi using class10 SD card. Purchased a SanDisk Ultra 8GB - SDSDQUA-008G-U46A class 10 SD card. Though a website mentioned it as incompatible, went ahead to install the latest image downloaded from Raspberry Pi downloads  using Win32DiskImager. Used samsung laptop SDcard reader to transfer image to the SD card. First Install had problem communicating with PuTTY as maybe full startup was not done during first boot and SSH key was not generated. Second image flashing worked perfectly.
Before starting PuTTY, first get the IP address of Raspery Pi using the command ifconfig. Logon using PuTTY and click start Xming. Type Startlxde at PuTTY to start the GUI window on Xming.



Sponsor: www.avmicrotech.com/shop  eshop for your electronic needs




Day 2.
 Full code testing time today. Raspberry Pi Educational Manual is excellent for novice like me. But some issues are not reported like Pygame not available yet with Python3. So the first thing is to do some update and install some packages.

You will need these
To get all the needed updates you need to execute these commands at LXterminal:-

$ sudo apt-get update

To get Python updates
$ sudo apt-get install python-dev

To install GPIO that is used in the example in Raspberry Pi educational manual
$ sudo apt-get install python-rpi.gpio

To install WebOb that is used in the example in Raspberry Pi educational manual
$ sudo apt-get install python-WebOb


.....cont