I'm putting my newly learned Arduino knowledge to practical use. Since I don't really know any electronics, I went to a local electronics supplier called ETT to see what pre-made boards they have. While looking around, I discovered that they make a custom Arduino board with a mouthful name called ET-EASY MEGA1280 Duino Mega that easily connects to their boards using a simple 10-pin connector.
This is the Duino Mega connected to a 5V relay board. The 5V board can be powered directly from the Duino Mega board which is powered from USB. Also connected is a Sharp GP2Y0D21YK infrared sensor. The sensor is a digital sensor with a 24 cm range.
Here's another relay board also produced by ETT. This is a 12V relay board that needs to be externally powered. Actually I got the 12V board first, but then I saw the 5V board that can be powered from the Arduino. But after getting the 5V board I was afraid that it might draw too much power. But both seem to work perfectly fine.
I wrote a little sketch that controls the relays using commands transferred over USB serial as well as reads the status of the infrared sensor. My first Arduino project is a motorized computer scale system. One relay is used to control the motors of the conveyor belt and the second relay is used to toggle a warning siren. The infrared sensor (which will be replaced by a laser sensor in production) is used to sense when to stop the conveyor belt in order to weigh the product.
Of course, the system has a load cell and a weight indicator that also has to be connected to work. The load cell is connected to the indicator through a special load cell connector, and the indicator is connected to the computer using a simple USB serial port converter.
March 18, 2011
March 14, 2011
March 10, 2011
Linksys WRT160NL and DD-WRT
A few years ago, I wrote about the Linksys WRT310N and DD-WRT. I no longer have that router since a friend decided to borrow it permanently, and I ended up selling it to him.
When my ASUS WL500gP died last year, I tried to buy another unit only to find it wasn't available locally any more. So I went looking for an alternative, and the Linksys WRT160NL was what I found. I've had one for a few months already, and recently I bought a few more as it's quickly turning into my favorite router.
WRT160NL has a 400 MHz CPU, 32 MB RAM, and 8 MB Flash. The It has a USB port ("Storage Link") for attaching USB storage devices. However, with DD-WRT, it can also be using for USB printing. The box has a penguin logo and it's just inviting me to put a third-party firmware on it.
I'm running the most recent DD-WRT (16214 as of this writing) on it. With this version, I can enable USB Printer Support from the web interface and it automatically works with my inkjet printer. With earlier versions I had to manually install p910nd to get printing to work. DD-WRT doesn't have a detailed changelog so I don't know when this happened, but I'm glad it works "out-of-the-box" now.
The DD-WRT router database currently shows version 14896 for download. This version seems to have wireless problems since I seem to lose wireless connectivity after a while. 16214 also seems to have fixed that problem.
While trying to figure out the wireless issues, I also followed the recommendations in this thread and set my TX Antenna to 1+2+3 and RX Antenna to 1+3 and Antenna Gain to 2, which seems to greatly increase my wireless stability and connectivity.
Oh, while I was playing with upgrading the different firmwares, the WRT160NL locked up completely. It would no longer finish booting and the power light just flashes. However, upon closer inspection, I discovered that the router wasn't actually "bricked", and I managed to recover it simply by using tftp to upload the linksys-to-ddwrt-firmware.bin to it. After it rebooted, then upload the actual wrt160nl-firmware.bin to it using the web interface.
Just to be sure that it wasn't pure luck that I recovered the router, I purposely crashed the router several more times, and each time I managed to recover it by using tftp.
The WRT160NL also works with Gargoyle, which I'll talk about next time.
When my ASUS WL500gP died last year, I tried to buy another unit only to find it wasn't available locally any more. So I went looking for an alternative, and the Linksys WRT160NL was what I found. I've had one for a few months already, and recently I bought a few more as it's quickly turning into my favorite router.
WRT160NL has a 400 MHz CPU, 32 MB RAM, and 8 MB Flash. The It has a USB port ("Storage Link") for attaching USB storage devices. However, with DD-WRT, it can also be using for USB printing. The box has a penguin logo and it's just inviting me to put a third-party firmware on it.
I'm running the most recent DD-WRT (16214 as of this writing) on it. With this version, I can enable USB Printer Support from the web interface and it automatically works with my inkjet printer. With earlier versions I had to manually install p910nd to get printing to work. DD-WRT doesn't have a detailed changelog so I don't know when this happened, but I'm glad it works "out-of-the-box" now.
The DD-WRT router database currently shows version 14896 for download. This version seems to have wireless problems since I seem to lose wireless connectivity after a while. 16214 also seems to have fixed that problem.
While trying to figure out the wireless issues, I also followed the recommendations in this thread and set my TX Antenna to 1+2+3 and RX Antenna to 1+3 and Antenna Gain to 2, which seems to greatly increase my wireless stability and connectivity.
Oh, while I was playing with upgrading the different firmwares, the WRT160NL locked up completely. It would no longer finish booting and the power light just flashes. However, upon closer inspection, I discovered that the router wasn't actually "bricked", and I managed to recover it simply by using tftp to upload the linksys-to-ddwrt-firmware.bin to it. After it rebooted, then upload the actual wrt160nl-firmware.bin to it using the web interface.
Just to be sure that it wasn't pure luck that I recovered the router, I purposely crashed the router several more times, and each time I managed to recover it by using tftp.
The WRT160NL also works with Gargoyle, which I'll talk about next time.
March 3, 2011
Giant iPod touch
iPad 2 was released earlier today and it looks almost exactly like the leaked photos. I was one of the few people that thought the leaked iPad 2 photos were real, since it follows closely Apple's recent design paradigm: no more round backs. The iPad 2 looks almost exactly like the fourth generation iPod touch, which I really like.
But what I like most about the iPad 2 is that it's much lighter! I've had the iPad 3G for a few months and I no longer really notice the weight, but whenever I pick up iPads without 3G I notice how much lighter they are. The iPad 2 with or without 3G are both lighter than the original iPad. But I probably won't upgrade unless I can get one for free. Besides, my iPad is jailbroken.
February 25, 2011
Bye OS X
It might be funny to pick the day of the Intel Core 2011 Macbook Pro introduction to post this, but after two years of mostly enjoying OS X, and learning to program Objective-C, I'm going back to Windows. To be precise, I'm moving on to Windows 7, and not going back to Windows XP.
Oh, I love OS X and its Unixness, but there are just so many things that prevent me from being a happy and productive user. One of my biggest gripes is that I can't print to any of my networked printers except an older LaserJet that has a JetDirect card. But even with that printer, I have to manually select Tray 2 every single time, eventhough it's already set to Tray 2 by default both in Settings and in CUPS, but it doesn't work. Still, once in a while it would completely refuse to print, and I would just twiddle my thumbs until it would suddenly work again after a random number of hours, sometimes after days.
My MacBook is the early 2009 model upgraded with 4 GB of RAM and a 320 GB 7200 RPM hard drive, but it's just so unbearably slow. I try to avoid websites with Flash, since that just slows it down even more. I'm back to using an older ThinkPad X61 (the one I used to test all the Linux distributions). The X61 is 3.5 years old and only has 2 GB of RAM, but it's running circles around the MacBook. Oh, and the X61 is running Windows 7 Professional 64-bit, while the MacBook is running OS X 10.6.6.
I'm also back to using Firefox. Firefox was unusably slow on the Mac, so I changed to Safari like a good OS X user should, until I ran into problems with non-English filenames, then I switched Chrome. Chrome is really really nice, but it doesn't support automatic downloading using a download manager, and again, Flash is unusably slow. Flash is really fast on Safari, and Safari works with download managers, so I ended up having two web browsers open all the time.
I really miss iCal though.
February 24, 2011
Windows Server 2008 R2 SP1
Service Pack 1 for both Windows Server 2008 R2 and Windows 7 was out for Volume Licensing customers since last week, and was released into the wild earlier yesterday. I didn't have time earlier to download it from the Volume Licensing site, but I decided to take some time to download my updates today.For some stupid reason the downloads keep getting stuck at exactly the same place every single time. For example, the Windows 7 Professional X64 English ISO, which is 3,181,668,352 bytes, always gets stuck at exactly 2,682,257,408 bytes, even if I use a download manager, even if I use Microsoft's own Java-based download manager, even if I use IE instead of Firefox. I tried downloading around the erroneous byte by using Flashget, but even when the file is 100% loaded, that single problem byte is still stuck and attempting to load it just gives me a server error. After trying numerous times, I looked at my firewall logs and noticed I've already downloaded over 100 gigabytes today, without getting anywhere.
Luckily, I still have The Pirate Bay at my disposal. So even though I'm a Volume Licensing customer for both Windows 7 and Windows Server 2008 R2, along with a whole bunch of other Microsoft products, I ended up having to download ISO's from The Pirate Bay. Arrrrrrrrrrr!
Update: after a few weeks, I went back to the Microsoft download site and still couldn't download the problem files. I found a place for leaving comments and left a comment, and a few days later, I could successfully download the files. I don't know if the problem was with Microsoft or with the local Akamai mirror on my ISP, but it's hard to imagine I was the only person with problems...
Subscribe to:
Posts (Atom)



