T-Slot Boxmaker

t-slot-box

Laser cut boxes are pretty cool.  They can be tricky to design however.  “Maker” has taken a lot of the guesswork out of making boxes with a cool Inkscape extenstion.  Its written in Python, so Anool challenged me to add t-slots so that the resulting boxes can be held together with screws instead of glue.

It took me a while to wrap my head around the whole extension business.  It is not pretty, but I finally managed to cobble together the necessary parts to get this working.

USE IT:

  1. download code and unzip it into your Inkscape extensions directory.  On my Ubuntu laptop that is /usr/share/inkscape/extensions/.
  2. Start or Restart Inkscape.
  3. Select T-Slot Box Maker from the Extensions->Laser Tools menuScreenshot from 2013-03-27 19:35:30
  4. Insert your box measurements and screw measurements (so far only tested with 16mm M3 screws.Screenshot from 2013-03-27 19:38:27
  5. Click “apply”
  6. Remove unwanted or conflicting t-slots with the associated holeScreenshot from 2013-03-27 19:42:30
  7. Done!  Good luck!Screenshot from 2013-03-27 19:43:57

The intelligent Matrix and RowGB

Anool, Kevin, and I have been working on a cool new project based on 5050-2811 RGB pixels.  We just got the first boards back and they are amazing.

  • RowGB has 16 individualally addressable 24-bit RGB LEDs and can be chained together either horizontally or vertically to make a 2D array.
  • TiM (the intellegent matrix) is an array of 8×16 individually addressable pixels of the same ilk as RowGB.  It is essentially 8 pre-stacked RowGBs but with a very flexible control circuit that allows you to control the whole array with a single pin or up to 10 boards (1280 pixels) chained together using 8 input pins.

Now that the tests are complete, we are ready to go into production.  Please send us an email at info@wyolum.com you’d like to be updated on availability.

 

Re-Paper Experiments

I was lucky enough to get a preview of repaper.org‘s new Electronic Paper Display (also available here) with a breakout board.  It is pretty cool that e-paper has finally made its way to makers with a few other products coming out too, like the E-ink shield from Seeed Studio.

In case you don’t know, e-ink technology is enables a low-power display that can maintain its image without power indefinitely.  My Dad described it well as “like an electronic etch-a-sketch?”  If your project needs a fast refresh rate, e-ink will not do what you want.  The setup below refreshes once every couple of seconds.

The hardware is specifically designed for the TI 430 Launchpad project board, but it turned out to be easy enough wire it up to our own AlaMode with the pin assignment table provided.  It even worked the first try (a rare event for me).

The open source software works with Launchpad and Arduino.  It is in its early stages so programming is a bit of a challenge at this point.  The example code includes a demo for displaying images from EEPROM (external chip) or PROGMEM (limted space).  But I think SD really seems like the way to go here and AlaMode already has an SD slot on board so I wanted to see if I could get them working together.  It turned out to be more of a challenge than I was expecting (story of my life).

Displaying on an E-ink requires four steps: two to erase the old image and two two draw the new image. The extra steps are designed to avoid and eliminate image ghosting. A ghost image is the remnants of an old image after a new image is displayed.  This might be made easier in the future with a nice library that hides all of the details.  In the mean time, I just wanted to get the details out there.

I started poking around the header file EPD.h and found a generic reader template which turned out to be the key.  The comment is my own.

/*
* A generic reader template
*
* buffer — write buffer for outgoing bytes
* address — byte index, 0 to display height
* length — number of bytes to read
*/
typedef void EPD_reader(void *buffer, uint32_t address, uint16_t length);

I wrote a function new_SD_reader() which complied with the EPD_reader template.

/*
 * SD card reader Comply with EPD_reader template
 *
 * buffer -- write buffer for outgoing bytes
 * address -- byte index, 0 to display height
 * length -- number of bytes to read
 */
void new_SD_reader(void *buffer, uint32_t address, uint16_t length){
  byte *my_buffer = (byte *)buffer;
  for(int i=0; i < length; i++){
    newFile.seek(address + i + 4);
    *(my_buffer + i) = newFile.read();
  }
}

The variable newFile is a File object opened elsewhere.  What would be handy here is an extra argument in the EPD_reader template to specify a filename.  Maybe in the next release.  As it is, I just made two similar functions for reading the new and old images.

Now can swap newFile and oldFile around in loop to change the image.

File newFile, oldFile;
char *datfilenames[2] = {"IMAGES/VENUS2.dat", "IMAGES/CAT2.dat"};
void next_image(char* fn){
  oldFile.close();
  oldFile = newFile;
  newFile = SD.open(fn);
  if(!newFile){
    Serial.println("new image not found");
    while(1){
      delay(1000);
    }
  }
}

// main loop
unsigned long int loop_count = 0;
void loop(){
...
	case 6:        // swap old image for new image
	  EPD.frame_cb_repeat(0, old_SD_reader, EPD_compensate);
	  EPD.frame_cb_repeat(0, old_SD_reader, EPD_white);
	  EPD.frame_cb_repeat(0, new_SD_reader, EPD_inverse);
	  EPD.frame_cb_repeat(0, new_SD_reader, EPD_normal);
	  // swap files
	  next_image(datfilenames[loop_count++ % 2]);
		state = 6;  // backe to picture nex time
		break;
...

The complete code can be found here.  Before you can run it, you will need to covert the xbm format to a simple byte format.  I’ve written this quick and dirty python code to do the trick.