Project Aurora

Hi! Once again some time has passed since my last post. I'd like to post more often but I've been having some busy days. This time I'm writing about a project I developed mostly with my friends and colleagues Gonçalo Pereira and Fábio Martins. The project was slowly developed from December of 2010 to May of 2011 for the event XXVI Semana Académica (26th Academical Week) of the University of the Algarve. The event consists in a full week of partying, with concerts from known portguguese and few international bands. Each course of the university gets a 3x3m tent to sell drinks and raise some money for trips or other purposes. For the Electrical and Electronics Engineering course that we were representing, we decided to make something that had never been done before in that event, something that people are not even used to see in typical bars and discos. Below you can see a video that we made about it, spoken in portuguese but with subtitles in english :).

Low Cost (1,85€) USB to RS232 LVTTL Serial Cable

Hi there! Have you ever needed a USB to RS232 converter to connect to your microcontroller for serial communications? If you have, you probably bought a USB to RS232 converter and then used an external MAX232/DS232 to convert the RS232 voltage levels to TTL levels. That requires a little money, and a little work too. However, there is a simple cable that converts USB to RS232 with LVTTL levels (fully compatible with TTL). Basically you just need to change the connector. The last one I made cost me only 1,85€ with shipping included! :D If you only buy an FTDI chip it will cost you almost the double! (yes, I know that FTDI chips are probably the best USB to RS232 converters but most users don't take require the full features and specifications of an FTDI chip).

(Click the photo for better resolution in Picasa Photostream)

Another Interview at RUA FM

Hi! In November, 9th, I posted about an interview (Interview at RUA FM) that I gave to RUA FM radio station about my team's participation in the European BEST Engineering Competition, in Istanbul. Once again, I was invited for another short talk, this time about Cognitive Robotics, which will be on air during this week. You can listen to the interview below or download it here. Again, the interview is in portuguese, so you must know portuguese (or learn it :P) to understand it. I hope you enjoy it. You can also check some other interviews and interesting talks from the professors and students of the elctronics engineering department of the University of the Algarve here (all in portuguese).




Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

How to use OpenMP with CMake

Hi! Some days have passed since I wrote something on the blog but I've been a little busy. Anyway, here I am again, this time to write about CMake and OpenMP. If you don't know CMake, and don't know how to use it, you may check my previous  tutorial on How to use CMake with OpenCV where I describe the basic steps to get started with CMake.
OpenMP is an API that supports multi-platform shared-memory parallel programming in C/C++ and Fortran. The OpenMP API defines a portable, scalable model with a simple and flexible interface for developing parallel appications on platforms from the desktop to the supercomputer.
After following the steps I described in the post that I previously referred, you'll have to add the following lines to tour CMakeLists.txt file:
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
After inserting these lines you'll be ready to use the OpenMP libraries in your project. That's just it.



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)
Donate

Interview at RUA FM

Hi there! Some time ago I went to RUA FM with my friend Gonçalo Pereira to give an interview about our participation in the European BEST Engineering Competition, in Istanbul, as the portuguese representatives in the Team Design Category. Our team was composed by four electronics engineering students: me, Gonçalo Pereira, Ana Margarida and João Lezinho. After winning the local BEST engineering contest in Faro, and the portuguese BEST engineering contest, in Oporto, we qualified for the european contest. After we arrived home, we were invited to share our experience in Istanbul in the university's radio. The interview is in portuguese, so you must know portuguese to understand it. If you know portuguese, you can hear the interview below or download it here. If you don't know, you can learn portuguese and then come back here to hear it :P. You can also check some other interviews and interesting talks from the professors and students of the electronics engineering department of the University of the Algarve here (all in portuguese).


And at last but not least, thanks to Câmara Municipal de Faro, Câmara Municipal de Olhão, Liga dos Combatentes de Loulé and Instituto Superior de Engenharia of the University do Algarve for supporting us in our journey.

Update (23/11/11): I gave Another Interview to RUA FM about Cognitive Robotics, in portuguese. Check it out if you want. :)



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

My home Lab

Hi! This time I'll show you my home Lab which is where I usually tear things apart and sometimes make some electronic or electromechanical devices. So, my lab is composed by two workbenches: one for computer programming and electronics and another one for the hard work (cutting, drilling, hammering, etc.).

