Loading...
  Show Posts
Pages: 1 ... 11 12 [13] 14 15 ... 17
181  Using Arduino / Installation & Troubleshooting / Re: Arduino constantly transmitting to serial port - unable to reprogram on: June 27, 2012, 01:23:34 pm
Why in the world did you reflash the USB chip?????

What board are you using?

There was a bug on some Uno boards causing this exact problem in Debian/Ubuntu Linux.
The bug was possible to work around by holding reset down while connecting the board to pause the sketch until the board showed up in the tools menu. Then while still holding the reset button and pressing upload and releasing the reset button at the right moment when the sketch size was reported in the debug window it would be possible to replace the sketch in flash.

The final solution was to upgrade the 8u2 with a corrected firmware and that is why the OP flashed the 8u2 chip with a new firmware.

182  Using Arduino / Project Guidance / Re: Relay spike problems on: June 26, 2012, 12:04:30 pm
I wonder whether there's some sort of electromagnetic interference - you have some hefty currents there. Given that you can trigger the problem without the Arduino doing anything, I'd suggest you run it on batteries (to rule out problems on the power supply side) and then see how much of your wiring you need to dismantle to stop the problem from happening. Does it stop when you disconnect the relay? How about when you disconnect the relay wires at the Arduino end?

Presumably if you were to disconnect *everything* then there's no way a battery powered Arduino would be reset by your garage door opener, but knowing what part of your external wiring is required for the problem to happen will tell you where to look for the problem.

You're spot on!
Interference from the wiring itself was in fact the problem. By separating the cables better i could make the problem go away.
The wires from the switch side of the relay did a loop inside my enclosure and was also connected to the external switches and the motor controller using a terminal block inside the enlosure. These wires were obviously affecting a lot of stuff on their way around my box. Removing the wire loop, letting the wires exit the box immediately after the relay and moving the terminal block out of the box seems to have solved the problem.

I wonder if the interference that triggered the interrupt was picked up by the wires between my switch S1 and Arduino D4 or if it affected the chip itself.
Would it have been possible to limit the problem a bit by pulling the D4 pin up a bit "harder" by choosing a lower resistance pull-up?
It wouldn't solve my reset problems and the hangings so it doesn't really matter though but I'm curious. Wouldn't it be possible to use quite a low resistance for the pull-up when you use a switch that connects directly to ground and that definitely will have the time to drive the pin low?

I realize that running all the cables inside the same enclosure as the chip was a bad choice but I've learned something by doing it.

Big thanks to both of you!
183  Using Arduino / Project Guidance / Re: Relay spike problems on: June 25, 2012, 06:06:08 pm
I think it's common practice to bypass the ANALOG_REFERENCE pin to ground with a 100nF capacitor. I also use 100nF caps on the 7805 input and output, in addition to the electrolytics. But I'm not real confident those will solve the problem given that it still occurs running on batteries.

What is connected to pin 17?

Thanks, I wasn't aware of that there should be any caps on AREF.
I'll see if adding that and acouple of 100nF caps on the 7805 improves anything. I will also try another power supply just to be sure.
Will post an update tomorrow.

Pin 17 is connected to the data pin of a 433MHz receiver module which I couldn't add to the schematic. It might be easy to create a part for a complete module like that but I'm a complete noob with Eagle.
184  Using Arduino / Project Guidance / [SOLVED] Relay spike problems on: June 25, 2012, 05:23:55 pm
Hi,

I have some electrical issues with a circuit and could really use some advice.

I have made an ATmega328 based custom board that controls an ancient motor for an electric garage door. Circuit attached.
The door motor has a builtin controller that starts or reverses the motor when two external connectors are shorted. Just a brief pulse is needed to start the door or to make it reverse if it was already running.
The voltage at the connectors is 24VAC. The continuous current going through when I keep the pins shorted is 700mA. I don't have a possibility to measure any spikes.

What I'm trying to do is to use a small relay to short the connectors on the motor. Relay datasheet: http://documents.tycoelectronics.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=108-98007&DocType=SS&DocLang=EN
It's possible to close the relay briefly to open and close the door just as I want but I'm suffering from spikes that makes the ATmega go crazy from time to time. In some cases it just resets the ATmega but sometimes it triggers my interrupts that should normally only be triggered by a push button (S1 in the schematic). Sometimes it hangs until power is removed.
I'm driving my relay with an NPN transistor, I'm using a flyback diode on the relay coil and I have coupling capacitors on the ATmega and on my voltage regulator but I wonder if it's enough.

Oddly enough I don't even have to trigger the motor using my relay to experience these problems.
If I open or close the door using a manual switch (S2 in the schematics) or if I short the connectors on the motor I experience the same thing.

I suspected that I could be suffering from noise on the power supply because the motor and the wall wart for my Arduino is in the same outlet but I have tried running the Arduino from batteries without any difference.

Any recommendation would be highly appreciated.
185  Using Arduino / Microcontrollers / Re: Programming a ATMega328P with Arduino bootloader on a breadboard on: June 19, 2012, 07:41:50 am
I personally like to use these http://www.sparkfun.com/products/9716
186  Using Arduino / Programming Questions / Re: Arduino Constantly Restarting on: June 18, 2012, 04:07:22 pm
What kind of routines do you have in your setup() function? Are you trying to move the servos or motors from within setup at all?

Does it stop if you disconnect the servos and/or motors?

Do you see the same problem with a blank sketch?
187  Topics / Device Hacking / Re: Dymo label printer on: June 16, 2012, 03:37:01 am
The aim is to let the Arduino print via the Dymo printhead.
I do not have a Dymo yet, but am looking for a thermal printer smaller than those big black boxes seen on sale on Arduino-sites.

I have this exact model of Dymo printer but I don't wanna open it and fool around with it because I've already had to return it twice for warranty replacement. It seems to be of quite low quality. The next time it breaks I'll be out of warranty and then I'll give it a go.
188  Using Arduino / Installation & Troubleshooting / Re: Burnt Arduino Uno Avrdude verification error on: June 16, 2012, 03:14:02 am
You can safely switch the ATmegas to see if it's the chip that you are having problems with (which it probably is).
You could try burning a new bootloader to the one you're having problems with to see if that fixes anything.

If the ATmega is broken you can just get a new empty one and bootload it yourself or you could go for one that already has the Arduino bootloader on it.
You don't mention what board you have but it seems 328 based so you should probably get an ATmega328P.
189  Using Arduino / Project Guidance / Re: Arduino Sleep Functions on: June 12, 2012, 02:12:15 pm
I got this to work, however my unit is still sucking 50mA even when asleep. Is there a way to kill the SD card and other chips to make it consume less?

You don't say what board you have but I don't think it matters.
You can only turn off features inside the Atmega. You will be stuck with pretty high power consumption from the on-board volt regulator and surrounding chips for example your USB controller.
If you want to really save power you should build a custom board with only an ATmega328P and run it straight from battery.
When I do that I get a consumption around 4uA (not mA) during sleep with nothing else attached.
If you're going to use any periferal components you will have to make sure they aren't powered during sleep.
190  Using Arduino / Microcontrollers / Re: Uploading sketch to atmega328P on: June 12, 2012, 01:39:58 pm
I think the way I got it to work initially was to use avrdude to burn the optiboot_atmega328.hex file to the board, then through the arduino IDE, upload the sketch using the "Upload Using Programmer" command under the file menu.  When I did this, I don't remember which board I had selected, but I know I was using the USBtinyISP as the programmer under the tools menu.  Again, whatever I had done worked fine for a short period, then after a few minutes, the LEDs just stopped illuminating, with the exception of the one mentioned above. 

If the Burn bootloader or Upload using programmer methods are failing it could be because of the LED you have put on the MOSI pin.

Try removing it temporarily or replace the current limiting resistor with a much bigger one. That 470 Ohm resistor will work as a pull-down resistor and might prevent SPI from working properly.
I would recommend the same for the RX led resistor.
191  Using Arduino / Project Guidance / Re: Wearable wireless sensors to detect movement and heart rate on: June 08, 2012, 06:28:33 am
For heart rate you could buy or build one of these: http://pulsesensor.com/
I'm not sure what you mean by movement but you will probably end up needing accelerometers and depending on how many you need and how responsive they need to be you may run into performance problems if you're using an Arduino.
Tell us a bit more about the movement part.
192  Using Arduino / General Electronics / Re: Is there any cheap component shop? on: June 07, 2012, 01:31:46 pm
You can buy these directly from China/Hong Kong/Thailand on eBay.
Unfortunately it takes a week or two to get the parts to EU but you really can't beat the prices.
It's not the place to go if you're looking for parts for production where it's crucial to match a certain specification but for hobby projects it's perfectly fine.
193  Using Arduino / Installation & Troubleshooting / Re: loading a program on the board without activating it on: June 07, 2012, 12:48:46 pm
This is expected.

You can add a criteria to your sketch so that it doesn't start until a certain condition is met.
There are plenty of options.
Add a button to your robot and initially wait for the button to be pressed before doing anything. Or add an on/off switch and just do nothing until it's in the on position.
194  Using Arduino / Installation & Troubleshooting / Re: Windows based Arduino IDE & Dropbox Issue on: June 07, 2012, 09:45:55 am
I have no problems opening sketches in my Dropbox folder.

It sounds like you're stuck on trying to open some shortcut on your desktop which would probably work in a native Windows application but with Java... nah.
Do you know where your dropbox folder is located?

Mine is at C:\Users\username\Dropbox in Windows 7 and if I browse there from the Arduino IDE open dialog I can open the sketches.
If you find that path hard to browse to you could create a symlink to your dropbox folder somewhere else
Code:
mklink /D C:\Dropbox C:\Users\username\Dropbox
195  International / Scandinavia / Re: Hvordan bruke AMTEL ATmega 328P-PU som en frittstående mikroprosessor? on: June 04, 2012, 03:12:18 pm

Koplet til minus på GND pinnnnene 8 og 22, samt pluss inn på VCC pinne 7. Satte krystallet mellom pinne 9 og 10, samt en kondensator fra 8 til 9 og den andre kondensatoren fra 8 til 10.

Fikk den ikke til å starte (blinke). Noen som klarer å se hva som er feil?


Du behöver koppla VCC till pinne 20 också.
Dessutom skulle jag rekommendera en pull-up resistor på reset-pinnen så att den inte blir floating och orsakar en reset när du inte vill ha det.
Testa en 10k-resistor mellan VCC och pinne 1.
Pages: 1 ... 11 12 [13] 14 15 ... 17