Latest Updates: electronics RSS

  • Heavy duty pull sensors

    Ellen 18:21 on June 25, 2012 | 0 Permalink | Reply
    Tags: , electronics, ,

    Interacting with installations with a long life time we turn to heavy duty sensors that can handle a lot of cycles. The string and pull sensors below can handle more than a million cycles and are built for industrial use. They can also be connected to circuit board like Arduino.

    Check out all the pull sensors and string pots from Celesco. Novotechnik also offers a wide range of pull sensors.

    Check out this Processing and Arduino project by nhw3030 with Celesco string sensors.

  • Unity + Processing + Arduino

    Ellen 10:32 on May 31, 2012 | 14 Permalink | Reply
    Tags: , electronics, , ,

    I did a test connecting Arduino and Unity with the help of Processing and a Open Sound Control library. When I am pushing the Flexi Force sensor the values affect a cube within Unity. To get this setup do the following:

    Arduino
    Load the Standard Firmdata on to your Arduino. Check out a full Arduino + Processing tutorial to get the setup.

    Processing
    Download the oscP5 processing library and put it in your Processing sketch folder in the folder libraries.

    Initialize oscP5 library and broadcast data to port 12000. The port Unity will listen to.
    Add the remote location to listen to on port 3200. If Unity would broadcast event in this example, the broadcast port would be set to 3200. Initialise Arduino to be used later on.

    oscP5 = new OscP5(this,12000);
      myRemoteLocation = new NetAddress("127.0.0.1",3200);
      arduino = new Arduino(this, Arduino.list()[0], 57600);

    In the draw function we read the analoge pin 0 to get sensor values from the Flexi Force sensor. Set the OSC message to flexiforce. Unity will listen to this label. Add the message of the sensor value into the osc message with add method. This method can take numbers, strings and byte data.

    float flexiforceSensor = arduino.analogRead(0);
    OscMessage oscMess = new OscMessage("/flexiforce");
    oscMess.add(flexiforceSensor);

    oscP5.send(oscMess, myRemoteLocation);

    The entire Processing sketch can be seen here.

    Unity
    In Unity you can import the Osc.cs and UDPPacketIO.cs to broadcast and listen to UDP data.

    Set up the corresponding host and ports in your Unity script.

    public var OSCHost : String = "127.0.0.1";
    public var SendToPort : int = 3200;
    public var ListenerPort : int = 12000;

    Import the UDPPacketIO and Osc components and feed in the host and ports. Add your specific label of your osc message and what method to call when receiving this event from Processing.

    var udp : UDPPacketIO = GetComponent("UDPPacketIO");
    udp.init(OSCHost, SendToPort, ListenerPort);
           
    handler = GetComponent("Osc");
    handler.init(udp);
    handler.SetAddressHandler("/flexiforce", AffectObject);

    In the receiving method you can print out the label and message values. In this case the sensor value from the Flexi Force. The cube will change width when getting a new value from Processing.

    public function AffectObject(oscMessage : OscMessage) : void
    {      
            Debug.Log("Event name: " + Osc.OscMessageToString(oscMessage));
            Debug.Log("Event data: " + oscMessage.Values[0]);
           
            var myCube = GameObject.Find("Cube");
            var boxWidth:int = 8 - ( oscMessage.Values[0]);
            myCube.transform.localScale = Vector3(boxWidth,5,5);
    }

  • Geek Girl Meetup in London

    Ellen 15:33 on April 29, 2012 | 0 Permalink | Reply
    Tags: electronics, Geek Girl Meetup 2012, geekgirl,

    Spending the day at Geek Girl Meetup in London. Talked about The Sound of Football and my Arduino projects.

    In the Arduino session I presented my Depressed Shoe Shelf, the bend sensing belt Bad Posture, how to control electronics from the internet using Processing.

    google_campus_society46_680

  • Arduino library for LED Message Display

    Ellen 18:53 on April 15, 2012 | 5 Permalink | Reply
    Tags: , Arduino library, electronics, LED

    Making life a lot easier I wrote an Arduino library that takes care of converting strings and calculating the checksum of all commands sent to the LED Message Display. Compared to the first example of sending text to the display the library can send commands of how long the text should display, how to be animated in and out and display European characters. All included in the BockiMessageBoard library on Github.

    amplus_led_message_display_sundh

    The code below shows how to initiate and send messages:

    #include <BockiMessageBoard.h>

    BockiMessageBoard messageBoard = BockiMessageBoard(0); // 0 is the Id of your message board

    void setup {
          // Configure the display before sending the text.
          int displayTime = 0.5; // Input 0.5 sec or 1 to 25 seconds
          messageBoard.configure(displayTime,SCROLLLEFT,VERTICALCLOSE);
    }

    void loop {
          String euroChars = "Testing with European characters <U45><U44><U76><U65><U64><U61>";
          messageBoard.displayMessage(PAGE_A,euroChars);
    }

    The library generate serial data to the LED Message Display with this setup:

    <ID00><L1><PA><FE><MA><WC><FD>MESSAGE CHECKSUM<E>

    <ID00> - The id of the message board.
    <L1> - Line number
    <PA> - Page id
    <FE> - How the text will appear. Scrolling, twinkeling, snowing…
    <MA> -
    <WC> - Waiting time. How long to display text.
    <FD> - How the text will disappear. Scrolling, twinkeling, snowing…
    MESSAGE - The message text to be displayed
    CHECKSUM - Hex value calculated on all tag sabove.
    <E> - End of data.

    The circuit uses a RJ14 cable to transfer the serial data to the display board:
    ethernet_led_bb

  • Make WiShield work in latest Arduino IDE

    Ellen 17:22 on February 17, 2012 | 25 Permalink | Reply
    Tags: , electronics, wishield

    1. Download the WiShield library that has been optimized and fixed by users:

    2. Rename the folder to WiShield and put it into Arduino_sketch_folder/libraries
    You might notice that just running a sketch with the WiShield library will generate errors like:

    return type specified for ‘virtual void Server::write(uint8_t)’
    clock-arch.c:44:20: error: wiring.h: No such file or directory

    3. In order to get rid of these error you need to change the corresponding names in the following files:

    clock-arch.c
    Replace #include “wiring.h” with #include “Arduino.h”

    WiShield.cpp
    Replace #include “WProgram.h” to #include “Arduino.h”

    WiServer.cpp
    Replace #include “WProgram.h” to #include “Arduino.h”
    Replace void Server::write(uint8_t.. to be size_t Server::write(uint8_t..

    WiServer.h
    Replace virtual void write(uint8_t); to virtual size_t write(uint8_t);

  • Get analog value from Yellow Jacket

    Ellen 22:07 on February 14, 2012 | 1 Permalink | Reply
    Tags: Asynclabs, electronics, Rugged Circuits,

    rugged_circuitThe Yellow Jacket wifi microcontroller originally from Asynclabs is being produced by The Rugged Circuits. I got one and here is a tutorial on how to read an analogue value from the board.

    The Yellow Jacket is using the library WiShield from Asynclabs. I have seen a lot of puzzled comments on how to get it working. Just running one of the WiShield examples in the latest Arduino IDE gave me a few errors:

    “error: conflicting return type specified for ‘virtual void Server::write(uint8_t)’”

    It seems like the WiShield library isn’t really up to sync with the latest Arduino IDE. So I used the older Arduino IDE and downloaded the WiShield 1.3.0 library which is made for the older Arduino 0022.

    Your network settings
    Next thing I modified the example SimpleClient with my personal network settings. The local ip is the address where I will be able to access the board from and with that the sensor value of the analog input. In your network settings you can see what type of security settings your network has. Change the digit in code to correspond to your network’s security type. In my case I have got a WPA2 password that I enter in the code.

    unsigned char local_ip[] = {192,168,2,240};     // I choose a free IP address in my network
    unsigned char gateway_ip[] = {192,168,2,1}; // Address of my router
    unsigned char subnet_mask[] = {255,255,255,0};
    const prog_char ssid[] PROGMEM = {"NAME_OF_MY_WIFI_NETWORK"};
    unsigned char security_type = 3;        // 0 – open; 1 – WEP; 2 – WPA; 3 – WPA2
    // WPA/WPA2 passphrase
    const prog_char security_passphrase[] PROGMEM = {"my_password"};

    Initializing WiServer
    In the setup method of the sketch the WiServer is initialized together with the name of a function defining what we will see when surfing into the board.

    void setup() {
    WiServer.init(sendMyPage);
    WiServer.enableVerboseMode(true);
    }

    Serving data to web page
    As in any Arduino sketch the analog value can be reached through analogRead. Within the method sendMyPage the content of the web page is printed together with the sensor value.

    With WiServer.print we serve the value to

    WiServer.print("");
    sensorValue = analogRead(sensorPin);
    WiServer.print("sensorValue :");
    WiServer.print(sensorValue);
    WiServer.print("");

    Good to know-list
    Good to know when uploading your code to the board:

    • You need to set your board type to Arduino Uno.
    • It will take about 30 seconds for the Yellow Jacket to start up after uploading the code or adding power to it.
    • You can source the Yellow Jacket with its own power by adding 7V-24VDC to pin raw.
    • Depending on which code library you want to use you need to activate it in apps-conf.h within the WiServer library code. In this example I have uncommented #define APP_WISERVER

  • Small Ehternet access just got smaller

    Ellen 22:08 on January 12, 2012 | 0 Permalink | Reply
    Tags: , arduino shield, electronics, ethernet, freetronics

    ethernet

    The Arduino Ethernet shield has been around for some time now. It’s a great solution for cutting out the middle man of the computer when check things online from the Arduino. In order to build smaller cases I stumbled upon EtherTen from Freetronics. It’s a fully Arduino-compatible board that runs Arduino code AND connects to internet with Ethernet.

    Lets make a list of the pros:
    - Smaller than Arduino board with Ethernet shield on top
    - Runs Arduino Ethernet library
    - Power of Ethernet, no power supply needed (!!!!)
    - Micro SD card holder
    - And sexy round corners (rounder than the Ethernet Shield)
    - Neat mini USB socket

    When it arrived I simply ran the TwitterClient file by Tom Igoe in Ethernet examples of the Arduino IDE and it was up and running. To call my custom php file was a bit harder though. Example code to be posted on my Arduino Circuit Blog shortly.

  • My Arduino circuit blog

    Ellen 11:45 on October 31, 2011 | 4 Permalink | Reply
    Tags: , curcuits, electronics

    Whenever I make a circuit I try to document it and take photos. With the Fritzing software it gets even better. To share code and circuits I gathered my Arduino circuits on this new blog: Ellen Sundh’s Arduino Circuit Blog

    Untitled-1

  • Geek Girl Arduino Workshop

    Ellen 11:15 on October 12, 2011 | 0 Permalink | Reply
    Tags: , electronics,

    During the Arduino Workshop with Geek Girls Meetup we went through a number of sensors. A full list will be posted here soon. Here are some images from the workshop:
    @ellensundh visarVisning av motståndsappen

  • The dirty robot

    Ellen 17:55 on October 1, 2011 | 0 Permalink | Reply
    Tags: electronics, robot, sound

    Some robots only reacts on very dirty words. It’s a struggle but what could you do. This robot reacts on Swedish dirty words (genitals and poo related words).

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel