Show Posts
Pages: [1] 2 3 ... 13
1  Using Arduino / General Electronics / Re: FDN340P Drawn incorrectly on schematic? on: March 19, 2013, 12:39:39 am
I also struggled with this and thought D and S should have been swapped in the schematic (and on the board). But there is a good, simple explanation here of why it is correct as drawn:
http://www.engineeredentropy.com/2013/01/arduino-power-supply-selector/#more-214

In summary, the MOSFET is actually being used as a diode, not so much as a switch. But when the gate is low the channel conducts and the diode forward drop is essentially eliminated.

If you swapped D and S and put it in a more conventional PMOS switch arrangement then the body diode will allow flow from the Arduino Vreg back to USBVCC when the gate is high and the channel is blocked.

Jim
2  Using Arduino / Microcontrollers / Re: When does UNO bootloader run? on: October 10, 2012, 09:44:20 pm
Well the Uno in rev2 and the present rev3 did add a 1K ohm pull-down resistor on the DTR output pin from the 16U2 chip that the older arduino 2009 board did not use on the FTDI DTR output. I wonder if that pull-down resistor keeps the 328p reset pin low long enough after initial power-up to cause a true pin1 external reset condition and thus activation the bootloader wait period to be active?
Just to be clear, the tests I did were not on Uno boards.  I did my testing on a clone board modeled after the original issue Uno, but with FT232RL instead of the 8U2 for USB-serial.  The 1K pull-down you mention is not on my board, but it does have the clamping diode on the RESET line that was added to later Uno's.

Jim
3  Using Arduino / Microcontrollers / Re: When does UNO bootloader run? on: October 10, 2012, 03:40:51 pm
I suspect the DTR autoreset mechanism is causing your bootloader to run on power up.  At least I'm fairly confident this is true when a FT232RL chip is present for USB serial.  But I'm only speculating that the 16U2 on the Uno behaves similarly.

I demonstrated this to myself by putting an Uno optiboot-flashed 328P on a breadboard and observed that the chip skips the bootloader (no 3 flashes) when power is applied.  The 3 flashes show up when the RESET line is taken low, however.

The same chip, when inserted into the socket on an Arduino clone went through the bootloader code each time power was applied from either the DC jack or USB.

My conclusion is that the power up sequence causes a DTR reset.  Don't know if it is the result of activity by the FT232RL, or if the RC network on the reset line caused it.

Jim
4  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 03, 2012, 04:02:54 pm
There is a fuse in the atmega328p that turns the RESET pin into an ordinary I/O pin. Maybe that fuse got changed?
Bit 7 of the high fuse controls this.  It is set correctly to use the pin for RESET function (hfuse = 0xde).

I finally concluded that reset is working.  What isn't working is executing any sketch following reset.

Jim
5  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 02, 2012, 07:25:56 pm

I have (ab)used hundreds and likely a thousdand mcus and I have yet to find one that died all by itself.

Yeah, I mighta done something that damaged it.  Just can't figure out what.

Jim
6  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 02, 2012, 07:23:11 pm
On this solemn day we mourn the passing of a processor that never saw its full potential.  Struck down before it even had a chance to run Blink-Without-Delay.  We hope you find solace in Silicon Heaven.

It did run Fade before its demise ;-)

Jim
7  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 02, 2012, 10:11:00 am
Must be a bad chip.  I put it on a breadboard and found that the problem is not that the chip doesn't reset -- it actually does respond to pulling RESET low.  The problem is that it does not restart after a reset.

To eliminate the bootloader as a variable, I burned the Blink sketch into the chip using my programmer (i.e. no bootloader).

Initiating a restart by either 1) toggling the benchtop PSU, or 2) pulling/inserting the banana plug from the PSU to the breadboard allows the Blink sketch to restart.

But if I press the Omron tactile switch (RESET to GND) on the breadboard, then Blink stops and does not restart.  Likewise, if I pull and reinsert the VCC or GND jumper wire in the breadboard rails then Blink stops and does not restart. (There is a 10K pullup on RESET).

