Raspberry Pi à la mode

November 11, 2012

AlaMode is a stackable arduino clone that empowers a Raspberry Pi with the ability to add arduino shields to it. It is an open source platform and easy to use.

AlaMode comes in a package like the one shown below:

Image

The datasheet for the AlaMode is available here.

It is possible to program the platform via the UART pins of the Raspberry Pi’s GPIO. The Wyolum webpage has provided clear instructions to get started with the hardware.

The board can be driven by the power supply via the Raspberry Pi or a wall wart. The jumper is located here as shown below:

Image

I got the typical arduino LED example working using the AlaMode.

Image

Happy Hacking!


The board has been populated and it is ready

February 8, 2010

PICdevelopment board

The board was populated successfully and most of the functional features of the board have turned out to be successful. I am yet to test one of the two voltage comparators available on the board.

The main features of the board include:

  1. PIC16F877A platform
  2. L293D module ( Can drive 2 geared DC motors or 1 stepper motor)
  3. ULN 2003A module for stepper motors
  4. Voltage comparator circuit for LDR based sensor module
  5. Voltage comparator circuit for IR LED – photodiode based sensor modules
  6. Analog Inputs
  7. Seven Segment Display * 4nos
  8. RS232 port
  9. LED outputs to test the comparators/voltage sensors
  10. 8 LEDs to test the outputs of the individual pins of the controller
  11. Plug and play option — Can test it with simple connecting wires across any pin of the microcontroller
  12. Power supply pins to power other add-on boards

Looking foward for your comments!


Starting to program with your FreeDuino

November 16, 2009

For those who aren’t aware of Arduino boards, I am posting some basic information.

Arduino is an open source hardware provided with a Free IDE. The information about Arduino Boards are available at :

http://arduino.cc/

As a beginner, you might not be proficient in soldering circuits and debugging them.  It is better to purchase an Arduino board that is readily available in the market.

If you are from India, one of the vendors in India for the Arduino boards is :

http://bhasha.co.cc/product.php?id_product=56

They are based in Pune and they are quite helpful in shipping the material and assisting you with all the necessary information. Their sales team was quick enough to answer to my queries.

In my opinion, 600INR  is worth spending on this board.

You may download the IDE from :

http://arduino.cc/en/Main/Software

However, there are lots of constraints with this software like:

If you are using a low bandwidth connection, you may feel that the file size is quite large ( 80 MB).

It requires a Java run time engine ( that was not a problem for me at least ). Imagine a high school kid or a someone who is very new to computers and electronics trying to start with Arduino.  These minute details need some attention!

However, an Arduino is the best way to start your hobby.

When you power your board using a 9V adaptor, the Red LED on your board, starts blinking. It would have been loaded with the LED program already and it shows that your board is in a good condition.

When you launch the arduino.exe file, a screen appears before you as shown in the figure below:

Arduino

I found the IDE to be user friendly. When I started learning MPLab (PIC Microcontrollers) and AVR Studio ( AVR microcontrollers), they were complex enough to make me lose interest in learning them.

There are good examples available along with this IDE. You may access them as shown in the figure below:

Launching an application

This opens up a LED Blinking program in a new window.

LED blinking

The actual code for the program is available at the link highlighted in the picture.

 

int ledPin =  13;
The 13th pin is where your LED is connected. So it is assigned to a variable ledPin.
void setup()   {

pinMode(ledPin, OUTPUT);
}
The 13th Pin is configured as an output pin.
void loop() — This is where the body of the program is written.  
{
digitalWrite(ledPin, HIGH);
A signal “1”is sent to the 13th pin.
delay(1000);
There are code libraries which generate delay in milliseconds when you enter an integer value in the delay(integer) function. Here the delay is for 1000 ms.
digitalWrite(ledPin, LOW);
A signal “0”is sent to the 13th pin.
delay(1000);
A delay for another 1000 ms.
}
Hence your LED switches on and off every second.
Any code needs to be compiled before you run it. You can compile this code by clicking the button : Play
Now when your compiling is done,  a “Done compiling” message appears below your window.
Press “Ctrl+U”, The LED connected to your 13th pin starts blinking!

 


My experiments with PIC

August 13, 2009

I relocated to Coimbatore recently and since then it has been difficult to get settled with things.  The first thing being setting things right with my interests i.e Microcontroller kit installation and purchase of components. I need to find a shop where I am able to buy electronics stuff. It has been a tough time to solder my own USB PIC  programmer board. Well, things would get straight as the days pass by.

I always wanted to use/write a delay program which listens to my words. I had never been successful in this regard.

I downloaded a header file which was available over the internet. I had problems with my MPLAB software.

#include “delay.h”
#include <pic.h>
void main()
{
 TRISB = 0x00;
 PORTB = 0x00;
 
 while (1)
{
 PORTB = 0x00;
 DelayS(1);
 PORTB = 0XFF;
 DelayS(1);
}
}

Now, the problem with the code was that the hex file was mysteriously wrong.

Hex file Snapshot from winpic

Hex file Snapshot from winpic

Later, I used my age old code which I learnt from an Embedded Systems training centre:

#include “pic.h”
void delay_ms (int n);
void delay_us (int n);
void main()
{
 TRISB = 0x00;
 PORTB = 0x00;
 
 while (1)
{
 PORTB = 0x00;
delay_ms(1000);
 PORTB = 0XFF;
delay_ms(1000);
}
}
void delay_ms(int n)
{
 int i;
 for(i = 0; i<=n; i++)
{
delay_us(n);
}
}
void delay_us(int n)
{
 int j;
 for(j=0; j<=n; j++);
}

The result was the same.

I had a two line hex file. Hence, I concluded that something is wrong with MPLAB. I used MikroC for the same code.

Bingo! My code worked. My hex code was:

Led Blinking Mikro C

Now, I tried testing my code using the PIC16F877A Development board. It worked. My first relocation experiement is done. I don’t have a camera to upload the PIC right now. I shall do so in the near future