Tag Archives: model

Miniature

It seems easy at the beginning, but the things they build are stunning.

But what really amazes me it’s not the things they do but the things they cook. Amazing!

 

Advertisements

3D light stand

The next project is building a stand with a mirror and lights to display figures, models and whatever looks cool on it. It is not aimed to be a tutorial. For a 3D printing tutorial visit my post about 3D printing.

I had a circular mirror, and my idea was to build a base for it which could hold some LEDs inside to add lights to the project. So I started by making a 3D model of the base with Blender.

base

Next step, using the service provided by 3D Hubs, I printed the base through my favourite printing company 4Delta.

baseThis time I could take some pictures while the base was being fabricated.

Once finished, I check the size and it fitted perfectly with my mirror.

IMAG3703

For the lights I choose to use common LEDs (drain about 2V and 10mA) and I’ll be powering them in parallel through the USB (5V). In order to limit the current delivered by the USB, I added a 240 Ohm resistor to each LED. This configuration will power each LED at the correct voltage and provide about 12 mA per LED. By the way taking into account that this USB can provide up to 1A, then I can power 100 LEDs, so there is no problem powering up my 8 LEDs.

The next step is putting everything together. Ideally I will use SUGRU to glue the parts, but for now I will only use Blu-Tack which can be easily removed. I will use SUGRU later own to make it permanent if I’m happy with the design.

With this, the project is finished and ready to display figures.

IMAG3735 IMAG3752 IMAG3756

Arduino +RF Link Transmitter/Receiver (434MHz) + ZUMO shield

A few months ago I create some tutorials about how to use Arduino and the XBee to do radio-frequency.

Python + Arduino + XBee + Zumo robot

XBee 002: radio-chat between PC and Arduino

XBee 001 Basic example: radio-chat between 2 PC

Today I’m going to show you how to do it with the cheap RF link modules.

So, first of all, thanks to Coolcomponents for providing an excellent customer service (basically, even if you order one or two components, they deliver within one or two days at a very low extra cost).

transbluecoolcomplogo4Second, materials. I’m reusing 2 Arduino boards (Duemilanove with chip Atmega 328, and UNO), and the Zumo robot from previous post, plus 2 LEDs, one potentiometer, a few wires, one battery (not in the picture), a small cardboard box, and the RF modules (which I bought from Coolcomponents):

RF Link Transmitter – 434MHz

RF Link Receiver – 4800bps (434MHz)

IMAG2568

Before starting the main project, let’s do a warm up with a basic example on how to work with these RF modules.

Introduction project.

We start by naming the connectors in the RF link modules (spreadsheet for receiver / transmitter). It is good to bend the antenna pins, otherwise when using a breadboard they will be inserted into the breadboard connectors and result in range reduction.

rf-link

Now for the circuit. We basically read an analog value from the variable resistor on the Duemilanove board, transmit it using the RF transmitter to the RF receiver connected to the UNO board, and light red/yellow LED depending on the value.

RF-link

The value of the resistor in the potentiometer is not important as we will convert it to a value between 0 and 5V. For the LEDs, as they are standard ones, it is OK to attach them to digital outputs.

The next step is the code. In order to achieve a good signal (these modules has a lot of noise), we need to get the RadioHead library (Originally it was VirtualWire, but it has been discontinued and now RadioHead is the one being used). You can download the last version, from here. (If you wonder how to connect these circuits to the Arduino, look at the “Detailed description here).

Once you have it, add it to the Arduino IDE.

virtualwire library

Once the library is added to the Arduino library list, everything is ready to upload the code. Here it is the code for the transmitter.

// Modified version of ask_transmitter.pde by RadioHead
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver;

void setup()
{   
  //LED indicates message sent.
  pinMode(13,OUTPUT); 
  Serial.begin(9600);
  //For some reason, this is needed to initialize the driver
  if (!driver.init())
  {
    Serial.println("init failed");
  }
}

void loop()
{
  char msg[4];
  //Read the voltage in the potentiometer.
  float voltage= analogRead(0)* (5.0 / 1023.0);
  //Convert it to string
  dtostrf(voltage,1,1,msg);  

  //Send the message and wait to check if it was sent.
  driver.send((uint8_t *)msg, strlen(msg));
  driver.waitPacketSent(); 
        
  //Flash LED to indicate message sent.
  digitalWrite(13,1);
  delay(200);
  digitalWrite(13,0);
  delay(200);
}

This is for the receiver.