(Click the photo for better resolution in Picasa Photostream)

How to scavenge electronic parts quickly and safely

Hi again! If you are like me, sometimes you take electronic devices home just to tear them apart and scavenge some electronic components or some dc/stepper motors. It's always a great way to learn about electronics and to save some money. Sometimes you get to know some new IC... sometimes you get some really expensive IC... sometimes you get an IC that you couldn't even buy if you wanted just one or two... So, my advice for you if you like to make some circuits for fun is to start scavenging all the electronic devices that your friends and family throw away.
Until today I always desoldered the components with a desoldering iron and a desoldering pump but that's really slow, really tiring and sometimes it's also very annoying when you want to remove some component that just won't come out of the board or gets its legs ripped apart after 5 minutes of heating, pushing and pulling. Removing conectors or ICs with lots of pins is always very hard too. And the worst part.. it's not good for your health since it releases lots of dangerous fumes. But now I use a new technique! :D

(Click the photo for better resolution in Picasa Photostream)

How to setup a Cisco VPN Client in Ubuntu 11.10

In this post I'll guide you through the very simple process of setting up a VPN client to a Cisco VPN using the Ubuntu's Network Manager. A VPN is a Virtual Private Network. What does this mean? It means you can connect your computer to a Local Area Network through the Internet and do everything you could do in that network (access files in a local server, access specific websites, etc.) as if your computer is connected to that network by cable or Wi-Fi.
The first thing you have to do is to install the VPNC plugin for Network Manager, so that it becomes able to support the Cisco VPN protocols. To install the plugin open a terminal and run the following command:
sudo apt-get install network-manager-vpnc
Now you just have to click on the network connections icon on the top menu bar, click "VPN Connections" and then "Configure VPN". The Network Manager window will popup and then you can add a new VPN and insert all the info to connect to the desired remote VPN server or import a configuration file (.pcf), if you have one.
Finally, restart your computer and if you entered all the correct settings, you're ready to go! Simple, isn't it? :)



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

Hi! This time I'm writing to talk about a great organizer for electronic components that I found, zParts. Some days ago I decided it was time to organize the lots of electronic components that I have in my home lab. I thought about developing an application were I could insert the parts references, the amount of each component I had, and also with some button to open the datasheet without having to browse the folder with lots and lots of datasheets. However, before developing the application I decided to search if no one had done that work before and I found zParts, by Jon Ziebell. I gave it a try, and that's exactly what I needed. It is written in Java, so it works in whatever operating system you have.

(Click the photo for better resolution in Picasa Photostream)
It's very simple to use and allows you to create categories of components, subcategories, and components with as many fields as you desire. You can also relate each component to an image and a datasheet. What else do you need? :D In my case I don't remember anything else I would need, but if you do, you can always program it yourself, since it is an open source project and its source is available in sourceforge. If you need to organize your components, give it a try! To run it just open a console, enter the folder where you extracted the zParts files and enter the following command
java -jar zParts.jar
If you have tested it, liked it and want to add a shortcut for zParts in Unity in Ubuntu 11.10 just do the following steps:
  1. Create a file under /usr/share/applications named zparts.desktop and paste the following code into it 
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_GB]=/usr/share/icons/hicolor/scalable/apps/gdu-category-multipath.svg
    Name[en_GB]=zParts
    Exec=/<path to folder where you have zparts>/zparts_start.sh
    Name=zParts
    Icon=/usr/share/icons/hicolor/scalable/apps/gdu-category-multipath.svg
    NOTE: Don't forget to put the correct path in the 'Exec' line. You can also change the Icon line with the path to the icon that you prefer.
  2. Go to the folder where you have zParts and create a file named .zparts_start.sh and paste the following script into it 
    !/bin/bash
    cd <path to your zparts folder>
    java -jar zParts.jar
    NOTE: Don't forget to put the correct path in the second line.
  3. Give the script permissions to be executed
    chmod +x .zparts_start.sh
    And that's it! Now when you open the Unity board and type zParts its shortcut will appear.
