Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Development / Better ADCs on: July 24, 2007, 06:09:20 pm
Is there any adruino compatible atmega variant with 12 to 16 bit ADCs?


Has anyone any luck with external ADCs?  Preferably PDIPs?

Thanks in advance!
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino NG rev c borked out of the box on: April 06, 2007, 05:35:42 pm
Figured it out: was programminmg the atmega8, not the 168.  Fixed.
3  Forum 2005-2010 (read only) / Troubleshooting / Arduino NG rev c borked out of the box on: April 06, 2007, 04:49:16 pm
I just recieved a bunch of arduino ng rev C's, psyched because I don't have to hack the resistor anymore, BUT the serial port seems broken.  

I have some code that works fine on older arduino NG's and pre NG, and when I load it to the rev C nothing happens.

In fact, even this simple bit of code:doesn't work


Code:
void setup()
{
  Serial.begin(9600);
}

void loop()
{
   Serial.println("test");
   delay(1000);
}

The only clue I have is that the firmware on the rev c's reads 1.15, and on the older ones it's 1.18.

Thanks in advance,

Dan

4  Forum 2005-2010 (read only) / Troubleshooting / Re: SPI Stall on: December 12, 2006, 12:14:49 pm
If someone else could try that code and see if it stalls that would be great: I've tried it on two different units and it seems to on both, when I  comment out the write_spi line in the loop it doesn't stall, so I'm guessing that the error is related to that.

5  Forum 2005-2010 (read only) / Troubleshooting / Re: SPI Stall on: December 12, 2006, 11:10:19 am
What is bizarre is that the stall occurs regardless of what is hooked up to the board:  If I take an Arduino that has nothing attached except the LED, it stalls.