The chip must be overly sensitive to noise on VCC, GND, or RESET.  I have a 47uF across the breadboard rails, and 0.1uF's between VCC and GND, between AVCC and AGND, and between AREF and GND.  I also have a signal diode between VCC and RESET to clamp high voltage spikes.

A different chip mounted to the same breadboard config works as expected, i.e., no problems.

Gonna toss the chip.

Jim


8  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 01, 2012, 09:27:03 pm
Tried chip in two boards, and also tried a jumper wire touched directly to pin. No evidence of reset.  Weird, isn't it?

Jim
9  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 01, 2012, 09:17:10 pm
Quote
The bootloader does flash the LED upon power up, though
This is odd too.  Assuming that you're using Optiboot, the bootloader should not run, and it should NOT flash the LED, on powerup.  This is the "Adaboot fast start mod" that starts the sketch immediately on powerup, and only attempts uploading based on an "external reset."

Any chance that this somehow contains the wrong bootloader?

There is always a chance I have the wrong bootloader.  I am using unadulterated IDE 1.0, choosing Uno as board and Arduino as ISP as programmer, then Tools/Burn Bootloader.  Have followed same procedure with dozens of chips/boards, so I hope there isn't a problem ;-)

Here's the behavior I am seeing with multiple "good" chips:
 - 3 LED flashes on connection of USB cable
 - 3 LED flashes on DTR during IDE sketch upload via USB
 - 3 LED flashes on pressing reset button
 - 3 LED flashes on connection of 9VDC to power jack (no USB connection)

With the one "bad" chip, I am seeing this:
 - 3 LED flashes on connection of USB cable
 - no LED flashes on DTR during IDE sketch upload via USB, followed by upload failure message
 - no LED flashes on pressing reset button
 - 3 LED flashes on connection of 9VDC to power jack (no USB connection)

Jim
10  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 01, 2012, 07:01:29 pm

Are you using the ArduinoIDE to install the bootloader?
Yes, using avrisp.

Jim
11  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 01, 2012, 03:59:58 pm
Two things tell me that reset is not working:

1) Can't upload sketches
2) When the reset switch is closed (pressed), the bootloader does not flash the LED.

The bootloader does flash the LED upon power up, though, so I know that both the LED and bootloader are ok.

Jim
12  Using Arduino / Microcontrollers / Re: ATmega328P - reset not working on: October 01, 2012, 02:41:30 pm
Yes, it does.  Which seems odd since a reset is required for this to happen, right?

Jim
13  Using Arduino / Microcontrollers / ATmega328P - reset not working on: October 01, 2012, 02:25:29 pm
I have a new ATmega328P that won't respond to pulling the RESET pin low.  Other new MCU's installed in the same board (an Uno clone with clamping diode on the reset line) work fine, but this particular chip will not reset.

Tried:
 1.  Resetting from Arduino IDE (DTR signal)
 2.  Pressing the reset button on the board
 3.  Using a wire to manually short the MCU reset pin to GND plane.
 4.  Re-flashing the bootloader multiple times (avrisp)
 5.  Installing the bad chip into other known-to-be-good boards.

AVRDUDE reports the fuse settings as (all seem OK to me):
 lfuse 0xff
 hfuse 0xde
 efuse 0x05

Apparently the Uno bootloader is being successfully loaded because I get the expected 3 short LED flashes on powering up the board.  But nothing I've tried will allow the board to be reset once it is powered up

I hate to throw the chip away, but there seems to be something wrong with it.  Any suggestions beyond the things I've already tried?

Jim
14  Using Arduino / General Electronics / Re: Reading decimals of milivolts on: July 28, 2012, 07:28:11 am
There is a polynomial-based thermocouple library included with the TC4 project.  Currently, there are implementations of type K, type T, and type J.  It would be relatively straightforward to add a class for type S, using the existing classes as a guide.

http://tc4-shield.googlecode.com/svn/applications/libraries/trunk/libraries/thermocouple

This is open source code, released under the BSD license.

Jim
15  Using Arduino / Microcontrollers / Re: ArduinoBT: upgrade from 168 to 328? on: July 23, 2012, 10:13:24 pm
 I saw that was an option. Thanks.

Jim
Pages: [1] 2 3 ... 13