8/08/2013

How-to convert a cheap IKEA Samla box into a Maker-box

Cheap box for makerstuff converted into lockable case


IKEA samla box
I really like those cheap IKEA Samla boxes. They are very well suited for a lot of stuff especially when you move makerstuff to the makerspace or friends. Available in different sizes and stackable (you can stack different sizes on top of each other) and a separate lid you can also store stuff at home.

But one thing what was always annoying me is that you can't fix the lid to the box or even more could lock the box. So I designed three cheap ways to make the box lockable and secure.

Old PC screws, wire an rawlplugs
Velcro to join lid and case together
One way is to take some old spare PC screws and wires, drill holes into the lid and case and join the wire and the rawlplug with a screw. You then can secure the lid to the box by pushing the rawlplugs through the lid and box. In order not to loose the plugs you can secure them with wire and a screw.


Suitcase lock
Much simpler but a little bit more costly is to use some velcro. A velcro tap on the lid and on the box connected by a strip of velcro secures the lid to the case but this solution is less rugged.




If you have to secure the box against unwanted access, just drill a hole in one side big enough to apply a cheap little suitcase lock. The other side is secured by a keychain ring. Et voilá. Stuff secured.

8/05/2013

Power supply for remote sensors

Presentation: How to supply power to microcontrollers/ (remote) sensors with low dropout (LDO) voltage regulators and batteries


"Classic" 7805 Voltage regulator
On August 5 I had a short presentation at the Makerspace Attraktor in Hamburg on how to supply independent power to devices like standalone microcontrollers or (remote) sensors.

 The talk gave some comparison about different low dropout voltage regulators which are by design very well suited for battery powered devices. Decision finding on what parts are most suited and design considerations for independent sensors were explained detailing a remote temperature sensor project I'm working on for about two years now.

XBee temperature sensor


You can find the presentation (in english) here

If you want to stay in touch with new projects or blog entries you can follow me on twitter

7/30/2013

Arduino and Android control speed and direction of RC Surfer

Accelerometer sensor controls throttle and rudder


My RC surfer project (see last Blog entry) evolves into much more work than thought and the last addition is the control of the dc motor speed and the rudder with the Android phone.

Using the accelerometer sensor x- and y-axis values which are sent via bluetooth to the Arduino board I can in-/ decrease the speed of the motor by turning the phone up and down. To control the rudder I have to flip the phone to the left or to the right.

The reaction time with the first code on Android/ Arduino was kind of slow. I had to optimize the code and now it reacts almost in real time. Only the voltage value which is displayed on the phone is jumping when there is (too) much load on the system. I might have to add some isolation to the Arduino power supply to avoid too much noise when the motors draws much current.

The next thing I will do is to design a PCB which fits into the free space of the RC surfer in the forward compartment. So it's EAGLE time!

7/22/2013

Temperature sensor current consumption

1 year with batteries - temperature sensor project

Temperature sensor with alkaline batteries
Just a quick update on my XBee/ LCD/ temperature sensor project which I originally started in 2011 (last blog entry: XBee temperature sensor project ). I  had to replace the already used battery cells which I put into the sensor about one year ago (August 31 2012) because I got some timeouts on my receiver. The
voltage came down to 3.34 volts and this is a point where the low dropout regulator (MCP1700) keeps quit working sometimes even when the load is only about 25 mA every four minutes when the XBee (end device, sleeping) sends the temperature data to the coordinator.

Voltage development temperature sensor
The three battery cells had a voltage of around 4.1 volts when I started using them for the sensor, so they were already down from their original voltage/ capacity which is around 1.5 volts per cell for unused batteries.
Why did I use used battery cells and not new ones? Because they were lying around and I was wondering how long some spare, already used cells would last during time and different weather conditions. And they lasted almost one year!

The temperature sensor is located outside and we had temperatures of around -15 to +30°C during the year. The chart you see is far from scientificly accurate but gives you a raw picture of the voltage curve for those cells (GP super alkaline).

Next I will replace the batteries with some rechargeable batteries. There are some nice energy harvester ICs on the market - maybe this will be the next power supply for my sensors. Stay tuned.

7/15/2013

Spot welder part II

Spot weld now very strong with tungsten electrodes