I will try the other clock modes.  Thanks!
6  Forum 2005-2010 (read only) / Troubleshooting / Re: SPI Stall on: December 12, 2006, 02:28:14 am
Ah thanks: is this the case even if I don't have an NG board, mine looks different from the one in the picture so I'm not sure what to modify.  
7  Forum 2005-2010 (read only) / Troubleshooting / SPI Stall on: December 11, 2006, 11:47:30 pm
I'm trying to get the SPI working, and it seems to be stalling when using the write_spi function with the potentiometer example.  I'm using an arduino non ng usb.  I'm using a different pot, it works sometimes but "stalls" most of the time.  The code I'm using has the pot acting a voltage divider, ADC 0 measures the potential on the Wiper, the A terminal is at 5V and the B terminal is grounded.  An external LED (on pin 7) turns on before the spi write and off right after (this is how I detect the stall, the LED won't turn off).  

Anyhow, here's the code:

Code:
#define DATAOUT 11//MOSI
#define DATAIN 12//MISO - not used, but part of builtin SPI
#define SPICLOCK  13//sck
#define SLAVESELECT 9//ss

byte pot=0;
byte resistance=0;
char spi_transfer(volatile char data)
{
  SPDR = data;                    // Start the transmission
  while (!(SPSR & (1<<SPIF)))     // Wait the end of the transmission
  {
  };
  return SPDR;                    // return the received byte
}

void setup()
{
  Serial.begin(9600);
  byte i;
  byte clr;
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  digitalWrite(6,LOW);
    digitalWrite(7,LOW);
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(SLAVESELECT,OUTPUT);
  digitalWrite(SLAVESELECT,HIGH); //disable device
  // SPCR = 01010000
  //interrupt disabled,spi enabled,msb 1st,master,clk low when idle,
  //sample on leading edge of clk,system clock/4 (fastest)
  SPCR = (1<<SPE)|(1<<MSTR);
  clr=SPSR;
  clr=SPDR;
  delay(10);


}

byte write_pot(int value)
{
  digitalWrite(SLAVESELECT,LOW);
  //3 byte opcode
  spi_transfer(64);
  spi_transfer(0);
  spi_transfer(value);
  digitalWrite(SLAVESELECT,HIGH); //release chip, signal end transfer
}

void loop()
{
  
  digitalWrite(7,HIGH);
 write_pot(100);
  pot++;

  Serial.print(pot);
  Serial.print(" : ");
  Serial.println(analogRead(0));
    digitalWrite(7,LOW);
      delay(1000);
}

I'm new to SPI, but even with the chip unhooked the code stalls, so I'm wondering if there's a problem with the Arduino, I've read about problems with the NG but this is the old one.

Thanks in advance.

8  Forum 2005-2010 (read only) / Development / Re: Automatic switching to battery on mains failure? on: March 30, 2010, 10:57:52 am
The easiest way to do this use something off the shelf like this:

http://www.sparkfun.com/commerce/product_info.php?products_id=726

Attach a battery (any small lithium ion will do), and apply mains power through a standard AC adapter.  When power is cut to mains the battery is both charged and ready to go.  
9  Forum 2005-2010 (read only) / Development / Re: ROARduino - A power-board on: June 05, 2010, 03:05:52 pm
Does it exist?  

Dan
10  Forum 2005-2010 (read only) / Development / Re: inexpensive source for wifi and lcd display on: April 07, 2010, 12:56:30 pm
The BlackWidow (http://asynclabs.com/) is pretty darn nice, and the gerbers are available so if you were to scale up you could integrate it into your own board.
11  Forum 2005-2010 (read only) / Development / Re: Hints on switching power regulators on: March 24, 2010, 09:22:33 pm
@pluggy the problem is that this won't work well with NiMH cells
12  Forum 2005-2010 (read only) / Development / Re: Hints on switching power regulators on: March 24, 2010, 07:31:28 pm
TI makes a nice DC DC converter:

http://www.ti.com/corp/docs/landing/tps63000/index.htm

They've got standard circuit examples.  What's nice about this guy is that you could, if you wanted to push it, use a single AA cell.

13  Forum 2005-2010 (read only) / Exhibition / Re: XmegaDuino alpha 1 ready to test. on: March 25, 2010, 06:23:58 pm
This is great.  I was just moaning about a lack of DACs and 12 bit AIO.  I'm more than happy to help test, I'll be picking up the xplain board to mess around with it.
14  Forum 2005-2010 (read only) / Exhibition / BlackWidow + SHT11 on: April 04, 2010, 09:12:46 pm
A quick project to test the functionality of the BlackWidow Arduino with WiFi from AsyncLabs (http://asynclabs.com/).  

Using a Sensiron SHT11 (originally intended for a Sentilla JCreate), code swiped for the Arduino from here (http://www.railsimstuff.com/files/SHT11.pde) and modified to be pin correct with the Sentilla part.

The BlackWidow is working wonderfully so far.  Connected to my Airport Extreme with WPA2 right away using the base WiServer code.  I've got a python script running a get request to the unit on my roof every 5 minutes, and then display the data on my home PC like so:

http://dansteingart.doesntexist.org:8080/

Not rocket science, but this project showed me why folks are all hot and bothered by IP at node: any computer in my house (and on the web at large if I port forward) can directly access a node sitting 50 ft above my WiFi AP on the roof of my apartment.  Now all that's happening is sensing (I've set it up so I get check all the ADCs as well as the Sensiron part), but it would take little effort to get actuation going via servos and LEDs.  Again, all through simple web calls.

The beauty of the BlackWidow: it took me all of 3 hours to get this going from node to web interface (including patching serious lapses in my python and C syntax memory).  

I am psyched, and looking for excuses to buy a few more.  

What's next: solar power with night-time battery draw.  This was a snap for the JCreate, but it's going need to be a bit larger given the power requirements of the WiFi part, particularly since it's in constant receive mode.
15  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Protoboard on: April 01, 2010, 10:14:50 pm
Purdy.  Great Stuff.  
Pages: [1] 2