Tuesday, March 30, 2010

Pinguino and LCD Module (4 bit data bus version)

OK, here we have a 4 bit version of LCD Module driver.

It is roughly based on LCD example from Pinguino Wiki.

The source code can be found on pastebin.

And here is the photo:

Sunday, March 21, 2010

Drilling Software Progress Report

Last night I made some significant progress in PCB Drilling Software.

I added tracking of holes drilled, progress bar and ETA estimation.

Everything is coded in TCL/TK. The icon set used (modified) is from KDE's Oxygen Theme.

Of course, the screenshot:



The drillfile displayed is for the board with 6 Pinguino 4550 Light boards.


bb4now,
PMC

Friday, March 19, 2010

PCB Dilling Machine Progress

Yesterday we made some progress with PCB Drilling Machine.

The CNC Machine is currently driven by Atmel 90C2051, but my plan is to switch it completely to Pinguino.

But, for now, I can show you how the machine drills in the test set-up. Software is done (not production ready). Calibration of the motors and the drill is done.

One more thing to do is to speed up the drill pull-out. Now the speed of the drill in the 'down' phase is the same as in the 'up' phase.

More on that during the weekend when I hope to show you first Pinguino PIC18F4550 based PCBs drilled by Pinguino itsefl!

For now, some obligatory YouTube videos of the machine in action (OK, more-or-less action):

CNC PCB Drilling Machine - Overview



CNC PCB Drilling Machine - Zoom Detail 2



bb4now,
PMC

Thursday, March 18, 2010

Pinguino as Voltmeter V2

Yesterday I improved the Pinguino as Voltmeter Python UI.

The scale has numbers, the needle is read and there are some other small UI improvements. But the most significant change is that the widget is not repainted every 20 milliseconds. Now it is repainted only when needle moves. The Class still stays under 50 lines of code.

There has been no changes to Pinguino Class.

The new version can be found on pastebin.

And here is the screenshot:


bb4now,
PMC

Tuesday, March 16, 2010

Pinguino as Voltmeter (Multimeter)

Well, today I managed to put up a little python script which uses Pinguino as Voltmeter.

The script can be found on pastebin. It is quite short, but it implements two classes: Analog Multimeter for the nice Voltmeter gauge pictured below, and Piguino which abstracts Pinguinos USB interface.

The driving Pinguino script is on pastebin too.

So, what you need is Linux with installed python, PyKDE4, PyQt4 and PyUSB. In order to install PyUSB you will ned libusb too.

Just upload the Pinguino script to Pinuguino and run the python script and you should get something like this:


Oh, and you should bring some current to PIN 13 (first analog input) on Pinguino. You can try to put a trimmer resistor in front of the PIN 13 on the breadboard an play with it to see gauge moving!

That's all folks!

bb4now,
PMC

Saturday, March 13, 2010

Pinguino and perl

You can use perl to communicate with Pinguino via USB.

To do it you have to install libusb library and Device::USB module for perl.

After that you can upload this program to Pinguino:

testusb.pde:


// USB Test
// Marin Purgar marin.purgar@gmail.com
// Use with led_on.pl and led_off.pl companion programs

uchar cmd;

void setup(void) {
  pinMode(0, OUTPUT);
  digitalWrite(0, HIGH);
}

void loop(void) {
  if (USB.available()) {
    cmd = USB.read();
  }
  if (cmd == 'N') {
    digitalWrite(0, HIGH);
  }
  if (cmd == 'F') {
    digitalWrite(0, LOW);
  }
}

// EOF


And you can create two perl programs to turn the LED on (sending the character 'N' to Pinguino) and off (sending the character 'F' to Pinguino):

led_on.pl:


#!/usr/bin/perl -w

use strict;
use warnings;

use Device::USB;

my $usb = Device::USB->new() || die "Unable to initialize libusb!";
$usb->debug_mode(2);
my $dev = $usb->find_device(0x04d8, 0xfeaa) || die "Unable to find USB device!";
$dev->open() || die "Unable to open USB device!";
$dev->set_configuration(3);
$dev->claim_interface(0);
$dev->bulk_write(0x01, "N", 100);

# EOF

led_off.pl:


#!/usr/bin/perl -w

use strict;
use warnings;

use Device::USB;

my $usb = Device::USB->new() || die "Unable to initialize libusb!";
$usb->debug_mode(2);
my $dev = $usb->find_device(0x04d8, 0xfeaa) || die "Unable to find USB device!";
$dev->open() || die "Unable to open USB device!";
$dev->set_configuration(3);
$dev->claim_interface(0);
$dev->bulk_write(0x01, "F", 100);

# EOF

By running led_on.pl or led_off.pl you can turn the LED on/off via USB using perl.

Next, I am going to put some sensors (TCRT5000) on my protoboard and try to get sensor status from it via USB and perl.

Stay tuned ...

Pinguino!

Last two weeks I have been playing with Pinguino. Pinguino is PIC (from Microchip, the company) based Arduino-like experimental board. It supports USB Communication and Power-over-USB, so it's very handy for experiments with PIC technology. The basic PCB is very simple and easy to make.

You can find more about the project at Hacklab News Blog.

And now for some photos of the boards we made.

The "PinguinoTeam Croatia" proudly presents: