New laser cut box designs

I’ve been working on some laser cut box designs for holding cards. I’ve been using the boxmaker over here. It works OK with Inkscape. Here are some tips for working with the PDFs the boxmaker exports.

  1. Save the PDF to your hard drive.
  2. Import the PDF from the file menu.
  3. The import will look like it only has text, but that’s only because the lines have no stroke color. With the PDF selected, set the stroke color. I use black.
  4. Hit CTRL-SHIFT-G to ungroup everything.
  5. The text will now be it’s own object and can be deleted.
  6. Every single line will also be it’s own object. That’s not as good. Select every line in one face and use CTRL-K to combine them into a single path.
  7. Repeat with all the faces.
Posted in Etsy, Laser | 1 Comment

A gearbug #1 design I am finally happy with.

I’ve uploaded gearbug #1 to http://www.thingiverse.com/thing:31426. It was the first gearbug design I cut on the laser. It morphed into some simpler designs that I considered “finished” before I got the original working exactly how I wanted.

The artwork is Pacific Northwest themed. Don’t worry, the plant is a rhododendron. The text is only visible if you turn the gears and reveal it a little at a time. I’m really happy with how this design came out.

I also uploaded a toy car design to thingiverse yesterday. My nephew loves cars and I am working on a birthday gift for him.

I’m still looking for someone with a more powerful laser to outsource some cutting to. Ponoko is way too expensive. So far no one I have contacted has gotten back to me or is very interested in cutting 50-100 of my designs.

Posted in Laser | Leave a comment

ExtraCore Quad-copter

AI Matt just ordered an ExtraCore from tIndie.com and tells me he is going to use it a quad-copter. Seriously cool.

Posted in Open Source Hardware, tindie | Leave a comment

Easily manage I/O on a remote Arduino using two wires and the ExtraCore library

I’m always running out of the good pins in my Arduino projects. PWM pins are in particularly scarce supply and I sometimes even find myself short on analog inputs. Tricks like using shift registers or software PWM help, but they have limitations that aren’t always easy to work around.

The open source ExtraCore library on GitHub helps you use a second Arduino compatible to nearly double your pin count. You can stop scratching your head over how to get all the functionality you need once you go beyond “blinky LED” type projects. You can just pop in a second Amtega328 based board.

  • Lets you read or write to every pin on the extra board as easily as the onboard pins.
  • Adds 6 PWM outputs instantly.
  • Communication only takes 2 wires (A4->A4, A5->A5)

When Tim Malcom wanted to make a giant interactive bagpipe sculpture for Maker Faire he ended up using 3 Arduinos and two of them were talking over a two wire interface. This was one of the intended missions of the ExtraCore, but Tim had to do all his own code. Now if he wanted to farm out I/O to a second Arduino he could have it working in just a few minutes with this library, or use it as a jumping off point for something more complex.

You will need the Wire and EasyTransferI2C libraries in your Arduino libraries folder. The included examples will connect two Arduinos and blink pin 13 in time as well as run one PWM output and show you how to read remote inputs. The client example is meant to run as is for most projects. The manager is where your own code would run.

Here some of the code from the manager side.

#include <ExtraCore.h>
#include <Wire.h> // You don't need to call Wire or EasyTransferI2C directly, just include them.
#include <EasyTransferI2C.h>
ExtraCore extraCore;
void setup()
{
  pinMode(13, OUTPUT); //set local pin13 to output.
  extraCore.beginManager();//begin Manager role.
  extraCore.setPinIOstate(6, OUTPUT);//set remote pin to output.
  extraCore.setPinIOstate(13, OUTPUT);//set remote pin to output.
  extraCore.setTriStateValue(3, TRUE);//sets remote pin to INPUT with pullup resistor active.
}
...
void loop()
{
...
  extraCore.setAnalogOutput(6, 127);//Turns on remote PWM
  extraCore.setDigitalOutput(13, HIGH);//Turns one remotes Digital 13 pin
  extraCore.sendConfig();//send the current I/O setting to the remote to execute.
... 
  int r2 = extraCore.getDigitalReading(2);
}

As you can see using the remote pins is pretty similar to using the local pins. One exception is using high-impedence mode on an input pin. You need to specifically call setTriStateValue(pin, state). Setting this to true will both set the remote pin to input and digitalWrite(pin, HIGH). Setting it to false will only clear the pullup by setting digitalWrite(pin, LOW), but won’t change the input state of the pin.

