Show Posts
Pages: 1 ... 12 13 [14] 15
196  Using Arduino / Microcontrollers / Can't upload sketches on freshly burned Atmega8? on: February 29, 2012, 10:07:11 pm
So I bought an Atmega8 with no bootloader on it. I uploaded the ArduinoISP sketch on my Uno, and hooked it up to my Atmega8 like this: http://arduino.cc/en/uploads/Tutorial/BreadboardAVR.png
Then, in Arduino 0022, I selected the "arduinoNG w/ Atmega8", and clicked burn bootloader > w/ arduino as ISP. After A few seconds I got the message that it was done. Problem is, I can't upload upload any sketches to the Atmega8. I'm using my Uno as a USB to serial converter, and hooking up the reset, TX, and RX pins to the Atmega8 like this:
http://arduino.cc/en/uploads/Tutorial/ArduinoUSBSerial.png
After selecting "arduinoNG w/ Atmega8" and pressing upload, all I get is the occasional rapid blinking from an led I hooked up to pin 13 and this error message from Arduino 0022 "avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51"
I'm trying to load the blink sketch. Any ideas? I'm new to all this bootloading stuff so I'm really surprised i even got this far.
197  Using Arduino / Project Guidance / Re: Is it necessary to connect all GND's and VCC's on a standalone board? on: February 17, 2012, 03:05:39 am
@winner10920 It's a hand drawn (with a sharpie as resist ink), home etched board, so using a TQFP is hard enough as it is and the less traces I have to run to the IC, the easier it will be to draw the board.

@Techone I decided to build up a breadboard arduino with a DIP atmega328, just to be completely sure. It seems, however, that I only have to hook up one GND and one VCC pin on the chip in order to get it to work, so I assume all the extra GND and VCC pins are internally connected together. Have you experienced any problem by not connecting all the power pins? Or is the atmega8 different in some way?
198  Using Arduino / Project Guidance / Is it necessary to connect all GND's and VCC's on a standalone board? on: February 16, 2012, 07:08:29 pm
So I'm working on my first standalone board with an IC on it, in this case an atmega8 in a TQFP-32 package. I was wondering if it's absolutely necessary to connect every single VCC and GND pin on the IC, or if I can just hook up whichever power pins are most convenient. In my case it would be really nice if I only had to hook up one VCC and GND pin, as it would save the frustration of trying to hook all the power pins together.
199  Using Arduino / Displays / Re: Which LCD display should I buy? on: February 02, 2012, 07:11:00 pm
Wow, thanks for the info Bill, I could only find the HD44780 for $20 with another $20 shipping to Canada before this! Tayda Electronics also seems like a great place, with only $2 shipping. I guess this is the way to go.
200  Using Arduino / Displays / Re: Which LCD display should I buy? on: February 02, 2012, 03:38:55 am
Well it seems that you're the opposite of me  smiley-grin  Being only 14 and pressed on money, I'd much rather get the cheaper parallel display and add a shift register, although I had considered doing serial originally. Plus it will be a learning experience, as I've never used a parallel device. Luckily time isn't an issue either for this project.
201  Using Arduino / Displays / Which LCD display should I buy? on: February 02, 2012, 02:20:16 am
So, there seem to be hundreds, if not thousands, of LCD's available. I've narrowed it down to about 30 so far and I need help picking the right one for projects to come. Any one of these:

http://ca.mouser.com/Optoelectronics/Displays/LCD-Displays/LCD-Character-Display-Modules/_/N-6j737?P=1z0ypn7Z1z0wsxbZ1z0wrxyZ1z0wry3Z1z0wrxtZ1z0wry2Z1yzxq7eZ1yzuuf6Z1z0wtzzZ1z0wsy4Z1z0wrybZ1yzuuf7Z1z0wry1Z1z0wrxsZ1z0wrxzZ1z0wul9Z1z0x81tZ1z0wumiZ1z0wuleZ1z0wukmZ1z0wula&Ns=Pricing

should work just fine (I only need character display), but I'd like to know if any of you have had problems with them, or can recommend a better one. I'm buying a bunch of 74HC595 shift registers as well, so arduino pin count shouldn't be an issue (only have 5 pins left!).
The display must, therefore be parallel. 16x2 minimum.
Currently I'm thinking of getting this one:

http://ca.mouser.com/ProductDetail/Newhaven-Display/NHD-0216BZ-RN-YBW/?qs=sGAEpiMZZMt7dcPGmvnkBncbWZknnCVih0jgiiLJclA%3d

as it's the cheapest one, although poorly documented.
All suggestions welcome as I can only pretend to know what I'm talking about when it comes to LCD's
202  Using Arduino / Motors, Mechanics, and Power / Re: How to stop a stepper motor from holding/locking? on: December 23, 2011, 01:20:19 am
Alright, sending a LOW with digitalWrite() to every pin on the h bridges seems to do the trick (didn't work the first time I tried though...) , I guess I'll hook the big power supply back up and hope it all works.
203  Using Arduino / Motors, Mechanics, and Power / Re: Connecting ground of arduino to ground of power supply? on: December 22, 2011, 02:17:04 am
yes
204  Using Arduino / Programming Questions / Re: Switch case: always default case on: December 21, 2011, 08:18:30 pm
 if (digitalRead(button2)==LOW) {
    LEDcase==2;
      whichLED(LEDcase);
  }

should be

 if (digitalRead(button2)==LOW) {
    LEDcase=2;
      whichLED(LEDcase);
  }

== checks for a value

= assigns a value
205  Using Arduino / Motors, Mechanics, and Power / Re: How to stop a stepper motor from holding/locking? on: December 21, 2011, 07:58:10 pm
@wortelsoft I'm using an h bridge made of discrete transistors that I ripped out of some remote control car a while ago, obviously no enable pin there smiley-sad

@MarkT Version 0.4 of the standard stepper library that comes with the arduino IDE.

After googling I found that the AFmotor library has a release() function which seems to do what I need, but I don't know how I should hook up my stepper motor, since AFmotor is supposed to be used with the motor shield. Currently the stepper is connected with all four wires going to seperate pins.
206  Using Arduino / Motors, Mechanics, and Power / How to stop a stepper motor from holding/locking? on: December 21, 2011, 12:43:06 am
Is there anyway I can stop powering my stepper motors after they're done doing what they need to do? Seeing as I don't have a proper power supply for them, they tend to get hot after just a few minutes, even though they're rarely in use. I don't need them to lock when not in use, so is there anyway to turn them off with the stepper library?
207  Using Arduino / Sensors / Re: Strange sensor interference? on: August 18, 2011, 04:45:13 am

The Arduino only hjas one ADC which is multiplexed. If readings differ too much they interfere.

solutions:
* do double readings and ignore the first (see below)
* do multiple readings and average them (exercise for you smiley-wink
* do a running average  e.g. temp = (2 * analogRead() + 14 *temp) / 16;
* take care there is enough time between the readings  (move reading of light after Serial prints (temp)

Code:
int tempPin = A5;//temp sensor
int lightPin = A0;//photoresistor, hooked up between A0 and ground - pulled high

int light = 0;
int temp = 0;

void setup() {
  Serial.begin(300);
 
  pinMode(lightPin, INPUT);
  pinMode(tempPin, INPUT);
 
  digitalWrite(lightPin, HIGH);// pull photoresistor high
}

void loop()
{
  // read sensors
  analogRead(tempPin);
  temp = analogRead(tempPin);
 
  analogRead(lightPin);
  light = analogRead(lightPin);
 
  //send data to computer for graphing
  Serial.print("t");
  Serial.print(temp, DEC);
 
  Serial.print("l");
  Serial.print(light, DEC);
 
  delay(100);
}

Thanks, the code works perfectly but I'm still not really understanding the problem. This is how I understand it: I tell the arduino to read a pin, it sends the voltage through the ADC and stores the number it gets in the ram, then it clears the ADC and switches to the next pin...

So how could there be interference in the values?

Also, "take care there is enough time between the readings  (move reading of light after Serial prints (temp)"

I tried that and it worked aswell, yet if I use my original code with a very generous 100ms delay(far more than serial printing) between reading the temp pin and the light pin I get the same interference.
208  Using Arduino / Sensors / Strange sensor interference? on: August 18, 2011, 01:37:07 am
Hi, I have a lm19 temperature sensor and a photo resistor hooked up to analog inputs of my arduino and I'm getting some very strange readings. I dont think my code is the problem but here it is just in case:
Code:
int tempPin = A5;//temp sensor
int lightPin = A0;//photoresistor, hooked up between A0 and ground - pulled high

int light = 0;
int temp = 0;

void setup() {
  Serial.begin(300);
 
  pinMode(lightPin, INPUT);
  pinMode(tempPin, INPUT);
 
  digitalWrite(lightPin, HIGH);// pull photoresistor high
}

void loop() {
  // read sensors
  temp = analogRead(tempPin);
  light = analogRead(lightPin);
 
  //send data to computer for graphing
  Serial.print("t");
  Serial.print(temp, DEC);
 
  Serial.print("l");
  Serial.print(light, DEC);
 
  delay(100);
}

So the problem is that as the light level drops below the temperature level, I get erratic readings from the temperature sensor. I posted a picture of one of the readings I graphed, where green is light and red is temperature. The only thing I can think of is adding a capacitor between ground and the temp. sensor Vout pin but really I'd just like to know what's causing this interference.

Thanks.



Uploaded with ImageShack.us

209  Using Arduino / Microcontrollers / Found a PIC16f716... how to use? on: August 13, 2011, 01:09:31 am
So I found a PIC16f716 in an old lipo battery charger (i think it controlled the blinking charge LED), and I was wondering what software and hardware I need to hook it up to my computer and program it, or maybe if I could program it from my arduino? I have a serial port and USB ports on my computer, so could someone direct to some links? thanks.
210  Using Arduino / Programming Questions / Re: insert a carraige return? on: July 29, 2011, 10:02:14 pm
thanks for the quick reply. and even more for the refference. Will use it again!
Pages: 1 ... 12 13 [14] 15