Show Posts
Pages: 1 ... 719 720 [721] 722 723 ... 1166
10801  Using Arduino / Installation & Troubleshooting / Re: Did I just kill my Uno? on: April 11, 2011, 10:39:41 pm
For those who are reading... Amazingly, the pin is still functioning correctly!!!

The series 250 ohm resistor probably limited the current flow going through the internal positive clamping diode. However maybe your just lucky.  smiley-grin

Lefty
10802  Using Arduino / Motors, Mechanics, and Power / Re: Anyone familiar with the SN754410 on: April 11, 2011, 09:58:24 pm
http://www.sparkfun.com/datasheets/IC/SN754410.pdf

I'm not good at deciphering datasheets, but it seems like this chip has diodes in it that would work for kickback filters on my little Sparkfun gearmotor.
The diagram on page 2, where it says, "typical of all outputs". --wouldn't those 2 diodes on the right work as kickback diodes?
I'm trying to work kickback diodes into my pc board, but it would be SO much easier if I didn't have to...
thanks

Electrically they are however the example application the datasheet shown in figure 3 of page 6, shows external protection diodes being used. So perhaps the internal diodes don't have a high enough current rating and it's best to also have external diodes. Belts and suspenders perhaps?

Lefty
10803  Using Arduino / Installation & Troubleshooting / Re: Mega2560 bricked? not detected, DFU failing on: April 11, 2011, 09:50:41 pm
Quote
Anyone have any ideas for other things to check? Or ideas on what I did to get it into this state? Right now my mega is a very nice paperweight


Well you can 'half split' the problem to either the 82U or the avr2560. Press and keep holding down the reset pin (or wire a jumper from ground to the reset pin) and plug it into the PC's usb port. If the PC still doesn't see it then it has nothing to do with the last sketch loaded on the board and the problem has to be with the USB side of the board. I assume the power led lights up when you plug in the board?

Lefty

10804  Using Arduino / General Electronics / Re: Low-cost power converter for low-power Arduino? on: April 11, 2011, 08:51:48 pm
Quote
I want to build a drift buoy to send off to see if it could make it across the pacific, using ocean currents at particular depths as a conveyor and pressure sensor to determine depth.  I will have a 'report' routine where it will surface and get a GPS location, charge the batteries with a solar cell, and transmit its data points and location to me using ULF.  Obviously I want the thing to be using little-no power when it isn't collecting data or transmitting...

Now that is what I call an ambitious project. The part that would scare me as not likely is the 'call home' using ULF (ultra low frequencies). I came across some ULF systems in the military and they took pretty high power and very long antenna. Certainly it's possible as that's how US nuke subs got their launch orders even while submerged, but it's a pretty expensive power consuming method to 'call home'. I think most applications like yours use satellite uploads to send their data, but that also has expensive and complexity.

Good luck, and keep us posted on progress.

Lefty
10805  Using Arduino / General Electronics / Re: Reading potentiometer from another circuit on: April 11, 2011, 07:30:24 pm
RC is correct. You need to leave arduino Aref pin disconnected. You need two wires from your pedal circuit, a ground reference wire from the pedal to arduino ground, and a wire from the pedal wiper terminal to a arduino analog input pin. This is all conditional that the wiper to reference terminal of the pedel is always within 0-+5vdc only.

Lefty

 
10806  Using Arduino / Programming Questions / Re: The "bare minimum" sketch isn't the bare minimum ... on: April 11, 2011, 06:49:46 pm
Quote
So why try to hide it? The "real" bare minimum isn't that hard to understand, and there isn't hidden stuff going on that you don't know about.


It's 'hidden' because the C language (and C++) was designed assuming it would always be run under an operating system and main() was designed to return to the OS with either an error code or 0 if no error. As the avr chip is not running under a OS, there is no place to return to. It's more logical to have a loop() function that never returns.

 So I don't think it's a case of hiding anything from the user but rather the unique situation that a microcontroller chip running a compiled C/C++ program has no higher order OS to run under nor return to.

Lefty

10807  Using Arduino / Microcontrollers / Re: watchdog reset hardware behavior on: April 11, 2011, 06:21:00 pm
Quote
My question is:  does anyone know if a reset generated by the watchdog timer actually pulls the Atmega328's reset line low electrically?

No it does not. Figure 8.1 of the Atmel datasheet for the 328 shows that the WDT reset is applied internally and does not wire to the reset pin.