Fritzing Diagram of setup the works with example code. This will allow you to see pin 13′s flashing in time, a PWM LED light and dim and see the reading on D2 go on and off.

 

Diagram of example code setup.

Caveats:

The library is meant to get you up and running quickly by adding more ports easily. If you need timing resolution greater than about 20 milliseconds you should roll your own. Keep all your timing critical stuff local to the manager board and you should be fine.

The libraries use the built in i2c in hardware. If you call Serial.print in your sketch too often it will cause the i2c communications to fail. You can get a few debug messages out, but if you run into problems try disabling Serial.print* commands.

If your outputs aren’t working, but sure you set the pin state to output. Just like local pins they default to input.

Reference

ExtraCore();
Constructor

Manager Methods
void beginManager();
Start sending and receiving data as the manager.

void setPinIOstate(pin, boolean);
Set the desired INPUT/OUTPUT state of a pin.

void setDigitalOutput(pin, boolean);
Set the desired HIGH, LOW output state of a pin.

void setAnalogOutput(pin, pwm);
Set the desired PWM (0-255) state of a pin. Ignored if not PWM cabable.

void setTriStateValue(int, boolean);
Set the pullup resistor to TRUE/FALSE. True will automatically set the pin to INPUT.

boolean getDigitalReading(pin);
Get the last known digital reading from the remote.

int getAnalogReading(pin);
Get the last known analog reading from the remote.

void sendConfig();
Send the current desired state of all the pins to the remote.
This is required to for changes to take effect.

Client methods:
void beginClient();
begin sending and recieving as client.

boolean getPinIOstate(pin);
Get the desired IO state for a pin.

boolean getOutputValue(pin);
Get the desired digital output value for a pin.

boolean getTriStateValue(pin);
get the desired pullup resistor value for a pin.

int getAnalogValue(pin);
Get the desired PWM output for a PWM pin.

void setDigitalReading(pin, value);
Set the digital reading from the remote for a pin.

void setAnalogReading(pin, value);
Set the Analog reading for pin.

void sendData();
Send the currently known pin readings to the manager.
This is required for updates to take effect.

boolean isDataNew();
Returns true if new data has arrived since the last time it was checked.

Posted in Arduino | 6 Comments

Awsesome IR remote library from Ken Shirriff

http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

Easily get your Arduino to talk to your TV with just three components and this library. IR protocols are  a little tricky even with a really good write up in Make Magazine recently. Ken’s library is going to make it a lot easier to experiment with.

  • Send and receive IR remote codes in multiple protocols.
  • Supports 5 protocols with easy protocol addition.
  • Doesn’t need a lot of electronics to work.

You can get it from GitHub.

Photo (C) Ken Shirrif 2008

Posted in Arduino | Leave a comment

Digispark on Kickstarter

Digispark is a Kickstarter project that ends Sept. 10th. On August 24th they had reached $168,332 (of $5000 goal). It’s a great platform. People have been asking how it stacks up against ExtraCore.  Digispark is a very complementary product to ExtraCore. Both are entries in “small, inexpensive Arduino Compatible.” But they live in different niches. You can’t get everything you want for $10 yet.

Feature Digispark ExtraCore
Total Pins 6 22
Digital I/O capable pins 6 20
Power Regulator yes no
USB yes no
MHZ 16.5 16
Sketch Space ~6k ~32K
PWM Pins 3 6
Analog Inputs 4 8
Power LED yes* no
Test/Status LED yes (pin 0) yes (pin 13)
Uno compatible in IDE no yes
Programmable Serial USART no yes
Master/Slave SPI Serial Interface no yes
Byte-oriented 2-wire Serial Interface (Philips I2C compatible) no yes
Programmable Watchdog Timer with Separate On-chip Oscillator no yes

 

*2 leds total.

You have to Modify your Arduino IDE files to program to Digispark with included files. Should be super easy.

The less powerful processor of the Digispark missing a few features on board. As you can see from the last 4 entries in the table. Most people probably won’t miss them or you can make a software solution.

Bottom line: Digispark is an outstanding platform when you want something cheap and simple. ExtraCore is suited to projects that are more complex in hardware or software.

Posted in Arduino, Kickstarter, Open Source Hardware | Leave a comment

Using i2c and a second Ardunio to increase your I/O capacity

I am working on a library for Ardunio that will easily allow someone to connect two Arduinos together with 2 wires and have one serve as extra I/O. For $15 and two I/O pins you can add an ExtraCore to a project to extend your I/O capacity for example. For digital only, of course a shift register is a better deal. A shift register won’t also get you 5 Analog inputs and 6 PWM outputs.

