Show Posts
Pages: 1 ... 6 7 [8] 9 10 ... 13
106  Topics / Product Design / Re: Moving from the uno to programming AVRs. Please recommend on: February 20, 2013, 04:03:45 pm
I'm did exactly that and made a little tutorial up along the way to help others. It was actually easier then what I was expecting. That never happens: https://sites.google.com/site/0miker0/Designing-your-custom-Arduino-Board
107  Using Arduino / General Electronics / Re: Switching power sounds noisy on: January 09, 2013, 11:00:40 am
I used ceramic caps and just used whatever temperature type I could find since it will always be in a room temperature environment. Most likely X7R type. Nice. Thats something I never though of. I'll check that out as well.
108  Using Arduino / General Electronics / Re: Switching power sounds noisy on: January 09, 2013, 10:56:51 am
I have a voltage divider set for 5 volts. A fixed one would probably save me two resistors. The part is hand soldered using a microscope so the components GND pad under the part is not soldered to the board. Pins #4 and #9 are both GND and run to the center GND pad on the boards so I just hand solder those two pins.
109  Using Arduino / General Electronics / Re: Switching power sounds noisy on: January 09, 2013, 09:33:20 am
The data sheet shows the recommended parts placement. On my design I ended up putting the capacitors on the opposite side of the board. That's most likely my problem. For the next boards I'll follow the data sheets recommendations.
110  Using Arduino / General Electronics / Switching power sounds noisy on: January 09, 2013, 09:07:44 am
I created a small PCB design using a switching power supply part number TPS61200DRCR with a 4.7uH inductor LQH3NPN4R7N0L. The inductor is rated at over an amp but but design only draws 40mA. For some reason the supply sounds  very noisy. When I blink and LED I can actually hear the supply on every blink. Today I'll view the output on a scope to see if it measures noisy as well. The input and output capacitors are all the correct values according to the data sheet. Has anyone ever seen this before?
111  Using Arduino / Programming Questions / Re: Fomratting numbers on: January 06, 2013, 05:52:10 pm
I did something like this for my real time clock to display a 01,02,02...
It has a lot of other junk in there but all it really does is push the number to the right and jam a zero in front if less than 0.

  char second[2];
  int tmpsecond = bcdToDec(Wire.receive());

  if(tmpsecond < 10)
  {
   second[1] = second[0];
   second[0] = '0';
  }
  uoled.TextGraphic(112,10,SMALL_FONT,0xFFFF,1,1,second,1);
112  Community / Exhibition / Gallery / Tiny custom Leonardo design on: January 05, 2013, 03:59:37 pm
I just finished a tiny Leonardo type design that has a few different sensors on board. This one has a RTC, temperature chip, accelerometer, pushbutton and a rotary encoder. It also has the Leonardo bootloader on it which allows it to be pretty small. I'm not sure what it will do since my initial goal was to see if I could get the bootloader into an Atmega. After a few revisions I thought I would fit on as many sensors as possible. All the sensors and display are i2c so routing it was really easy. I'll start on the next one for fix the problems I've found so far. The rotary encoder is way too large so I might replace it with a 5 was navigation switch. The smallest one I've found is 12.5mm square. If you have an idea of what it can be used for then let me know. Maybe a logger of some sort. I'm no good at writing code but managed to get everything barley working last night. The unpopulated bits are the switching power supply. It works but for the weekend I just have it powered by USB to get some code into it. The layout was done in Altium so if you want the files or just the schematic as a pdf then just let me know. It was really fun.






113  Using Arduino / Displays / Re: 4D Systems Screens: A Genie for Your Arduino Sketch on: December 18, 2012, 07:33:46 am
Nice! I've used the color uOLED-128 in the past and while expensive, it is by far the most beautiful screen. I wonder if the Genie software works on just LED screens or both OLED and LCD.

114  Using Arduino / Programming Questions / Re: Displaying temperature on a MAX6951 on: December 18, 2012, 07:20:54 am
I have corrected post by posting code the proper way. Thanks PaulS.

115  Using Arduino / Programming Questions / Displaying temperature on a MAX6951 on: December 17, 2012, 01:49:10 pm
I found code for driving the MAX6951 on this site that displays digits from the serial terminal. I've modified the code and attached a 1-wire temperature ic but the digits are pushed to the far left of the display with what was zeros to the right.  0x03 in the SCANLIMIT_ADDRESS will knock off the trailing zeros but I was wondering if the temperature can easily be pushed to the right. I believe that having SCANLIMIT_ADDRESS to 0x0F and putting blank digits in the first two spots will work but I have no idea how to do this.