2.4mm tungsten electrodes
I replaced the steel electrodes from my home built spot welder with 2.4 mm tungsten electrodes which I took from my AC/ DC TIG welder. The welding joints are now very strong. It is almost impossible to separate the two metal reeds without damaging it.

What's up next? I still manually trigger the weld and the next tests will be with a time controlled weld with the help of an Arduino. I also have to built a better post to hold the electrodes and some sort of mechanism to adjust the distance of the two electrodes to be able to weld different sizes of rechargeable batteries with variable widths of welding points.

7/12/2013

RC Surfer controlled by Android and Arduino

Motor control and telemetry data added to RC Surfer


I just added some controls to my RC Surfer project. I can now control the power of the dc motor by a slider on my Android phone for the full scale (that's analogWrite() 0 to 255 on my Arduino). This is done by the "ENA"-Pin (enable bridge A on the L298 motor driver IC) and using PWM on the Arduino.
Remote control app with data transmitting and receiving
I also have a "Start" and "Stop" button for any "emergency" case. Later I will add the functionality to stop the engine if the bluetooth connection will be interrupted.

I also added some telemetry data coming from the RC model. For now it's the voltage of the rechargeable battery pack and the temperature of the motor driver IC.

I did some first tests outdoors and had a range of a about 40 meters (~130 foot) with my bluetooth connection. Curently I'm using the Itead Bluetooth Shield V2.2 from IteadStudio. The range might be more than enough for later tests. There is still the option to exchange the HC-05 module with a XBee but I would then loose the option to control everything with my Android smartphone. For the moment the connection is sufficently reliable.

Of course the speed and direction will later be controlled by sensors of the smartphone.The slider is just for early tests.

7/03/2013

Test run with RC Surfer/ Homemade Spot Welder

I'm currently doing at least two projects at a time (and more in the queue) which I will elaborate later on in this blog.

Spot Welder

Spot welder test
The first project is a homemade spot welder which I'm building together with Knudt and Sebastian for the Hamburg Makerspace Attraktor. The device will be used for connecting rechargeable battery cells or join together thin sheets of metal. The whole thing consists of a 1 Farad/ 16V Capacitor (originally used for car hifi), a 13.8V/ 2A power supply, some Mosfets and an Arduino with a graphical display (at the moment it's a Nokia 5110 LCD display). The Arduino will do the controls, while the Mosfets will handle the power dissipation to the electrodes.
On the right there is a picture of an early test. You can see the capacitor in the background, on the breadboard there is an Arduno Nano and the Nokia LCD display. We are using scrap steel "electrodes" at the moment but will possibly change this with real tungsten welding electrodes.Oooh, and obviously no XBees involved this time.

RC Surfer

Years ago I bought a so called "RC Surfer" for cheap (you have to google this because mine is disassembled and I can provide no photo in action).

Cheap were also the contents of this RC controlled surfer. There was a motor driver with a relay, a 27 MHz radio control and a servo controlling the rudder. The power control was only "on" and "off" and the servo reaction to the input on the remote control was at least working.
There was no feedback of voltage or temperatures and no extra features like light etc.

 

At the moment I'm working on the new motor controls. I have a prototype L298 motor driver board which supplies at least 2A to the original dc brushless motor I'm still using. It consumes about 1A so I'm happy with the L298 for now. You can control the motor speed by using the PWM on the Arduino and connect it to the enable pin on the L298. You can also power the motor forward and backward what was not possible with the original motor driver.
The first test run worked quite well and the next addition will be the rudder control with a new servo. At the moment I'm using a joystick out of a scrap PS2 control - later I will command the RC Surfer with my android phone and a bluetooth connection. If that doesn't work, I will use a XBee/ RC combination with a traditional remote control.
Possible features might be telemetry which sends data like current used, voltage, temperatures, cam etc. Or what about a water canon?

to be continued...





.

6/03/2013

Arduino basics, part 2 presentation

Arduino MEGA
On June 3rd I had a short presentation on Arduino basics, part 2 in the Hamburg (Germany) Makerspace Attraktor .

 The participants learned about the serial communication (USART) and the ADC both with the Arduino IDE, how to program in C/ C++ and how to manipulate the registers directly.
