Show Posts
Pages: [1] 2 3 ... 20
1  Topics / Product Design / Re: Arduino Boards on: September 18, 2014, 05:43:32 pm
Did you actually look at that link to the Teensy processor boards https://www.pjrc.com/store/teensy31.html ?
The Teensy is a fully Arduino compatible board available in large quantities.

It hosts an Arm Cortex M4 processor running @ 96MHz. In fact by most standards it is a better Arduino board than any of the original Arduino boards. The Teensyduino plugin installs many libraries that work much better than the original libraries. The creator has 20+ years of professional experience as an embedded electronics developer and over the years has provided uncounted number of improvement to the original Arduino libraries.

For the price, size and performance it is a top notch product pretty much unmatched.
2  Using Arduino / Networking, Protocols, and Devices / Re: i2c bus length on: September 17, 2014, 05:10:31 am
As Mike already said 20' is a bit too far to work reliably, even at the lowest bus frequency of 100KHz.
I've used the PCA9600 I2C bus buffer chip in projects and have layout and schematics of a little board that uses this chip. However, it uses the smaller  tssop 8 version of the chip so you've got to have some soldering skills.
You would need one each device on the bus , so three in your case.
3  Using Arduino / Networking, Protocols, and Devices / Re: i2c bus length on: September 16, 2014, 09:02:46 pm
I am assuming you mean 20 feet ?
Yes, that can be done but more details are needed ;-)
4  Using Arduino / Networking, Protocols, and Devices / Re: easiest to use wifi shield on: September 12, 2014, 06:34:27 pm
For relatively inexpensive but very stress free WiFi:

http://www.seeedstudio.com/depot/W5200-Ethernet-Shield-p-1577.html
and
http://www.newegg.com/Product/Product.aspx?Item=9SIA0AT0FS2601&nm_mc=KNC-GoogleMKP&cm_mmc=KNC-GoogleMKP-_-pla-_-Wireless+Routers-_-9SIA0AT0FS2601
5  Using Arduino / Networking, Protocols, and Devices / Arduino & TouchOSC Tutorial on: September 01, 2014, 08:20:10 pm
I've posted a little tutorial on how to get an Arduino to exchange OSC messages with TouchOSC, for example to remote control "something"

http://trippylighting.com/teensy-arduino-ect/touchosc-and-arduino-oscuino/

This uses the Oscuino library, the most complete implementation of the OSC protocol written and maintained by the inventors of the protocol. Links are in the tutorial ;-)

Something I forgot to mention in  the tutorial is that while it uses W5100/W5200 based Ethernet shields/modules, these are easily connected to a little pocket router such as the TP Link TL WR703n (or 702n or3020 etc)  and that will get you connected through WiFi easily and very quickly. I've done this successfully in several projects.
6  Using Arduino / Networking, Protocols, and Devices / Re: Android device controlling Arduino via Wi-Fi on: September 01, 2014, 10:54:01 am
Of course you can!

However, for a beginner project I'd stay away from any of the current offerings for WiFi shields. AFAIK none of them currently support AP modus which is what you need in order to connect to them directly without going through another AP/router.

Stack a normal Arduino Ethernet shield ( with W5100 Ethernet chip) onto your Arduino. Connect a small Wifi pocket router with an Ethernet cable to the Ethernet Shield and you can connect to the Arduino per WiFi. A cheap. Small route I've used successfully in a few projects is the TP Link TL WR703n or ( or 702n or 3020) for ~$25. It's half the footprint of an iPhone 4 and about 2.5 times as thick. It comes configured as an AP, so you plug it in and then should be able to see it in your WiFi settings on your Android device.

This set-up also allow you to use the standard Arduino Ethernet library and all the other libraries that depend on it. This is often overlooked ;-)
7  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 chip vs. Wiznet W5100 on: September 01, 2014, 10:40:28 am
My main point was to use an Ethernet Module, or shield that works with the Ethernet library. If you can get these eBay Ethernet modules with W5100 cheap enough that should work. Worth a try for that price.
8  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 chip vs. Wiznet W5100 on: September 01, 2014, 09:08:56 am
If you own efforts do not account or cost then go ahead and tinker endlessly with this cheap stuff.