Code:

/*
Using SPI for interfacing to MAX6951

- pin 13      SCK      SPI clock  ,DISPLAY CLK, PIN#2    
- pin 12      MISO     SPI master in, slave out  ,NOT USED
- pin 11      MOSI     SPI master out, slave in ,DISPLAY DIN, PIN#4
- pin 10      SS       SPI slave select, DISPLAY CS, PIN#3

The default SPI configuation is as follows:

- SPI Master enabled
- MSB of the data byte transmitted first
- SPI mode 0 (CPOL = 0, CPHA = 0)
- SPI clock frequency = system clock / 4

*/
#include <studio.h>
#include <OneWire.h>  //for DS18S20 temp sensor
#include <SPI.h>  // bring in SPI Library
// SPI uses hardware Chip Select vs having device address
#define DECODE_ADDRESS 0x01// 0x07, all 8 on
#define INTENSITY_ADDRESS 0x02 // 0x07 to start, half intensity 02
#define SCANLIMIT_ADDRESS 0x03 // 0x07, all 8 on  
#define CONFIG_ADDRESS 0x04
// 0000 0001 => 0 shutdown, 1 = normal mode, no fooling with blink modes & stuff
// 0000 0010 = not used
// 0000 0100 => 0  slow blink, 1 = fast blink
// 0000 1000 => 0 = global blink disabled (Plane 1 data ignored), 1  global blink enabled Plane 1 data used)
// 0001 0000 => 0 = blink unaffected during I2C acknowledge
// 0010 0000 => 0 = data unaffected during I2C ack, 1 = data cleared
// 0100 0000 => not used
// 1000 0000 => blank phase - blink status is read back

// for this use: 0000 0101 => normal operation, fast blink
#define DISPLAYTEST_ADDRESS 0x07 // 0x01, on, 0x00 off 07
#define DIGIT0_ADDRESS 0x20 // write Plane 0 20
#define DIGIT1_ADDRESS 0x21 // write Plane 0 21
#define DIGIT2_ADDRESS 0x22 // write Plane 0
#define DIGIT3_ADDRESS 0x23 // write Plane 0
#define DIGIT4_ADDRESS 0x24 // write Plane 0
#define DIGIT5_ADDRESS 0x25 // write Plane 0
#define DIGIT6_ADDRESS 0x26 // write Plane 0
#define DIGIT7_ADDRESS 0x27 // write Plane 0

int DS18S20_Pin = 0; //DS18S20 Signal pin on digital 0
int ColonLED=3;
const int slaveSelectPin = 10;

int led = 3;
//Temperature chip i/o
OneWire ds(DS18S20_Pin);  // on digital pin 2

void setup()
{
 Serial.begin(9600); //monitor Temp
 // define pins used - 13,12,11,10 defined by SPI
 pinMode(ColonLED, OUTPUT);
 //pinMode(SS, OUTPUT);
 pinMode (slaveSelectPin, OUTPUT);
 
 pinMode(led, OUTPUT);

 // start up SPI
 SPI.begin(); // nothing in () because we are the master

 //  write config register  
 digitalWrite(slaveSelectPin,LOW);
 SPI.transfer(CONFIG_ADDRESS);  // select the Address,
 SPI.transfer(0x05);      // select the data 5
 digitalWrite(slaveSelectPin,HIGH); // take the SS pin high to de-select the chip:
 

 //  write intensity register
 digitalWrite(slaveSelectPin,LOW);
 SPI.transfer(INTENSITY_ADDRESS);  // select the Address,
 SPI.transfer(0x00);  //DIM Display  ,0x0E is full brightness
 
 
 digitalWrite(slaveSelectPin,HIGH); // take the SS pin high to de-select the chip:
 //Serial.println("intensity register");

 // write scanlimit register
 digitalWrite(slaveSelectPin,LOW); // take the SS pin low to select the chip:
 SPI.transfer(SCANLIMIT_ADDRESS);  // select the Address,
 SPI.transfer(0x0F);      // select the data //Was 0F
 digitalWrite(slaveSelectPin,HIGH); // take the SS pin high to de-select the chip:
 
 // write decode register
 digitalWrite(slaveSelectPin,LOW); // take the SS pin low to select the chip:
 SPI.transfer(DECODE_ADDRESS);  // select the Address,
 SPI.transfer(0xFF);      // select the data, FF
 //digitalWrite(SS,HIGH);   // take the SS pin high to de-select the chip:
 digitalWrite(slaveSelectPin,HIGH);
 //Serial.println("decode register");

 //display test  
 digitalWrite(slaveSelectPin,LOW); // take the SS pin low to select the chip:
 SPI.transfer(DISPLAYTEST_ADDRESS);  // select the Address,
 SPI.transfer(0x00);      // select the data,01
 digitalWrite(slaveSelectPin,HIGH); // take the SS pin high to de-select the chip:
 delay (1000);
}