Lefty
10808  Using Arduino / General Electronics / Re: Phase change through transformer? on: April 11, 2011, 03:32:05 pm
Quote
Either way it must be physically impossible (however minute - or large) for output and input voltages to be in phase irrespective of load.  Input current produces magnetic flux and this must lag drive voltage ( CIVIL) since flux is a reaction to an action.  The output voltage can only be induced by the core flux which is already lagging the drive voltage and the output current again lags the output voltage.  Hnece the output voltage and current must lag the input voltage and current.

I don't agree with that. I still say a single phase transformer imposes no phase shift on it's own. If the secondary is wired to a pure resistive load then the secondary voltage will be in phase with the primary voltage. Now if the load wired to the secondary has inductive or capacitance reactance, then all bets are off as the old "ELI the ICE man" rule applies.

Lefty
10809  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 Serial Problem at 300 baud, but not at any other baud on: April 11, 2011, 03:10:59 pm
Quote
Any other ideas? Really appreciate your help!

Well the next step is to run as simple a sketch as possible that demonstrates the symptom. So load:


Code:
void setup() {
  // initialize serial port at desired speed:
  Serial.begin(300);
  
}

void loop() {
  // read from port 0, send to port 0:
  if (Serial.available() > 0) {
    int inByte = Serial.read();
    Serial.print(inByte, BYTE);
    
  }
}

Load and run that (no wire jumpers this time) and use the serial monitor at various baud rate (remember to change the sketch baudrate first) to see if you have the same problem at just 300 baud.

I ran it on both my Seeeduino mega board and RS-232 AVR328 board, and guess what?

All baud rates work fine EXCEPT 300 baud that garbles the data:

sent: abcdefghijklmnopqrstuvwxyz
receive: }bcfefgníîïlíîï|qrsvuvw~yzíŽ

That tells me that there is a serial library problem such that there is a problem properly setting up the baudrate divider for 300 baud support.

That's about as far as I can take it. Perhaps one of our software gods can look at the library and see what the problem may be. Perhaps there is an existing bug report for 300baud problems?

Lefty
10810  Using Arduino / General Electronics / Re: Phase change through transformer? on: April 11, 2011, 02:28:59 pm
Will the transformer's output be phase shifted with respect to its input?

And here was me thinking the question was what is quoted above

jack

Perhaps your memory was in context of 3 phase AC power transformers. The following is something I found while googling the topic:

Quote
Detla-Wye transformers appear to have very large (30 degree) phase shifts simply because of the difference in connection between primary and secondary. Through suitable interconnection of different secondary coils from a three phase primary (you may need more than three secondaries, and they may have different numbers of turns) you could get any phase shift desired. For example, special transformers are sometimes used to generate 18 phases on the secondary, each with its own phase displacement, in order to feed rectifiers and get smoother DC.

But the original question really speaks to phase shift in a single phase transformer. An ideal single phase transformer doesn't produce any phase shift; the output signal is a perfect in phase copy of the input signal. Real transformers have numerous non-idea features, and will produce a small phase shift. This can be minimized but not eliminated, by using more expensive construction techniques. It becomes an engineering problem to select a transformer with sufficiently small phase shift and distortion for any given application.



Lefty
10811  Using Arduino / Programming Questions / Re: Possible to turn off onboard power LED? on: April 11, 2011, 01:28:12 pm
First I just want to say "Hi". Bought an Arduino last week and enjoying playing with it... anyway, my question is this.

Is it possible to turn off the onboard power LED on an Arduino Uno?

And just to be clear I don't mean the LED connected to pin 13, I mean the LED near the reset switch with the word ON next to it.

Many Thanks
Stephen

No, it is 'hardwired' across the the boards +5vdc power bus and ground. However it does have a 1k ohm series resistor in series with the diode so if you just soldered a short jumper across the two led pins (probably not as easy done as said!) that would keep it from lighting up while not effecting anything else. 5ma of current would still flow through the resistor but that would do no harm.

Lefty
10812  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 Serial Problem at 300 baud, but not at any other baud on: April 11, 2011, 01:21:04 pm
Maybe a little experiment could 'half split' the problem to being either with the 8U2 usb serial converter chip or the mega2560 hardware or sketch code.

Wire a jumper from the reset pin to a ground pin, that will hold the 2560 processor in reset mode. Jumper pins 0 and 1 together. Now plug the board into the PC, open the arduino IDE, select proper comm port number and board type. Now open the serial monitor and send data. Whatever you type should be 'looped back' to the serial monitors receive window. Try various baudrate selections in the serial monitor to see if 300 baud fails and other work fine. Let us know the results of this little test.