I'd sugest to go with a W5200 Ethernet solution. I've used a WIZ820io Ethernet module for ~$20 successfuly in several projects or you can buy the Seed Studio Ethernet Shield V2, which also hosts the W5200.

The advantage is that with the W5100/W5200 based solutions you can use the mature, tried and tested Ethernet library  and the many other libraries that rely on it. Hook a little WiFi pocket router to it such as the Tp-Link TL WR703n (or 702 or 3020...) and you've got WiFi with AP functionality!
9  Using Arduino / Networking, Protocols, and Devices / Re: Z-OSC Library and Seeeduino Ethernet Shield Communication Issues on: September 01, 2014, 09:01:31 am
I've posted a Sketch and sample TouchOSC layout on my GitHub repo:

https://github.com/TrippyLighting/OSCuino_TouchOSC/tree/master

I will post a step-by-step tutorial later on my blog (trippylighting.com).  This will also include an updated sketch on how to get this working using Apple Bonjour (ZeroConf networking).
10  Using Arduino / Networking, Protocols, and Devices / Re: Z-OSC Library and Seeeduino Ethernet Shield Communication Issues on: August 30, 2014, 11:05:21 am
The first thing to know about TouchOSC is that it only sends and receives float values.

In general, however I would not work with the Z-OSC library.
I'd recommend using Oscuino, which is the Arduino OSC library created and actively maintained by the inventors of the OCS protocol at CNMAT :  https://github.com/CNMAT/OSC

I am not at my computer at the moment but can post some code later how to get that to work with TouchOSC.

Edit: I just checked the Seed Studio website. It appears that they have a Ethernet Shield V1 that hosts the Wiznet W5100 Ethernet chip and a V2 that hosts the W5200 Ethernet shield. Which one do you have ?
Both work, but the W5200 is much more performant. It depends on what you want to do if that's an issue. Based on my experience with both chips for TouchOSC it won't make a difference.

I use TouchOSC to remote control my lighting systems (see sig)
11  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Ethernet Bonjour / ZeroConf Networking Library on: August 09, 2014, 10:50:51 pm
Good to hear! Thanks for the feedback!
12  Using Arduino / Networking, Protocols, and Devices / Re: Controlling Arduino with iPhone on: August 04, 2014, 09:30:39 pm
Yes, WiFi in general is very power hungry. Much more so than Bluetooth for example.
Unfortunately Apple is rather restrictive in what they allow the maker community to do with Bluetooth.
13  Using Arduino / LEDs and Multiplexing / Re: Fading an RGB LED on and off on: August 04, 2014, 09:23:32 pm
Here's a link to a forum thread where 12 bit PWM is discussed.
Few clarifications on some of the remarks in that thread.

12 bit make a lot of sense if you want a visually linear fading experience. If you want to fade really slowly all the way to compete darkness you may need 16 bit in order not to see steps at the very lowest light levels. Naturally the speed of fading makes a difference. Oddly enough I've never anyone seen mention it.

The response of the human eye to brightness is only coarsely logarithmic. More precisely it follows the CIE lab color model.
14  Using Arduino / LEDs and Multiplexing / Re: Fading an RGB LED on and off on: August 04, 2014, 08:52:24 pm
Here is an early version of a 3D Bresenham algorithm I used for testing:

Code:
 /* find maximum of a and b */
#define MAX(a,b) (((a)>(b))?(a):(b))

  /* absolute value of a */
#define ABS(a) (((a)<0) ? -(a) : (a))

  /* take sign of a, either -1, 0, or 1 */
#define ZSGN(a) (((a)<0) ? -1 : (a)>0 ? 1 : 0)


uint8_t r1, g1, b1, r2, g2, b2;

void setup()
{
  Serial.begin(9600);
  
  r1=0; g1=0; b1=0;
  r2=0; g2=0; b2=0;

}


void line3d(uint8_t x1, uint8_t y1, uint8_t z1, uint8_t x2, uint8_t y2, uint8_t z2)
  {
    int xd, yd, zd;
    int x, y, z;
    int ax, ay, az;
    int sx, sy, sz;
    int dx, dy, dz;

    dx = x2 - x1;
    dy = y2 - y1;
    dz = z2 - z1;

    ax = ABS(dx) << 1;
    ay = ABS(dy) << 1;
    az = ABS(dz) << 1;

    sx = ZSGN(dx);
    sy = ZSGN(dy);
    sz = ZSGN(dz);

    x = x1;
    y = y1;
    z = z1;

    if (ax >= MAX(ay, az))            /* x dominant */
    {
      yd = ay - (ax >> 1);
      zd = az - (ax >> 1);
      for (;;)
      {
        goToRGB(x, y, z);
        delay(15);
        if (x == x2)
        {
          return;
        }

        if (yd >= 0)
        {
          y += sy;
          yd -= ax;
        }

        if (zd >= 0)
        {
          z += sz;
          zd -= ax;
        }

        x += sx;
        yd += ay;
        zd += az;
      }
    }
    else if (ay >= MAX(ax, az))            /* y dominant */
    {
      xd = ax - (ay >> 1);
      zd = az - (ay >> 1);
      for (;;)
      {
        goToRGB(x, y, z);
        delay(15);
        if (y == y2)
        {
          return;
        }

        if (xd >= 0)
        {
          x += sx;
          xd -= ay;
        }

        if (zd >= 0)
        {
          z += sz;
          zd -= ay;
        }

        y += sy;
        xd += ax;
        zd += az;
      }
    }
    else if (az >= MAX(ax, ay))            /* z dominant */
    {
      xd = ax - (az >> 1);
      yd = ay - (az >> 1);
      for (;;)
      {
        goToRGB(x, y, z);
        delay(15);
        if (z == z2)
        {
          return;
        }

        if (xd >= 0)
        {
          x += sx;
          xd -= az;
        }

        if (yd >= 0)
        {
          y += sy;
          yd -= az;
        }

        z += sz;
        xd += ax;
        yd += ay;
      }
    }
  }


void loop()
{
  int rand;
  rand = random (1, 4);
  
  if (rand==1) { r2=255;} else { r2= random(0, 256);};
  if (rand==2) { g2=255;} else { g2= random(0, 256);};
  if (rand==3) { b2=255;} else { b2= random(0, 256);};
  
  line3d(r1, g1, b1, r2, g2, b2);
  
  r1=r2;
  g1=g2;
  b1=b2;
}

It will not compile out o the box. You have to replace gotoRGB(x,y,z) with your own function that sets the LED color. Ive used this early on to test on my High Power RGB LED shields. When trying to get a linear dimming effect you will get visible stapes when going through the lower values. 8-Bit is just not enough to make that happen.

I believe however there is a way - although only for on pin IIRC - to get that to a higher PWM resolution even on an Arduino Uno. You may have to google around to find that.
15  Using Arduino / LEDs and Multiplexing / Re: Fading an RGB LED on and off on: August 02, 2014, 09:04:01 am

But first things first, let's get that LED dimmed without the color shifting noticeably.

That can be quite a difficult task!

1. As suggested before you could employ an algorithm that draws a line through a 3-Dimensional space, with the three axis being the three colors. An algorithm that does this very effectively with integer math is the bresenham algorithm as it only deals with integer arithmetic. So google 3D Bresenham and adapt the code fragments to work on an Arduino.
That will allow you to draw a line through a rasterized 3D space. so on an Arduino that would be a 256 x 256 x 256 large space.

This will allow you to smoothly fade from any given coordinate to zero, without any color dropping out too early. If thats what you are trying to accomplish I can dig out work I've done to get that accomplished.

2. However, the algorithm above will NOT keep the color consistent. That is difficult to do in the RGB coordinate system. In order to keep the color consistent in terms of Hue and saturation you'd have to adapt a HSV (Hue, saturation, Value) color model. You'd fade down the Value to dim the LED while keeping the color constant. Well, more or less. the non-linearity explained earl will come into play here as well and can further complicate the situation. I've got code for that a well.
Pages: [1] 2 3 ... 20