Wednesday, June 20, 2012

Experiments with Tiny LCD projection

Mobile phone LCD
LED Focus Light with Driver
Cardboard Lens Housing
  • Since a long time wanted to build a small projector like the ones on instructables.com. It seemed tougher than it actually is.
  • Basically the idea is to rip apart the reflector and the LED/tube portions of an LCD and just use the glass. The glass without the backlight works as a slide, in front of which there is a lens for magnification and a powerful light for illuminating the slide.
  • LCD: After multiple trials, breaking different LCDs, found an old mobile a Videocon  V1293 which has a resolution of 128x128 in 1.44 inches and comes with a 3GP player. Managed to remove the casing without damaging the glass. As seen in the LCD pic, the white plastic casing is the rear part of the LCD housing and a portion of the reflector can still be seen.
  • Lens
    • Tried various lens from local shops, but reasonable quality lens are available from scientific equipment shops. Vasa Scientific in Malleshwaram has some choices. Got a 75mm dia 25cm FL, 50mm 10cm FL & 50mm 5 cm FL lens. Current projector uses the 50mm/10cm FL.  Cost under 100 INR.
    • A fresnel lens is necessary to collimate the rays from the light source. It makes sure a point light source becomes wider and uniform. They are available at stationery shops. But one has to ask for page magnifiers that look like a scale, else the usual answer is a shake of the head. Depending on the size, for a 10 inch by 3 inch,  the cost is around 45 INR. This lens has not been used cos the LEDs came with focus lenses.
  • Light Source:
    • Metal Hallide bulbs are usually used for projector and they get hot.
    • The idea here was to use LEDs. Illumination did not have to be great so as to be visible in day time. Vision in a dark setup was ok. 
    • Got 3W high power LEDs from Om Electronics in SP Road along with an LED driver. One has to be careful here as they get very hot and the heat has to be dissipated. The 3W LEDs are from ProLight and roughly around 200 lumens/LED.
    • Many ways of heat dissipation were considered:
      • TO get a computer processor heat sink, apply thermal compound and paste these LEDs and then drill them down to the heat sink. This was all too much work and there were no tools to do the same.
      • Luckily got a LED focus light with 3x1W LEDs and a driver and the enclosure at a local light shop for 200INR. Initial trials were done with 3x1W illumination and then finally desoldered these LEDs and changed them to 3x3W LEDs with the other LED driver. The enclosure comes with its own lenses that narrow down the light. After desoldering had to apply thermal compound to make the new LEDs connect to the LED heat base. Even though the area for dissipitating heat is smaller the heat sink gets slightly hot. Plan is to add a computer fan to cool it further.
  • Assembly
    • Cardboard was used to make the projector assembly. Could try with plastic, etc at a later point in time.
  • Content conversion
    • Used ffmpeg to convert movies to 3GP format to play on the mobile. The 3GP player looses audio sync very often. A few samples from the Super cartoon series and Family guy are shown. 
  • Magnification
    • The image was roughly 1.5 feet for a distance of about 7 feet.

Saturday, June 16, 2012

Simple Low Cost Quick Medical Prescription System

  • There was a need to simplify and quicken the process of prescribing medicines for a not-so computer-aware medical practitioner.
  • Many alternatives were considered: low-cost android tablets, laptops, etc.
  • A small x86 device like a Thinclient was sufficient to do the job. Luckily found a guy selling thinclients on Olx here in India. Got a HP t5135, this can be mounted behind the monitor.
  • A Doctor can enter the name of the patient, age, weight and choose to add drugs, dosages & diagnoses. There was no requirement to store the patient records for follow up.
  • All operation of this System is done by means of the Numeric keypad and the Function keys. The Function keys are color coded further to enable easy identification and choice of keys.
  • It allows a doctor to add or delete drugs, dosages and diagnosis.
  • It interfaces to a dot matrix printer and can print the prescription.
  • This allows fast prescription, similar in principle to the vast quick bill printing  device used by the pay & eat hotels here.
  • The price is used 100$ with a 17" monitor and a thinclient.
  • The UI is also color coded to ease identification with key. 
  • Crux 2.7 distrib Crux was customized to boot the Thinclient which has 100MB RAM and boots off USB. Crux is a very fast Linux distribution and easily customisable.
    • Extlinux was used to boot the USB stick. It uses a extlinux.conf file. Created thus:
      • default /boot/kernl initrd="some initrd" vga=0x317 quiet
      • display splash.txt
    • The VGA mode is used to enable frame-buffer so that a splash image can be used at boot. The way to create a config file for extlinux
      • Octal value ie 030 followed by name of file
      • Create by using echo -e "\030imagefile" > splash.txt 
      • The image file has to be of the type lss16
    • How to create the splash image
      • With gimp, create a 640x480 pixel file with indexed colors of upto 256 colors.
      • Save this as a ppm file.
      • use ppmtolss16 < orig.ppm > orig.lss16 to create the lss16 image file.
      • Include this name as the file for extlinux to search for in splash.txt
    • Install extlinux to the usb disk by extlinux -i /mount_point_of_usb
    • No modules were used to boot the Linux kernel. All functionality was built statically into the kernel.
    • Unnecessary services like the network, crond were disabled.
    • The machine boots in roughly 15 secs.

HP T5135 ThinClient Standard Image Upgrade

  • HP T5135 is a thinclient (TC) which can run remote desktop environments that follow the ICA (Citrix) or RDP protocol.
  • It is a 100 MB RAM, 64MB flash x86 architecture computer running a VIA processor at 400 MHz. Has 8 USB 2.0 slots (2 housed inside the casing for security) and comes with a VGA port supporting 1600x1200 resolution, a serial port, parallel port, 10/100Mbps LAN, PS2 mouse and keyboard and a 12V connector in a very small form factor.
  • Found a local agent who was selling them for affordable prices.
  • It came with a standard registered ICA client and the need was to use this TC in a more generic way.
  • Found a generic HP image at the HP site: Thinconnect image download
  • On extracting this image, this tries to run a flash upgrade utility in the FreeDOS environment via USB. 
  • For some reason, FreeDOS that was installed by the HP tool was not able to come up. A 4GB pendrive was being used.
These steps are for an alternative FreeDOS version:
  •  Downloaded the image from this site: Bootdisk
  • Follow the instructions:
    • Basically a single active partition needs to reside on the USB stick.
    • Format the usb stick, eject and re-insert.
    • Extract the bootdisk tarball and use the command window and do the following:
    • xcopy usb-root\* Name_of_your_usb_drive:\ /E/H/I
    • syslinux\syslinux.exe -fma Name_of_your_usb_drive:
    • Copy the Flash.dd & the ibr from the Deployment filefolder into the USB drive.
    • Insert the USB drive into the TC and reboot.
    • Once Freedos starts type in this: ibr flash.dd hd1
      • This will install the firmware.

The following steps are for flashing the firmware in Linux :
  • Used a Debian USB boot disk that was created using unetbootin and booted into Linux on the TC.
  • Without installing the OS, 64MB flash image is where the ThinConnect HP image is loaded. Used the dd command to back up the 64MB flash in case the other upgrade was not successful. Linux identified this flash partition as the /dev/sda partition. So one can back up the image by dd if=/dev/sda of=64Mb-part.img 
  • On the extracted files on the USB disk was this file FLASH.DD. Turns out that this is the dd image that has to be written to the flash
  • Flashed this file to the TC flash by doing this dd if=Flash.dd of=/dev/sda
  • Rebooted the TC and it showed the default image with both ICA & RDP support.
  • Enabled RDP on a winxp machine and was able to view the remote xp desktop on the  TC.