If you use M$ Window$ you can also try out Component Organizer, which is a similar free software developed by a portuguese guy (user msr @ the portuguese robotics forum Lusorobotica. You can check the entire thread about it here).



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

Hi! In this blog entry I'll show you how to setup a development environment to develop and compile code for Microchip's PIC microcontrollers. We'll need three main packages:
  1. gputils - a collection of tools for the Microchip (TM) PIC microcontrollers. It includes gpasm, gplink and gplib.
  2. sdcc - small device C compiler
  3. piklab - an integrated development environment (IDE) for applications based on Microchip PIC and dsPIC microcontrollers similar to the MPLAB environment. It integrates with several compiler and assembler toolchains. It supports the most common programmers (serial, parallel, ICD2, Pickit2, Picstart+), the ICD2 debugger, and several bootloaders (Tiny, Pickit2 and Picdem).

Today I had to merge multiple PDFs into a single PDF and had no clue on how to do it. It was fairly easy to find out how to do it and I decided to share it. First you have to install two programs
sudo apt-get install gs
sudo apt-get install pdftk
Then you just have two open a console and run the following command
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=resulting_file.pdf -dBATCH file1.pdf file2.pdf file3.pdf
And that's just it. You can change the final document's name from "resulting_file.pdf" to whatever you want and add as many files as you want to be merged into a single PDF.



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

How to use OpenCV with CMake and Codeblocks on Ubuntu

Continuing the previous posts on How to Install OpenCV 2.3.1 in Ubuntu 11.10 Oneiric Ocelot with Python support and How to use CMake ith OpenCV now I'll show you how to use both OpenCV and CMake with Codeblocks IDE. Codeblocks is an open source, cross platform, free, great C++ IDE built to meet the most demanding needs of users. It is very extensible and fully configurable. I have been using codeblocks for about 2 years and I never felt the need to change to another IDE. It supports debugging and code completion which are very useful features.

(Click the photo for better resolution in Picasa Photostream)
In Ubuntu 11.10 Oneiric Ocelot it is pretty easy to add a custom shortcut. Just clink the icon on the upper right of the screen, then System Settings > Keyboard > Shortcuts > Custom Shortcuts ( I'm not sure if this names are exact since my Ubuntu is in portuguese, but it should be something like this ). Then you just have to click the "+" to add a new shortcut, name it and write it's command. After that, apply and then define the keypresses that will call such command. As an example, I defined a shortcut named Banshee which calls the command "banshee" when I press Shift+F4.

Pretty easy, right? However, if you use desktop effects you won't be able to add a shortcut that runs a script the same way, since metacity is not your window manager. Compiz is.

How to use CMake with OpenCV

CMake is a cross platform, open-source build system. It consists in a family of tools designed to build, test and package software. It is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates makefiles that can be used in the compiler environment of your choice.

OpenCV is an open-source computer vision library which was already mentioned in this blog (see How to install OpenCV 2.3.1 in Ubuntu 11.10 Oneiric Ocelot with Python support).

This "how to" will guide you through the process of using CMake to compile and build OpenCV projects. It is based on the tutorial made by Damiles but has some minor changes.

OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision. It is written in C/C++ and is used worlwide in many computer vision applications.

This "how to" is a mix of two other great tutorials on OpenCV installations: A Compreehensive Guide to Installing and Configuring OpenCV 2.3.1 on Ubuntu from ozbots.org; and the OpenCV Installation Guide on Debian and Ubuntu from the OpenCV Wiki. I used this procedure to successfully install OpenCV on two amd64 computers (a laptop and a desktop) running Ubuntu 11.10 Oneiric Ocelot. However, if you find any problem you can check the Comprehensive OpenCV Installation Troubleshooting Guide from ozbots.

First Post

Hi there! This is the inauguration post of this blog. I hope you like the contents that I’ll post around here from now on. Most of them will be about robotics, electronics, computer science, hacks, etc. However, sometimes and not very often I may publish some stuff about other random topics. It is possible that sometimes I may also publish something in portuguese, if case of topics related to other portuguese students. Anyway, you can always use google translator to read them, or learn portuguese :P . Basically, this first post is all about “I hope you enjoy reading whatever I publish here”.

top