//  Modified version of ask_receiver.pde by RadioHead
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to receive messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) receiver with an Rx-B1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
RH_ASK driver;
float Sensor1Data;
char Sensor1CharMsg[4];
void setup()
{
  //LED indicates message sent.
  pinMode(13, OUTPUT);
  Serial.begin(9600); // Debugging only.
  //For some reason, this is needed to initialize the driver.
  if (!driver.init()) {
    Serial.println("init failed");
  }
  //These are for the LEDs
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);

}
void loop()
{
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);
  if (driver.recv(buf, &buflen)) // Non-blocking
  {
    int i;
    // Message with a good checksum received, dump it.
    for (i = 0; i < buflen; i++) { // Fill Sensor1CharMsg Char array with corresponding // chars from buffer. Sensor1CharMsg[i] = char(buf[i]); } // Null terminate the char array // This needs to be done otherwise problems will occur // when the incoming messages has less digits than the // one before. Sensor1CharMsg[buflen] = '\0'; // Convert Sensor1CharMsg Char array to integer Sensor1Data = atof(Sensor1CharMsg); //Turn on the corresponding LED if (Sensor1Data > 3) {
      digitalWrite(5, HIGH);
      digitalWrite(6, LOW);
    }
    if (Sensor1Data < 2) {

      digitalWrite(5, LOW);
      digitalWrite(6, HIGH);
    }

    //Flash to indicate message received.
    digitalWrite(13, 1);
    delay(200);
    digitalWrite(13, 0);
    delay(200);
  }
}

And Voilà! With this you are able to light the red or the yellow LED just by adjusting the potentiometer.

This very basic example can be used to transmit a signal form a sensor, to do some wireless projects, or for isntance, to control a device like the ZUMO shield.

RF-link and the ZUMO.

First important thing. The ZUMO shield uses most of the timers in the Arduino board, in particular, the timer1 which is also required for the RadioHead library. So, we need to change the RadioHead library to use timer2. In order to do so, we need to edit the RadioHead library. Simply look for the library and open …Documents\Arduino\libraries\RadioHead\RH_ASK.cpp using a text editor. You need to uncomment //#define RH_ASK_ARDUINO_USE_TIMER2

radiohead

This line should be also added into your Arduino code for the receiver.

The circuits for the new project can be seen below. Basically, instead of reading one analog value, we are now reading 2, one for forward/backwards control, and the other for turning left/right. The second Arduino just sits on top of the ZUMO shield and uses a couple of wires to connect to the RF receiver.

RF-link-zumo

The code for the new transmitter is

// Modified version of ask_transmitter.pde by RadioHead
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver;

void setup()
{
  //LED indicates message sent.
  pinMode(13, OUTPUT);
  Serial.begin(9600);
  //For some reason, this is needed to initialize the driver.
  if (!driver.init())
  {
    Serial.println("init failed");
  }
}

void loop()
{
  char msg[8];
  //Read the voltage in the potentiometer.
  //This one encodes forward/neutral/backwards
  float voltage1 = analogRead(0) * (5.0 / 1023.0);
  //Read the voltage in the potentiometer.
  //This one encodes left/neutral/rigth
  float voltage2 = analogRead(1) * (5.0 / 1023.0);
  if (voltage1 > 2.6) {
    msg[0] = 'f';
  } else if (voltage1 < 2.4) { msg[0] = 'b'; } else { msg[0] = 'n'; } if (voltage2 > 2.6) {

    msg[1] = 'r';
  } else if (voltage2 < 2.4) {
    msg[1] = 'l';
  }
  else {
    msg[1] = 'n';
  }

  //Send the message and wait to check if it was sent.
  driver.send((uint8_t *)msg, strlen(msg));
  driver.waitPacketSent();

  //Flash LED to indicate message sent.
  digitalWrite(13, 1);
  delay(20);
  digitalWrite(13, 0);
  delay(20);
}

This time, just to make this example more general, we transmit characters. F for forward, b for backwards, n for neutral, l for left and r for right. The code for the receiver is

