The Alpha Geek – Geeking Out

SparkFun

SparkFun

SparkFun: SparkFun Decade Resistance Box

SparkFun: KIT-13006

SparkFun Decade Resistance Box

Description

This is the SparkFun Decade Resistance Box, an involved PTH soldering kit that allows you to quickly and accurately dial in a specific resistance value between 0 and 999,990 Ohm, in 10 Ohm increments. The concept is simple, a decade box is a tool that contains resistors of many values that can be accessed via mechanical switches. All you need to do is just adjust the knobs to output any of the discrete resistances offered by the box. Once assembled, each kit will have controls that correspond to the digits in a decimal number – a control for the tens position, a control for the hundreds position, and so on.

Includes

1 x Decade Resistance Box PCB
1 x Red Binding Post
1 x Black Binding Post
5 x Rotary Switch – 1-pole 10-position, with dress washer and hex nut
9 x 10 Ohm Resistor – ¼ W, 1%
9 x 100 Ohm Resistor – ¼ W, 1%
9 x 1000 Ohm Resistor – ¼ W, 1%
9 x 100K Ohm Resistor – ¼ W, 1%
9 x 10K Ohm Resistor – ¼ W, 1%

Don Luc

Programming: Tri-Axis Gyro – L3G4200D – Arduino

DonLuc1802Mk03.ino

// ***** Don Luc *****
// Software Version Information
// DonLuc1802Mk03 1.0

#include <Wire.h>

#define CTRL_REG1 0x20
#define CTRL_REG2 0x21
#define CTRL_REG3 0x22
#define CTRL_REG4 0x23
#define CTRL_REG5 0x24

int L3G4200D_Address = 105; //I2C address of the L3G4200D

int x;
int y;
int z;

void setup(){

  Wire.begin();
  Serial.begin(9600);

  Serial.println("starting up L3G4200D");
  setupL3G4200D(2000); // Configure L3G4200  - 250, 500 or 2000 deg/sec

  delay(1500); //wait for the sensor to be ready 
  
}

void loop(){
  
   getGyroValues();  // This will update x, y, and z with new values

  Serial.print("X:");
  Serial.print(x);

  Serial.print(" Y:");
  Serial.print(y);

  Serial.print(" Z:");
  Serial.println(z);

  delay(100); //Just here to slow down the serial to make it more readable
  
}

void getGyroValues(){

  byte xMSB = readRegister(L3G4200D_Address, 0x29);
  byte xLSB = readRegister(L3G4200D_Address, 0x28);
  x = ((xMSB << 8) | xLSB);

  byte yMSB = readRegister(L3G4200D_Address, 0x2B);
  byte yLSB = readRegister(L3G4200D_Address, 0x2A);
  y = ((yMSB << 8) | yLSB);

  byte zMSB = readRegister(L3G4200D_Address, 0x2D);
  byte zLSB = readRegister(L3G4200D_Address, 0x2C);
  z = ((zMSB << 8) | zLSB);
  
}

int setupL3G4200D(int scale){

  // Enable x, y, z and turn off power down:
  writeRegister(L3G4200D_Address, CTRL_REG1, 0b00001111);

  // If you'd like to adjust/use the HPF, you can edit the line below to configure CTRL_REG2:
  writeRegister(L3G4200D_Address, CTRL_REG2, 0b00000000);

  // Configure CTRL_REG3 to generate data ready interrupt on INT2
  // No interrupts used on INT1, if you'd like to configure INT1
  // or INT2 otherwise, consult the datasheet:
  writeRegister(L3G4200D_Address, CTRL_REG3, 0b00001000);

  // CTRL_REG4 controls the full-scale range, among other things:

  if(scale == 250){
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00000000);
  }else if(scale == 500){
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00010000);
  }else{
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00110000);
  }

  // CTRL_REG5 controls high-pass filtering of outputs, use it
  // if you'd like:
  writeRegister(L3G4200D_Address, CTRL_REG5, 0b00000000);
  
}

void writeRegister(int deviceAddress, byte address, byte val) {
  
    Wire.beginTransmission(deviceAddress); // start transmission to device 
    Wire.write(address);       // send register address
    Wire.write(val);         // send value to write
    Wire.endTransmission();     // end transmission
    
}

int readRegister(int deviceAddress, byte address){

    int v;
    
    Wire.beginTransmission(deviceAddress);
    Wire.write(address); // register to read
    Wire.endTransmission();

    Wire.requestFrom(deviceAddress, 1); // read a byte

    while(!Wire.available()) {
      
        // waiting
        
    }

    v = Wire.read();
    return v;
    
}

Don Luc

SparkFun – SPDT Slide Switch

SparkFun COM-09609 Mk01

SparkFun COM-09609 Mk02

SparkFun COM-09609 Mk03

SparkFun: COM-09609

Description: This is a simple SPDT slide switch – great for use as an ON/OFF button, or just as a general control switch. The pins are spaced by 0.1″, however they are incredibly thin making breadboard use not recommended. The switch is rated for 0.3A at 50VDC.

This switch is just a bit smaller than our popular SPDT Mini Power Switch, but uses the same pin spacing. Being smaller takes up less PCB space (good!), but it does make it a bit harder to hit and flip easily.

Don Luc

SparkFun – Dual/Quad Power Amplifier – STA540

SparkFun COM-09557 Mk01

SparkFun COM-09557 Mk02

SparkFun: COM-09557

Description: The STA540 from STMicro is a 4-channel, class AB audio amplifier designed for high quality sound applications. The four independent channels makes this amplifier a great choice for a number of projects, with needs ranging from four speakers stereo (F/R) to two-speaker bridge solutions. The chip accepts a voltage supply ranging from 8 to 22VDC and has very high output power capability.

This chip comes in a staggered-lead Multiwatt-15 package. While our breakout board for the L298N isn’t designed for it specifically, it will breakout out all pins of the STA540 to a more standard single row of 0.1″ pitch headers. Also, keep an eye out for some upcoming amplifier products based on this chip!

It works great with the 6400BG Heatsink!

Features:

  • High output power capability
  • Standby function (CMOS compatible)
  • Minimum external components count:
      no bootstrap capacitors
      no Boucherot cells
      internally fixed gain 20 dB
  • No audible pop during standby operations
  • Diagnostic facilities:
      clip detector
      output to GND short-circuit detector
      output to VS short-circuit detector
      soft short-circuit check at turn-on
      thermal shutdown warning
  • Output AC/DC short circuit protection
  • Soft short-circuit check at turn-on
  • Thermal cutoff/limiter to prevent chip from overheating

Don Luc

SparkFun – Piezo Speaker – PC Mount 12mm 2.048kHz

SparkFun COM-07950 Mk01

SparkFun COM-07950 Mk02

SparkFun COM-07950 Mk03

SparkFun: COM-07950

Description: This is a small 12mm round speaker that operates around the audible 2kHz range. You can use these speakers to create simple music or user interfaces.

Each speaker is PTH solderable and requires an operating voltage of 3.5-5V with a mean current of 35mA max. These speakers also have a typical sound output of 95 dBA and a coil resistance of 42 ±6.3 ohms. Many people call this a buzzer but it is not. The piezo element requires a square wave (common from most microcontrollers) to produce a tone.

Don Luc

Categories
Archives