tag:blogger.com,1999:blog-16207741442364326642024-02-08T15:18:03.666-05:00Where did the magic smoke go?A journal of my various hobby projects.Andyhttp://www.blogger.com/profile/04050678530388304934noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1620774144236432664.post-8959404465545567192010-02-01T17:46:00.000-05:002010-02-01T17:46:56.755-05:00First project of the year - I2C Controllable RGB LED NodesI actually started this project during the last week of 2009, and is one of the primary reasons I resumed blogging. Go figure, I haven't actually gotten around to posting it until now!<br />
<br />
While I primarily focused on RF engineering in school, I have always had an interest in lighting, especially solid state lighting (LEDs). I have also always been in awe of those computer controlled animated Christmas light displays like that of Carson Williams back in 2005 or so.<br />
<br />
More after the break... <br />
<br />
<a name='more'></a><br />
<br />
<br />
I occasionally follow the development at <a href="http://www.doityourselfchristmas.com/">Do It Yourself Christmas</a> and have considered participating in development myself.<br />
<br />
At the end of this year, I saw user mrpackethead's YouTube clip of his "Mega Tree" using 2000 individually addressable RGB nodes at <a href="http://http//www.youtube.com/watch?v=GAt6A98lXQw"></a>. It is amazing, however, the nodes MPH is using are based on a controller chipset that is not available outside of Asia. As a result, I decided to start work on developing similar nodes using parts readily available in the USA. Eventually, I settled on the Atmel ATTiny25/45/85 AVR microcontroller due to previous AVR experience, and I2C for minimal pin count/pin use on the AVR. (Daisy-chain SPI was not achievable with an 8-pin AVR without sacrificing in-circuit serial programming.)<br />
<br />
I prototyped my first node during Christmas break, and posted the results to DIYC in <a href="http://http//doityourselfchristmas.com/forums/showthread.php?t=10157">this thread</a>.<br />
<br />
At this point I have the following implemented:<br />
24 bits/node (8 bits/color) control<br />
Gamma curve applied to the input RGB, with internal 12-bit sigma-delta modulator for each color channel<br />
Storage of I2C address in AVR EEPROM<br />
A preliminary board design for the nodes I intend to send to Olimex next week<br />
<br />
Source code for the project is located at <a href="http://github.com/Entropy512/I2C_RGB">my GitHub repository for this project</a>.<br />
<br />
Also, a video of a somewhat older version of my nodes is on YouTube at <a href="http://http//www.youtube.com/watch?v=bg5ph8kWKJA">I2C-Addressable RGB LEDs - Breadboard Prototype</a><br />
<br />
By the way, this project was the main driving reason for me purchasing the Rigol oscilloscope I discussed in previous posts. I also plan on posting more of my experiences with the Rigol and Linux soon.Andyhttp://www.blogger.com/profile/04050678530388304934noreply@blogger.com0tag:blogger.com,1999:blog-1620774144236432664.post-66572520115515296422010-01-07T18:40:00.001-05:002010-01-07T18:40:33.743-05:00Rigol DS1052E Oscilloscope and Linux - Part 2Well, after further investigation, I'm a dumbass.<br />
<br />
The Python library I linked to in my previous post predates the usbtmc kernel module - it's libusb based!<br />
<br />
So after "modprobe -r usbtmc" and running an example which sends *IDN? to the device, I get:<br />
<br />
<code><br />
adodd@quadmonkey:~/Documents/ds1052e$ sudo ./usbtmc.py<br />
[sudo] password for adodd:<br />
Rigol Technologies,DS1052E,DS1ED113506705,00.02.02.02.00<br />
adodd@quadmonkey:~/Documents/ds1052e$<br />
</code><br />
<br />
IT WORKS! However, I'd like to try and find some documentation on the kernel module based approach, since it's likely more up to date.Andyhttp://www.blogger.com/profile/04050678530388304934noreply@blogger.com0tag:blogger.com,1999:blog-1620774144236432664.post-42509786879257655452010-01-07T18:27:00.001-05:002010-01-07T18:41:36.728-05:00Rigol DS1052E Oscilloscope and Linux - Part 1I just received a new piece of test equipment today, a Rigol DS1052E oscilloscope from <a href="http://www.saelig.com/PSBEB100/PSPC016.htm">Saelig</a>. After powering it on and connecting one probe, I decided to see if I could interface with it in Linux. I've done some interfacing with test equipment in Linux before using USB-to-GPIB interfaces, but this instrument has serial and raw USB.<br />
<br />
Trusty Google has yet to provide me any information about this combination, so I decided to start by plugging the scope into my Ubuntu machine. dmesg output and more after the break.<br />
<br />
<a name='more'></a><br />
<br />
<code><br />
[65794.781221] usb 2-6.3: new full speed USB device using ohci_hcd and address 6<br />
[65794.909328] usb 2-6.3: configuration #1 chosen from 1 choice<br />
[65794.984233] usbtmc 2-6.3:1.0: can't read capabilities<br />
[65794.984312] usbcore: registered new interface driver usbtmc</code><br />
<br />
That error doesn't look promising, however it may be benign. Here's the lsusb output:<br />
<code><br />
Bus 002 Device 006: ID 1ab1:0588 <br />
Device Descriptor:<br />
bLength 18<br />
bDescriptorType 1<br />
bcdUSB 1.10<br />
bDeviceClass 0 (Defined at Interface level)<br />
bDeviceSubClass 0 <br />
bDeviceProtocol 0 <br />
bMaxPacketSize0 64<br />
idVendor 0x1ab1 <br />
idProduct 0x0588 <br />
bcdDevice 1.00<br />
iManufacturer 1 Rigol Technologies<br />
iProduct 2 DS1000 SERIES <br />
iSerial 3 DS1K00005888<br />
bNumConfigurations 1<br />
Configuration Descriptor:<br />
bLength 9<br />
bDescriptorType 2<br />
wTotalLength 39<br />
bNumInterfaces 1<br />
bConfigurationValue 1<br />
iConfiguration 0 <br />
bmAttributes 0xc0<br />
Self Powered<br />
MaxPower 2mA<br />
Interface Descriptor:<br />
bLength 9<br />
bDescriptorType 4<br />
bInterfaceNumber 0<br />
bAlternateSetting 0<br />
bNumEndpoints 3<br />
bInterfaceClass 254 Application Specific Interface<br />
bInterfaceSubClass 3 Test and Measurement<br />
bInterfaceProtocol 1 TMC<br />
iInterface 0 <br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x01 EP 1 OUT<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0040 1x 64 bytes<br />
bInterval 0<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x82 EP 2 IN<br />
bmAttributes 2<br />
Transfer Type Bulk<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0040 1x 64 bytes<br />
bInterval 0<br />
Endpoint Descriptor:<br />
bLength 7<br />
bDescriptorType 5<br />
bEndpointAddress 0x83 EP 3 IN<br />
bmAttributes 3<br />
Transfer Type Interrupt<br />
Synch Type None<br />
Usage Type Data<br />
wMaxPacketSize 0x0008 1x 8 bytes<br />
bInterval 1<br />
Device Status: 0x0001<br />
Self Powered<br />
</code><br />
<br />
There is very little information about this usbtmc driver available. There's a python library available from <a href="http://svn.openmoko.org/developers/werner/ahrt/host/tmc/README">OpenMoko SVN</a>.<br />
<br />
I tried installing that, however it only gives an error when I try one of the examples. It may be related to that "can't get capabilities" error.<br />
<br />
There is apparently an Agilent usbtmc driver in addition to the mainline Linux kernel one, I will try that later, as I need to go run errands now. Stay tuned!Andyhttp://www.blogger.com/profile/04050678530388304934noreply@blogger.com0tag:blogger.com,1999:blog-1620774144236432664.post-71237175739473343672010-01-05T21:22:00.000-05:002010-01-05T21:27:58.974-05:00A new beginningOnce upon a time, a long time ago, I had a Livejournal account. I have not posted to that account, and while it still exists, it represented a very different phase of my life.<br /><br />For that reason, I've moved to Blogspot and started fresh. Compared to my previous effort in blogging, this will have somewhat of a different focus. Rather than focus on personal issues, I plan on focusing more on various hobby projects.<br /><br />More to come in the next few days... Over the holiday vacation I started a project that I need to start documenting, and I expect the oscilloscope arriving Thursday should lead to a few other small efforts.Andyhttp://www.blogger.com/profile/04050678530388304934noreply@blogger.com0