Controlling all the I/O pins on a remote Arduino

 

I have the “hello world” of the Arduino world working. I can blink pin13 remotely. The code is generic and any of the digital pin states can be set to 0 or 1 right now.

There are still a few functions to finish up, but the hard part is done.

I used the Easy Transfer library which in turn uses the built in Wire library. I ran into some problems when trying to use arrays with Easy Transfer. It’s supposed to work but I had mixed results.

The code for controlling the remote is pretty simple. You set your pin mode, then you set the output value and send the config to the remote.

...
extraCore.setPinIOstate(13, OUTPUT);
...

void loop()
{
  digitalWrite(13, HIGH);
  extraCore.setOutputValue(13, HIGH);
  extraCore.sendConfig();
  delay(2000);
  extraCore.setOutputValue(13, LOW);
  extraCore.sendConfig();
  digitalWrite(13, LOW);
  delay(2000);
}

I still need to finish the code for reading digital and analog input as well as setting remote PWM outputs. Adding support for things like tone() would be easy as well. I expect the code to be done soon. The hardest part was getting 2 way i2c working the way I wanted.

(Since “Master” and “Slave” are not considered polite terms, I use the terms Manager and Client/Remote.)

Posted in Arduino, Open Source Hardware | Leave a comment

Considering the next Kickstarter

I’m trying to transition from full time work “for the man” to full time Kickstarting and  looking for my next Kickstarter project. I currently have several ideas. With two successful open source Kickstarter projects under my belt I am ready to tackle another challenge. Here are some of the ideas I have. What do you want in an Arduino Compatible or Arduino accessory?

  • A smaller version of the ExtraCore (Arduino Compatible) that is smaller and has an on board power regulator.
  • A slightly larger version of the ExtraCore with an on board boost regulator for running off a single AA battery. This would be cheaper and smaller than buying the two separately.
  • A hackable attiny based IR sensor that’s programmable from the Arduino environment. The production version would be in a small surface mount package.
  • A capacitive touch input panel shield for Uno.
  • A larger run of ExtraCore to bring the price down.
  • An attiny based “universal” logic gate board that could be any one of AND, OR, NAND, NOR, XOR or XNOR with jumper selection.

What do you want the most? Head on over to this reddit post to comment and vote.

Posted in Kickstarter | Leave a comment

ExtraCore V2 design

I was showing the ExtraCore around Maker Faire in California this year. The owner of Modern Device bought some on the spot to sell online. While we were talking he asked how much smaller it would be with a VQFN Atmega chip. He also wondered about adding a power regulator to the back.

Now that the Robotic Minion Kickstarter engineering and lasering work is wrapped up I have had a little bit of time to play with the ideas I got for the ExtraCore.

The first thing I did was switch to 2mm headers. Then I replaced the main chip with a VQFN version. There is a 28 and 32 pin version. I choose the 28 pin version because it’s quite a bit smaller but gives up the two analog inputs A6 and A7.

I went from a 1206 LED to an 0603. I left the other components at 0805. With a 400ma power regular strapped to it’s back it all fits on a board that’s 16mm x 18mm. I haven’t got past the Eagle PBC design stage yet.

I’d love to hear what you think about this design. It could be my next Kickstarter. Another contender is an ExtraCore with a voltage booster on board so it can be run off a single AA battery, like the eChanter.

Posted in Arduino, Open Source Hardware | 2 Comments

Inkscape Measure All Paths Extension

In order to get a rough idea how long something will take on a CNC or laser cutter I wanted to be able to measure all the vector lines and arcs in a file. I knew it was going to be possible to do in Inkscape. I looked around for an extension that that would do what I wanted, but none did.

 

Built into Inkscape is an extension to measure the paths of selected item. I didn’t like it for a couple of reasons. 1. You have to select the object. 2. It prints the length on the objects themselves.

I really wanted to be able to separate the lengths by the stroke color of the items. This allows me to color the cuts in one color and the etching in another color. Cuts are slower on most materials.

I’ve never use Python before, but I was able to figure out enough of it to be able to adapt the existing plug in to do exactly what I wanted.

I’m sure there are some pathological Inkscape files that will break or defeat the plug-in. However, it’s pretty handy as it stands to be able to measure the lengths in a file quickly. I imagine it would be easily possible to adapt into a web-script to allow a person to get a quick estimate of lengths for a laser cutting business application.

I’ve uploaded the code to GitHub.

Posted in Laser | Leave a comment