//  Modified version of ask_receiver.pde by RadioHead
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to receive messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) receiver with an Rx-B1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
//Enable timmer2 instead of timmer1
#define RH_ASK_ARDUINO_USE_TIMER2
RH_ASK driver(2000, 11, 12, 13, false);;
#include <ZumoMotors.h>
ZumoMotors motors;
float Sensor1Data;
char Sensor1CharMsg[4];
int left_speed, right_speed;
void setup()
{
  //LED indicates message sent.
  pinMode(13, OUTPUT);
  Serial.begin(9600); // Debugging only.
  //For some reason, this is needed to initialize the driver.
  if (!driver.init()) {
    Serial.println("init failed");
  }
}
void loop()
{
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);
  if (driver.recv(buf, &buflen)) // Non-blocking
  {
    int i;
    // Message with a good checksum received, dump it.
    for (i = 0; i < buflen; i++)
    {
      // Fill Sensor1CharMsg Char array with corresponding
      // chars from buffer.
      Sensor1CharMsg[i] = char(buf[i]);
    }
    // Null terminate the char array
    // This needs to be done otherwise problems will occur
    // when the incoming messages has less digits than the
    // one before.
    Sensor1CharMsg[buflen] = '\0';
    // Convert Sensor1CharMsg Char array to integer
    Sensor1Data = atof(Sensor1CharMsg);    

    //Choose the correct speeds depending on the command
    if (Sensor1CharMsg[0] == 'f') {
      left_speed = 200;
      right_speed = 200;
    }
    if (Sensor1CharMsg[0] == 'b') {
      left_speed = -200;
      right_speed = -200;
    }
    if (Sensor1CharMsg[0] == 'n') {
      left_speed = 0;
      right_speed = 0;
    }
    if (Sensor1CharMsg[1] == 'l') {
      left_speed = left_speed + 100;
      right_speed = right_speed - 100;
    }
    if (Sensor1CharMsg[1] == 'r') {
      left_speed = left_speed - 100;
      right_speed = right_speed + 100;
    }
    if (Sensor1CharMsg[1] == 'n') {
      left_speed = left_speed;
      right_speed = right_speed;
    }

    //Activate motors
    ZumoMotors::setSpeeds(left_speed, right_speed);

    //Flash to indicate message received.
    digitalWrite(13, 1);
    delay(200);
    digitalWrite(13, 0);
    delay(200);

  }
}

Now it is a matter of uploading the code to the Arduinos and pack things inside the cardboard box…

IMAG3170

…and you are ready to have some fun with the ZUMO shield.

Compared with the XBee the range is not great, but these modules are by far cheaper than the XBee, and they can be improved by adding antennas.

Science for Kids by the Royal Institution

The Royal Institution of Great Britain has introduced a series of experiments for kids.

royal institution

Here are the ones I like the most.

The next one can be turned into a nice experiment. Try for instance collecting water from different sources and test which one is more acid. Then try watering plants with them and see which plant grows more.

This is a nice variation of the water rockets experiments… with low level risk.

Nice an easy electricity experiments.

The final “lava lamp” is awesome.

The last one….

3D on the rocks (123d Catch from Autodesk)

The publicity company Tbwa Hakuhodo has taken the internet with the “3D on the rocks” campaign they created for the whisky company Suntory.

The campaign was a competition to design the best ice sculpture to put on your whisky on the rocks.

(image credit: Suntory)
(image credit: Suntory)

Unfortunately, now the competition is over, but what is interesting is how people had to submit their sculptures. It seems there is a free APP from Autodesk that allows you capturing a 3D shape with your mobile.

(image credit: Autodesk)
(image credit: Autodesk)

You just take many photos of an object from different angles and the software turns them into a 3D object.

This are for me the best models so far from the online gallery:

(image credit: Helen Goff)
(image credit: Helen Goff)
(image credit: Nastasoiu Eduard)
(image credit: Nastasoiu Eduard)
(image credit: Melu Vera)
(image credit: Melu Vera)

These are mine.

icon.png63e70f65-da0d-11e4-9f29-22000b53800cLarge
(image credit: Héctor Corte-León)
(image credit: Héctor Corte-León)
(image credit: Héctor Corte-León)

 

Terrahawks’ land train: Overlander

Early this morning I was procrastinating on the Dark Roasted Blend when land trains appear!

logo-260x240

You know I love big machines, and specially land trains. It makes me dream about planetary colonization, hard environments, and of course, post apocalyptic worlds like the one described by the Amtrak Wars saga.

This time, among all the models, I like this one.

(image credit: David Sisson)
(image credit: David Sisson)

It is a replica made by expert model builder David Sisson (visit his webpage to see other works and conventions he has attended to or plans to go).

Honestly, I never heard of this vehicle, it is called Overlander and it seems it belongs to a science-fiction series called Terrahawks (wiki and official webpage).

(image credit: wikipedia)
(image credit: wikipedia)

Terrahawks is a 80’s TV series created by Gerry Anderson & Christopher Burr. The main plot is set in the year 2020, after an alien force has destroyed NASA’s Mars base and Earth is under threat. The Terrahawks organisation, is set up to defend the planet from their secret base in South America. In order to achieve victory they develop sophisticated weapons to fight back the alien forces.

The series is no longer on air, but you can buy it on amazon

(image credit: amazon)
(image credit: amazon)

and this how it looks like.

Specially, this is how the Overlander looks like.

Amazing. I wish there is a computer game just for driving the Overlander.

.

.

.

.

As an extra… a short documentary about Gerry Anderson’s projects.