Fixing Digital Calipers

Hi there! In this post I'm going to show you how to fix a digital caliper in a very easy way. In fact, it's so easy that I had serious doubts about it until I tried and saw the results with my own eyes. :P

(Click the photo for better resolution in Picasa Photostream)

New Publication: Minimalistic Vision-based Cognitive SLAM

Hi! There is a new paper in the Publications section entitled "Minimalistic Vision-based Cognitive SLAM" which was presented today at ICAART 2012 - 4th Int. Conf. on Agents and Artificial Intelligence, in the Special Session on Intelligent Robotics. You can download it in the Publications section or just click here.

Below you can see the presentation that was used. Hope you like 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

Using Piklab with Tiny PIC Bootloader


Piklab already has programming interfaces for various programmers, including the Tiny Bootloader. To configure it you must go to "Settings > Configure Programmers... > Tiny Bootloader" and then set your serial port and it's specific settings. In my case, since I use a USB <->Serial TTL Cable (see my previous post on how to make a Low Cost (1,85€) USB to RS232 LVTTL Serial Cable), I configure it with the following data:
  • Port Selection: /dev/ttyUSB0
  • Specific > Port Speed: 19200
  • Specific > Timeout: 300
  • Specific > No of Retries: 5
Get the flash player here: http://www.adobe.com/flashplayer

After inserting all the correct configurations for your serial connection, Click "Apply" and you're ready to go. To program you just have to go to "Programmer > Program". Do not forget to click the Reset button of your development board to reset the PIC and initiate bootloader when you want to program it.

Easy, right? Yes, but it doesn't always work. :( I had it working when I used Ubuntu 11.04 Natty Narwhal and some version of Piklab that I can't remember now but since I upgraded to Oneiric Ocelot and a new version of Piklab, the Tiny Bootloader programming interface stopped working. However, there is another easy way to use Tiny Bootloader with Piklab.

CNC Controller Board

In this post I'll make a short description of the CNC controller boards that I'm making available for you to download and use to control your own CNC. I'm posting 3 version of the same board, but only the first one has been really tested and has been working inside my CNC Control Box for a long time now (see my previous post Homemade CNC:TheMaker1). I'm 99% sure that the other boards will work too because they only have minor changes. I'll explain them to you in a few moments.

All the boards are made in Kicad. The design of the boards is based on the CNC3AX designs, but it uses other components that I had available at the moment that I made the board for my CNC. I advise you that I just wanted to get my CNC running, so I didn't make any careful selection of the most appropriate components and I didn't make the math to calculate the best values for the resistors. I just made it with the components that I had laying around. The boards design can be split in three parts:
  1. Isolation - it has Vishay's 6N137 optocouplers to isolate the parallel port from the rest of the circuit;
  2. Drivers - the ST Microelectronics' L297 drive the motors in unipolar mode (if you prefer bipolar you can change the schematics and boards at your will);
  3. Power Interface - a bunch of Vishay's IRL510 N-channel FETs working as switches controlled by the L297 Drivers.

(Click the photo for better resolution in Picasa Photostream)

Hi! In the following lines I'll present a project that has taken a very long time to complete: my homemade CNC machine. From the first tests and tryouts with various materials to the actual machine 2 years have passed. More important stuff always made me delay the development of the CNC. However, I estimate that the total amount of time was 3 weeks. I think CNCs are a big challenge for anyone since it involves a lot of mechanical, electronics and computer engineering (although we can bypass the computer engineering part by using available software). It was a challenge for me, with lots of frustration along the way because of my lack of skill to make the parts with the few tools I had, but now I can happily say "Mission Accomplished!":D.

(Click the photo for better resolution in Picasa Photostream)

Hi! Some time ago I made a post about My Home Lab where I showed a small CNC that I built. In the same post I said that someday I would post some details on the software toolchain and that's exactly what I'm going to do in this post.

The process of using a CNC to make 3D parts follows three simple steps:
    1. Design the parts.
To design the parts I use HeeksCAD. HeeksCAD is a free, open source, CAD application written by Dan Heeks.

(Click the photo for better resolution in Picasa Photostream)

A wild Android phone appears... Huawei Ideos X3

So, last week I was in the lab doing some computer vision programming when my PhD supervisor came in and dropped a Huawei U8510 Ideos X3/Blaze in my table. "I found this on the way. It was on the road being run over by cars. I think you can get some parts from this", he said. At the first moment I thought that yes, I could get some stuff from it, but they would be fairly hard to interface. It had no battery, no back cover, and some scratches in the screen. However, I decided to plug it to the mini USB cable and see if it still worked. Voilá! Ideos logo showing up on the screen and Android booting up!

(Click the photo for better resolution in Picasa Photostream)
It turned on but then the android pattern lock showed up, leaving me locked out. I started searching for a way of bypassing the lock, but no luck. Had to go for a hard reset. Some more searching in Google and finally I found how to root it. When turning the phone on, pressing the power and volume up for a few seconds would bring the boot menu and then it was just a matter of choosing the factory reset option. After a few more seconds I was messing around with the clean Android 2.3.3.

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.

top