I've tried this with both my Seeeduino mega board (avr1280 based) and a rs-232 serial board based on a 328 chip, both work fine at 300 baud.

Lefty
10813  Using Arduino / Installation & Troubleshooting / Re: Did I just kill my Uno? on: April 11, 2011, 01:07:32 pm
The voltage divider was as follows:

9v --- 250 ---- Vout ---- 250(pressure sensor) --- Grnd

So the 9v had a 250ohm resistor in line prior to the analog pin.

I used 9v to get a larger range on the ADC, however, I'm sure I could have used a lower voltage.

If the arduino was not reading that analog pin, is the circuit still complete?

That appears to be a rather strange way to interface a pressure sensor. Do you have a link for the sensor that we could look over?

Lefty
10814  Using Arduino / Interfacing w/ Software on the Computer / Re: Problem with Serial port communication on Arduino UNO on: April 11, 2011, 01:04:09 pm
Hi Everyone,

Sorry for responding so late.
I don't think I can share my code yet due to some licensing issues.
But, I have a quick question.
what is the default baud rate that the bootloader in the ATMega8U2 or ATMega328 have?

Regards,
Anil Palaparthi.

There is a file in the Arduino 'core' named boards.txt that defines the bootloader baudrate for all the supported board types that work with the standard arduino IDE distrubution. Locate your specific board from the text and see the "upload.speed=xxxxx" statement to see what baudrate it's bootloader is using:

For current IDE version .22: Note: partial list as file is to large to post in total
Quote
##############################################################

uno.name=Arduino Uno
uno.upload.protocol=stk500
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino

##############################################################

atmega328.name=Arduino Duemilanove or Nano w/ ATmega328

atmega328.upload.protocol=stk500
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600

atmega328.bootloader.low_fuses=0xFF
atmega328.bootloader.high_fuses=0xDA
atmega328.bootloader.extended_fuses=0x05
atmega328.bootloader.path=atmega
atmega328.bootloader.file=ATmegaBOOT_168_atmega328.hex
atmega328.bootloader.unlock_bits=0x3F
atmega328.bootloader.lock_bits=0x0F

atmega328.build.mcu=atmega328p
atmega328.build.f_cpu=16000000L
atmega328.build.core=arduino

##############################################################

diecimila.name=Arduino Diecimila, Duemilanove, or Nano w/ ATmega168

diecimila.upload.protocol=stk500
diecimila.upload.maximum_size=14336
diecimila.upload.speed=19200

diecimila.bootloader.low_fuses=0xff
diecimila.bootloader.high_fuses=0xdd
diecimila.bootloader.extended_fuses=0x00
diecimila.bootloader.path=atmega
diecimila.bootloader.file=ATmegaBOOT_168_diecimila.hex
diecimila.bootloader.unlock_bits=0x3F
diecimila.bootloader.lock_bits=0x0F

diecimila.build.mcu=atmega168
diecimila.build.f_cpu=16000000L
diecimila.build.core=arduino

##############################################################

mega2560.name=Arduino Mega 2560

mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F

mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino

##############################################################

mega.name=Arduino Mega (ATmega1280)

mega.upload.protocol=stk500
mega.upload.maximum_size=126976
mega.upload.speed=57600

mega.bootloader.low_fuses=0xFF
mega.bootloader.high_fuses=0xDA
mega.bootloader.extended_fuses=0xF5
mega.bootloader.path=atmega
mega.bootloader.file=ATmegaBOOT_168_atmega1280.hex
mega.bootloader.unlock_bits=0x3F
mega.bootloader.lock_bits=0x0F

mega.build.mcu=atmega1280
mega.build.f_cpu=16000000L
mega.build.core=arduino

##############################################################




Lefty
10815  Using Arduino / Installation & Troubleshooting / Re: ATMega 1280 drivers on: April 11, 2011, 10:41:09 am
The Arduino mega1280 board uses a on-board FTDI usb serial convertor chip and that uses different driver files then the Uno or mega2560 boards. On my windows system this is the folder to point to when loading ftdi driver files:

C:\Documents and Settings\Primary Windows User\My Documents\My Programs\Arduino\arduino-0022\drivers\FTDI USB Drivers


Lefty
Pages: 1 ... 719 720 [721] 722 723 ... 1166