void loop()
{  
  float temperature = getTemp();
  int t = temperature*100;  //get rid of decimel point

  int ones = t%10;
  int tens = (t/10)%10;
  int hundreds = (t/100)%10;
  int thousands = (t/1000)%10;
  write_digits(0x00,0x00,ones,tens,hundreds+0x80,thousands); //0x80 is the decimal
}

static void write_digits(int u, int v,int w,int x, int y, int z)
{
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT5_ADDRESS);
   SPI.transfer(u);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT4_ADDRESS);
   SPI.transfer(v);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT3_ADDRESS);
   SPI.transfer(w);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT2_ADDRESS);  // select the Address,
   SPI.transfer(x);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT1_ADDRESS);  // select the Address,
   SPI.transfer(y);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
  
   digitalWrite(slaveSelectPin,LOW);
   SPI.transfer(DIGIT0_ADDRESS);  // select the Address,
   SPI.transfer(z);      // select the data
   digitalWrite(slaveSelectPin,HIGH);
}

float getTemp(){
  //returns the temperature from one DS18S20 in DEG Celsius

  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
      //no more sensors on chain, reset search
      ds.reset_search();
      return -1000;
  }

  if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.println("CRC is not valid!");
      return -1000;
  }

  if ( addr[0] != 0x10 && addr[0] != 0x28) {
      Serial.print("Device is not recognized");
      return -1000;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1); // start conversion, with parasite power on at the end

  byte present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE); // Read Scratchpad

  
  for (int i = 0; i < 9; i++) { // we need 9 bytes
    data[i] = ds.read();
  }
  
  ds.reset_search();
  
  byte MSB = data[1];
  byte LSB = data[0];
 
  float tempRead = ((MSB << 8) | LSB); //using two's compliment
  float TemperatureSum = tempRead / 16;
  
  float test = ((MSB << 8) | LSB);
  return TemperatureSum;
}


116  Community / Gigs and Collaborations / Re: Customized Arduino designs offered on: December 15, 2012, 07:37:33 am
I use OSHPark for my board manufacturing. 13 mil drill via holes and 6 mil width tracks. A 2"x2" two layer board is around $15 + $5 shipping and a 4 layer board that size is around $20 + $5 shipping. The only problem is that the turn around time is a month.
117  Community / Gigs and Collaborations / Re: Customized Arduino designs offered on: December 14, 2012, 07:03:39 pm
Great idea. I have also embedded my Solidworks 3d models into my Altium footprints. Ill be in touch soon.

Mike
118  Community / Gigs and Collaborations / Re: Customized Arduino designs offered on: December 14, 2012, 09:42:26 am
I use Altium Designer.
119  Community / Gigs and Collaborations / Customized Arduino designs offered on: December 14, 2012, 09:01:52 am
My full time job is PCB design work and 3D modeling so as a hobby I've made a few customized arduino boards. Over the past few months I've built up a good size schematic and footprint library using the 328P and 23U4 with TQFP and the smaller MLF footprints. So far the cheapest manufacturer I've found is OSHPark which has done a fine job. If you have a project on a breadboard and would like it much smaller on a custom board then I can possibly help.
A few examples are:
h**ps://sites.google.com/site/0miker0/Designing-your-custom-Arduino-Board

Mike
120  Using Arduino / Programming Questions / How do I create a new makefile? on: November 27, 2012, 12:15:19 pm
I would like to edit the 16Mhz frequency on the Caterina makefile to be 8Mhz. How do I actually create the new makefile after editing this line? All I have is Arduino 1.0.2 now installed. Nothing else programming related.

Mike
Pages: 1 ... 6 7 [8] 9 10 ... 13