Posts in Category: Embedded Systems

[Linux] Kernel 2.6.28.4 Rootfs with + SDCard, SPI, sqlite & rsync for grasshopper, avr32 toolchain for 32-bit linux

Hey, if you need a precompiled image for ICnova ap7000 Base aka grasshopper, with sdcard support (look for embedded journal 2 to a how-to here) and SPI (here).

- To flash the image on the icnova just do this from a remote terminal (lets assume you already have rootfs.avr32.jffs2 on /tmp)

cd /tmp
mount -o remount,ro /
dd if=/tmp/rootfs.avr32.jffs2 of=/dev/mtdblock2

Be very carefull or you will corrupt the partition and you wont be able to boot from the icnova flash! (make sure you have sufficient knowledge on u-boot and linux)

Download rootfs+kernel

[HOW TO] Control two (or more) stepper motors in parallel with one microcontroller

Hey, last year i made a project to a course with my fellow colleague André which consisted on two Human-Interface designs to a robotic arm, and we came up with a difficulty in controlling the two stepper motors in parallel using different velocities.

For that we used some kind of “time-division” thing, to select a window to generate a clock to each stepper.

Lets take for instance 5 motors, and a 1s loop time, with a 40ms window, you can see in black the steppers to be clocked.

We used a L296-L298 IC combination to use only two pin per stepper (clock and direction), but you can use the 4 usual signaling per stepper with minor modifications in the code.

You can have the code (implemented on an Atmega8), but i don’t have much time to explain it, it just connects with PC and the uC will respond to the commands of the protocol table (if you need another language ask for it on the comments):

 

Command
Description
Way
Mx
Changes the mode to mode X, with X=0,1 or 2
PC->Micro
XA,B
If mode=1
A e B represents the number of steps to performs on motors 1 and 2

(at maximum velocity)
If mode=2
A e B represents the velocity (in steps p second) of 1 and 2.

abs(A,B) < MAX_STEPS_PER_SECOND

if A<0 or B < 0, the correspondent motor will step negativelly

PC-> Micro
T
Motor test
PC-> Micro
I
Puts the arm on the reference
PC->Micro
K
Returned by the Uc when the command finishes (on mode=1 , ‘T’ or ‘I’)
Micro-> PC
E
Command not recognized
Micro ->PC

Below you have a video demonstrating the functionality, the max. vel. of the steppers wasn’t too big, so don’t surprise.

Casio CFX 9850GB made wireless with Xbee

Hei, i want to show you something i did some time ago, i hooked up the serial connection of the calculator to my xbee, and made it wireless!

You can upload/download programs to it, or use my chat application! You can see it in use below.

If you need the schematics and/or configurations i’ve made just live it on the comments and i’ll post it here (i have no patience to do it today)

Cheers