The paper (pdf) is downloadable here (sorry folks, it's only available in german).

5/17/2013

ThermalCam with Arduino, XBee and Processing

ThermalCam with MLX90614, Arduino UNO, XBee Series 2 and prototyping shield
A project I'm working on for some weeks now is a cheap ThermalCam based on the Melexis MLX90614 IR sensitive thermopile detector chip (more on the chip from Melexis: MLX90614 )

There are lots of people out there, who already built a working version with this $35 device, but most of them use a wired connection and a Java graphical user interface (GUI).

I wanted to get the thing wireless and also to build my own GUI where I may customize some things that I miss with the Java-version. I chose a XBee Series 2 configured as a Router AT with 57600 baud and Processing for the GUI. I'm already done with the data transmission part. I can control the ThermalCam with some buttons in the Processing sketch and get the data out of the chip but it still lacks a nice GUI and a webcam overlay.

This awesome project was first developed by two german pupils Markus Kohl/  Max Ritter for "Jugend forscht 2010" (german science competition for pupils). Well done!

I already made some thermal images with the Java program and here are some examples.
Sitting at the desk, waving my hand. Background dark blue: windows, right orange square: tft screen

Raspberry Pi with voltage regulator (left bottom), main chip (middle) and ethernet chip (right)


Laptop laying flat on the ground, upper half display, lower half keyboard/ mainboard



4/02/2013

Arduino UNO Rev. 2

 Arduino basics presentation

On April 1 I had a short presentation on Arduino basics in the Hamburg (Germany) Makerspace attraktor .
 The participants learned about the Arduino environment, the IDE and how to program a sketch so that it blinks an led.
The paper (pdf) is downloadable here (sorry folks, it's only available in german - again).

3/04/2013

XBee Series 2

XBee presentation @ Makerspace Attraktor


On March 4 I had a short presentation on XBee modules in the Hamburg (Germany) Makerspace attraktor .


The paper (pdf) is downloadable here (sorry folks, it's only available in german).

1/03/2013

Electronic compass part 2

This is part 2 of the electronic compass with the video and the Arduino sketch.

Video:



Sketch:

/*****************************************
 * Compass with Pollin HDMM01-compass-module
 * and Nokia 5110-display
 * Last edit: 3.1.2013
 * By Markus Ulsass
 ******************************************/

/*******************************************************************************
 * This is an example sketch for our Monochrome Nokia 5110 LCD Displays
 *
 * Pick one up today in the adafruit shop!
 * ------> http://www.adafruit.com/products/338
 *
 * These displays use SPI to communicate, 4 or 5 pins are required to
 * interface
 *
 * Adafruit invests time and resources providing this open source code,
 * please support Adafruit and open-source hardware by purchasing
 * products from Adafruit!
 *
 * Written by Limor Fried/Ladyada  for Adafruit Industries.
 * BSD license, check license.txt for more information
 * All text above, and the splash screen must be included in any redistribution
 *******************************************************************************/

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

#include <Wire.h>

#define  I2ADDR       0x30
#define  TakeMeasure  0x01
#define SET_COIL 0x02 // set magnetic coil
#define RESET_COIL 0x04 // reset magnetic coil

// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

int r = 24;  // radius of compass rose
int x0= 60;  // x-origin
int y0 = 24; // y-origin

void setup()   {

  // Serial.begin(9600);

  display.begin();
  display.setContrast(60);
  display.clearDisplay();

  Wire.begin();

}

void loop() {

  ResetSetCoils();
 
  byte MsbX,LsbX,MsbY,LsbY;
  int x,y;
  char line[80];
  Wire.beginTransmission(I2ADDR); // Pollin HDMM01 address
  Wire.write(0x00);  
  Wire.write(TakeMeasure);
  Wire.endTransmission();
  delay(20);
  Wire.beginTransmission(I2ADDR);
  Wire.write(0x01);
  Wire.requestFrom(I2ADDR, 4);

  while(Wire.available()<4);
  MsbX  =Wire.read();          // upper  4 Bit X
  LsbX  =Wire.read();          // lower 8 Bit X
  MsbY  =Wire.read();          // upper 4 Bit Y
  LsbY  =Wire.read();          // lower 8 Bit Y
  Wire.endTransmission();         // stop transmitting
  x=((MsbX&0x0f)*256)+(LsbX);
  y=((MsbY&0x0f)*256)+(LsbY);
  x = map(x, 1960, 2151, -180, 180);
  y = map(y, 1939, 2131, -180, 180);
  double mygrad = atan2(-x, y)*180/3.1415927410;
  if (mygrad < 0)    mygrad = mygrad +360;
  int angleActual = mygrad;
  // Serial.println(mygrad); // debug
  delay(200);

  // Calculation of compass needle on lcd pointing to the direction
 
  if (angleActual >= 0 && angleActual <=45) {
    // 0-45 degrees
    int angle = angleActual/2;
    display.drawLine(x0, y0, x0+angle, y0-r, BLACK);
    // 45 degrees
    // display.drawLine(x0, y0, x0+r, y0-r, BLACK);
  }
  else if (angleActual >45 && angleActual <=90) {
    // 46-90 degrees
    int angle = (angleActual-44)/2 ;
    display.drawLine(x0, y0, x0+r, (y0-r)+angle, BLACK);
    // 90 degrees
    // display.drawLine(x0, y0, x0+r, y0, BLACK);
  }
  else if (angleActual >90 && angleActual <=135) {
    // 91-135 degrees
    int angle = (angleActual-90)/2;
    display.drawLine(x0, y0, x0+r, y0+angle, BLACK);
    // 135 degrees
    // display.drawLine(x0, y0, x0+r, y0+r, BLACK);
  }
  else if (angleActual >135 && angleActual <=180) {
    // 136-180 degrees
    int angle = (angleActual-134)/2;
    display.drawLine(x0, y0, (x0+r)-angle, y0+r, BLACK);
    // 180 degrees
    // display.drawLine(x0, y0, x0, y0+r, BLACK);
  }
  else if (angleActual >180 && angleActual <=225) {
    // 181-225 degrees
    int angle = (angleActual-178)/2;
    display.drawLine(x0, y0, x0-angle, y0+r, BLACK);
    // 225 degrees
    // display.drawLine(x0, y0, x0-r, y0+r, BLACK);
  }
  else if (angleActual >225 && angleActual <=270) {
    // 226-270 degrees
    int angle = (angleActual-222)/2;
    display.drawLine(x0, y0, x0-r, (y0+r)-angle, BLACK);
    // 270 degrees
    // display.drawLine(x0, y0, x0-r, y0, BLACK);
  }
  else if (angleActual >270 && angleActual <=315) {
    // 271-315 degrees
    int angle = (angleActual-270)/2;
    display.drawLine(x0, y0, x0-r, y0-angle, BLACK);
    // 315 degrees
    // display.drawLine(x0, y0, x0-r, y0-r, BLACK);
  }
  else if (angleActual >315 && angleActual <=360) {
    // 316-360 degrees
    int angle = (angleActual-312)/2;
    display.drawLine(x0, y0, (x0-r)+angle, y0-r, BLACK);
    // 360/ 0 degrees
    // display.drawLine(x0, y0, x0, y0-r, BLACK);
  }

  // text display

  // display.drawCircle(x0, y0, r-1, BLACK);
  // Display actual heading
  display.setTextSize(2);
  display.setTextColor(BLACK);
  display.setCursor(0,0);
  display.println(angleActual);
 
  display.setTextSize(1);
  display.setTextColor(BLACK);
  display.setCursor(x0-2,0);
  display.println("N");
 
  display.setTextSize(1);
  display.setTextColor(BLACK);
  display.setCursor((x0+r)-5,y0-3);
  display.println("0");
 
  display.setTextSize(1);
  display.setTextColor(BLACK);
  display.setCursor(x0-2,y0+r-8);
  display.println("S");
 
  display.setTextSize(1);
  display.setTextColor(BLACK);
  display.setCursor((x0-r)+5,y0-3);
  display.println("W");
 
  // Triangle for direction
 
  // display.drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
  display.drawTriangle(0, 46, 20, 46, 10, 18, BLACK);
  // fillTriangle ( int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
  display.fillTriangle (0, 46, 20, 46, 10, 18, BLACK);
  display.display();
  delay(100);
  display.clearDisplay();

}

void ResetSetCoils (void)
{

    // RESET / SET Coils
    Wire.beginTransmission(I2ADDR);
    Wire.write(0x00);
    Wire.write(RESET_COIL);
    Wire.endTransmission();
    delay(1);
    Wire.beginTransmission(I2ADDR);
    Wire.write(0x00);
    Wire.write(SET_COIL);
    Wire.endTransmission();
    delay(1);
}