Electronics:

-Transistors


Transistors are too important components to be left outside of this website. I wont make justice to their importance. But I also hope to be iterating this website and to use it as my future documentation, where I come to remind myself of how I pulled "that" one off.

-Linear Voltage Regulator

Datasheet ZLDO1117

This is it:

Bueno Board V2 01

Beautiful, is it not?! But what tha heck is this, you might ask. It is quite straight forward. This is a SM (surface mount) Voltage regulator ZLDO1117G50TA. If you have a voltage you wish to operate your device with, let's say 5V for your microcontroler. But the have only a 9V power supply, or your solar panel provides you only with, say, 9V. This little device will "convert" the 9V you're prividing into the 5V you desire.

This is the map of the "HOW":

Bueno Board V2 01

This happy top view above means: 3- Voltage In (V_in). This is the voltage you have, as the example I gave, 9V. 1- Ground. This is where you'll connect your ground, the "negative" of your circuit. 2- There you go, the Voltage out (V_out) is the voltage already regulater to 5V. There are Voltage Regulators os different V_out's. This one provides you with 5V, no matter what you input it. Given the limits below. Respect it or fry your system :,(

Bueno Board V2 01

Basically, converting up to 10V into 5V will allow you to operate on up to 1 amp of current. Above 10V, as the above graph demonstrates, the amount of current will suffer. More for more details, as always, I suggest you to get familiar in reading the datasheet. Get familiar with reading datasheets generally. You'll start picking up the therms.

-IMU // 3D accelerometer and 3D gyroscope


This sensor just got to my favorite's list. Simply because of the amount of projects you can integrate this sensor to. This one specifically is the AltIMU-10 v5, from Polulu. Here is its datasheet and its Arduino's Library. You've probably seen Camera gimbal stabilizers. They use these tiny devices:

IMU Polulu
IMU Polulu
AltIMU-10 v5 component at Polulu's website.

Wiring

Wiring the Imu is fairly straight-forward:

5V Arduino boards: (This one I used for the Bueno Board) (including Arduino Uno, Leonardo, Mega; Pololu A-Star 32U4)

Arduino   LSM6 board
-------   ----------
     5V - VIN
    GND - GND
    SDA - SDA
    SCL - SCL


3.3V Arduino boards: (including Arduino Due)

Arduino   LSM6 board
-------   ----------
    3V3 - VIN
    GND - GND
    SDA - SDA
    SCL - SCL


Code

I'm helping Sophie with her final project and we're combining RGB LEDs with these IMU modules. She'll have one on each arm and she'll dance hip-hop (She rocks the dance floor. Yes, spoiling a bit). So far we got this far with the code:

/*

The sensor outputs provided by the library are the raw

16-bit values obtained by concatenating the 8-bit high and

low accelerometer and gyro data registers. They can be

converted to units of g and dps (degrees per second) using

the conversion factors specified in the datasheet for your

particular device and full scale setting (gain).



Example: An LSM6DS33 gives an accelerometer Z axis reading

of 16276 with its default full scale setting of +/- 2 g. The

LA_So specification in the LSM6DS33 datasheet (page 11)

states a conversion factor of 0.061 mg/LSB (least

significant bit) at this FS setting, so the raw reading of

16276 corresponds to 16276 * 0.061 = 992.8 mg = 0.9928 g.

*/


#include <Wire.h>
#include <LSM6.h>

int ledR = 3;           // the PWM pin the LED is attached to
int ledG = 5;           // the PWM pin the LED is attached to
int ledB = 6;           // the PWM pin the LED is attached to

LSM6 imu;

char report[80];



void setup()

  pinMode(ledR, OUTPUT);
  pinMode(ledG, OUTPUT);
  pinMode(ledB, OUTPUT); 

  Serial.begin(9600);

  Wire.begin();

  if (!imu.init())

  {

    Serial.println("Failed to detect and initialize IMU!");

    while (1);
  }

  imu.enableDefault();
}



void loop()

{

  imu.read();

// This was on the original example "Serial" from the LSM6 Library:

/*snprintf(report, sizeof(report), "A: %6d %6d %6d    G: %6d %6d %6d",

    imu.a.x, imu.a.y, imu.a.z,

    imu.g.x, imu.g.y, imu.g.z);

   Serial.println(report);

*/


int gyroX = imu.a.x;
int gyroY = imu.a.y;
int gyroZ = imu.a.z;

//Remapping the results from the IMU to 8bits RGB LEDs:
gyroX = map(gyroX, -20000, 20000, 0, 255);
gyroY = map(gyroY, -20000, 20000, 0, 255);
gyroZ = map(gyroZ, -20000, 20000, 0, 255);


Serial.print("GyroX:");
Serial.println(gyroX);

Serial.print("GyroY:");
Serial.println(gyroY);

Serial.print("GyroZ:");
Serial.println(gyroZ);


  // set the brightness of pin 3, 5, 6:

  analogWrite(ledR, gyroX);
   analogWrite(ledG, gyroY);
    analogWrite(ledB, gyroZ);


//To be maybe considered:
 // change the brightness for next time through the loop:
//  brightness = brightness + fadeAmount;


//To be maybe also considered:
/* reverse the direction of the fading at the ends of the fade:
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount; }
wait for 30 milliseconds to see the dimming effect
delay(30);
*/


  delay(100);

}

Using as well an IMU, these guys did something Very cool!



home