Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / General Electronics / Re: Voltage drop after couple of seconds - Arduino broken? on: August 31, 2012, 06:34:11 am
Yes, it's 5.2V
2  Using Arduino / General Electronics / Re: Voltage drop after couple of seconds - Arduino broken? on: August 31, 2012, 06:01:53 am
This morning when I picked up the Arduino again it was still having the trouble described two days ago.

The power supply is a custom built one (not by myself though) with a voltage selection dial. I had it at 5V.
3  Using Arduino / General Electronics / Re: Voltage drop after couple of seconds - Arduino broken? on: August 31, 2012, 05:51:36 am
I have just gotten to checking the pins and they are all fine (digital and analog).

Also, I've got my hands on a test power supply capable of delivering 1.9A.
I have used this to power the Arduino with Ethernet shield. The voltage didn't drop too much, but the voltage regulator on the Ethernet shield got pretty warm.

While writing this reply I kept performing some measurements to write about, but somehow everything seems to be fine suddenly.
Long story short, without really changing anything to my circuit or program, somehow it's now running stable again for almost 5 minutes.

Thanks for your suggestions.
4  Using Arduino / General Electronics / Re: Voltage drop after couple of seconds - Arduino broken? on: August 29, 2012, 02:46:13 pm
The external supply is also limited to 500mA.

Though, the odd thing is I haven't changed anything in my circuit and it has worked flawlessly for hours before...
That's why I don't think it's due to drawing too much current.
5  Using Arduino / General Electronics / Voltage drop after couple of seconds - Arduino broken? on: August 29, 2012, 02:40:31 pm
Hi everyone,

The last couple of days I've been using my Arduino again. At first everything went fine, but now I'm running into some trouble I'd like some advice on.

I have an Arduino Duemilanove to which I have attached an Ethernet Shield (without SD-card slot) and a small I2C OLED display. Trying to demo my project to a friend yesterday the Arduino kept shutting down after a few seconds. I have tried different power sources, PC via USB, external adapter at different settings (4.5V, 6V, 7V). Using the external power connector I do get a power light, but my display doesn't turn on. Using power supply via USB it turns off after a few seconds... Windows doesn't recognize the USB-device in this configuration and makes the 'USB device removed' sound when the Arduino turns off.

When I remove the Ethernet shield it takes a little longer before the Arduino shuts down. Also, Windows does recognize the USB device and I'm able to upload new software.

What could be wrong and/or what tests or measurements could help determine the problem?
I'm not very familiar with electronics so I'm sorry if I'm overlooking something really simple here.

Kind regards,
Chris
6  Forum 2005-2010 (read only) / Forum / Re: Link to control panel is empty on: February 18, 2010, 07:42:17 am
FANTASTIC!!!

It's looking great! And it's working!
7  Forum 2005-2010 (read only) / Forum / Re: Link to control panel is empty on: January 30, 2010, 09:38:52 pm
that's not an argument...  :smiley

if we'd have kept doing stuff the way we did, we'd still be hunting with sticks and stones
8  Forum 2005-2010 (read only) / Forum / Link to control panel is empty on: January 30, 2010, 02:15:05 pm
Maybe it's got something to do with my settings, but I haven't been able to fix it myself.

In the header the link to the Control Panel is missing. It just says:
Home | Help | Members | | Logout

The source funds my suspicion that this wasn't intentional since it says:
<div style="float: left; width: 99%; text-align: center;">
<a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl"><span class="imgmenu">Home</span></a> | <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=help" style="cursor:help;"><span class="imgmenu">Help</span></a> | <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=ml"><span class="imgmenu">Members</span></a> | [glow]<a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=mycenter"></a>[/glow] | <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=logout"><span class="imgmenu">Logout</span></a></div>
9  Forum 2005-2010 (read only) / Troubleshooting / Re: ArduinoISP @57600 baud instead of 19200 on: June 10, 2010, 01:44:13 am
BenF, thanks for the very useful reply.

When I accidentally overwrite the programmer, that is within the bootloader right? So I should be able to reprogram it as usual, with just the Arduino board, over USB.

I'm still not sure when the bootloader is overwritten and when it's not. Anyone any comments on that?
10  Forum 2005-2010 (read only) / Troubleshooting / ArduinoISP @57600 baud instead of 19200 on: June 09, 2010, 03:07:17 pm
Hi,

Yesterday my extra Atmega328P arrived. Today I finally had time to play with it.

I have programmed my Arduino Duemilanove with the ArduinoISP from the Examples menu. So now I can program the new Atmega328P.

There's one thing I can get to work and searching the internet and forums isn't helping me out.
I've tried to increase the baud rate to speed up the programming. In the ArduinoISP's setup() is a Serial.begin(19200). So I thought changing this to 57600 would do the trick. It doesn't smiley-sad

When I change it to 57600 (or anything else) I keep getting errors. e.g.
Code:
D:\Development\Arduino\temp>avrdude -p m328p -c avrisp -P COM3 -b 57600 -v -u -U flash:w:RgbMatrix.cpp.hex

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Programs\WinAVR_20100110\bin\avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : avrisp
         Overriding Baud Rate          : 57600
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel AVR ISP
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.13s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "RgbMatrix.cpp.hex"
avrdude: input file RgbMatrix.cpp.hex auto detected as Intel Hex
avrdude: writing flash (3436 bytes):

Writing |                                                    | 0% 0.00s
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

D:\Development\Arduino\temp>

After this the target Atmega looks erased and doesn't do anything. (Switching back to 19200 baud allows me to program it again.)

How can I increase the programming speed of ArduinoISP?

Another question I'd like to be sure about:
When I write a program to the target Atmega using ArduinoISP, it overwrites the Arduino bootloader, right?
11  Forum 2005-2010 (read only) / Troubleshooting / RGB LED Matrix PWM - brightness timing on: June 27, 2010, 09:14:30 am
I have finally hooked up my RGB LED Matrix to my Arduino using 4 shift registers. I'm using 32 levels PWM and update the matrix from a TimerOne interrupt.

Now I'm in the process of improving the interrupt method to be as fast and accurate as possible.

There's two problems I'm running into that I could use some suggestions for.

1. the updating of column information is probably optimized to not do anything when a subpixel is off.

In my code I'm using lines like this:
Code:
   colROn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
This is probably optimized to work like:
Code:
if(*(pixel++) > pwmCounter) { colROn = _BV(0); }
if(*(pixel++) > pwmCounter) { colGOn = _BV(0); }
if(*(pixel++) > pwmCounter) { colBOn = _BV(0); }
So when a subpixel is off, there are less instructions executed which results in a different brightness.

How can I solve this?

2. The last row has different brightness.

After all the rows have been displayed I can either clear the last line or leave it on.
When I leave it on, it's a little bit brighter than the others.
When I turn it off, it's a little dimmer than the others.

Here I'm again looking for a way to display the last line equally long.

If you have any other suggestions to improve the speed or accuracy of the iDrawFrame method, they're most welcome.

Code:
#include <TimerOne.h>

#include "Shifting.h"

#define DATA_PIN 7
#define LATCH_PIN 6
#define CLOCK_PIN 5

#define ROW_ON HIGH
#define ROW_OFF LOW

#define COL_ON LOW
#define COL_OFF HIGH

#define PWM_LEVELS 32

int timerDelay = 280;
byte pwmCounter = 0;

uint8_t rows[8*8*3];

void iDrawFrame() {
  byte r;
  uint8_t* pixel = rows;
  uint8_t rowOn = 1;
  uint8_t colROn = 0;
  uint8_t colGOn = 0;
  uint8_t colBOn = 0;
  
  for(r=8; r!=0; --r) {
    colROn = 0; colGOn = 0; colBOn = 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(0) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(1) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(1) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(1) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(2) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(2) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(2) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(3) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(3) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(3) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(4) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(4) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(4) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(5) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(5) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(5) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(6) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(6) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(6) : 0;
    
    colROn |= (*(pixel++) > pwmCounter) ? _BV(7) : 0;
    colGOn |= (*(pixel++) > pwmCounter) ? _BV(7) : 0;
    colBOn |= (*(pixel++) > pwmCounter) ? _BV(7) : 0;

    shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST, ~colROn); // Red
    shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST, ~colBOn); // Blue
    shiftOutByte(DATA_PIN, CLOCK_PIN, LSBFIRST, ~colGOn); // Green
    shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST,   rowOn); // Row (ground)
    
    bitOut(LATCH_PIN, LOW);
    bitOut(LATCH_PIN, HIGH);
    
    rowOn <<= 1;
  }
  
  // Disable this, and the last row is a little brighter because it gets all the time until refresh to display
  // Enable it, and it'll be a little dimmer, because it didn't really take long enough to display :-(
  // TODO: find a way to display the last row equally long
//  shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST, ~0x00); // Red
//  shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST, ~0x00); // Blue
//  shiftOutByte(DATA_PIN, CLOCK_PIN, LSBFIRST, ~0x00); // Green
//  shiftOutByte(DATA_PIN, CLOCK_PIN, MSBFIRST,  0x00); // Row (ground)
//  bitOut(LATCH_PIN, LOW);
//  bitOut(LATCH_PIN, HIGH);
    
  if(pwmCounter == 0) pwmCounter = PWM_LEVELS;
  else --pwmCounter;
}

void setup() {
  Serial.begin(9600);
  pinMode(DATA_PIN, OUTPUT);
  pinMode(LATCH_PIN, OUTPUT);
  pinMode(CLOCK_PIN, OUTPUT);
  
  Timer1.initialize(timerDelay);
  Timer1.attachInterrupt(iDrawFrame);
}

unsigned long volatile now;
unsigned long volatile nextUpdate = 500;

byte state = 0;
uint8_t R = PWM_LEVELS;
uint8_t G = 0;
uint8_t B = 0;
uint8_t inc = 2;

void loop() {
  now = millis();
  if(now > nextUpdate) {
    nextUpdate = now + 200;
    
    switch(state) {
      case 0:
        G += inc;
        if(G >= PWM_LEVELS) {
          G = PWM_LEVELS;
          state = 1;
        }
        break;
      case 1:
        if(R <= inc) {
          R = 0;
          state = 2;
        } else {
          R -= inc;
        }
        break;
      case 2:
        B += inc;
        if(B >= PWM_LEVELS) {
          B = PWM_LEVELS;
          state = 3;
        }
        break;
      case 3:
        if(G <= inc) {
          G = 0;
          state = 4;
        } else {
          G -= inc;
        }
        break;
      case 4:
        R += inc;
        if(R >= PWM_LEVELS) {
          R = PWM_LEVELS;
          state = 5;
        }
        break;
      case 5:
        if(B <= inc) {
          B = 0;
          state = 0;
        } else {
          B -= inc;
        }
        break;
    }
    
    uint8_t* subpixP =&rows[7*8*3-1];
    uint8_t* subpix = &rows[8*8*3-1];
    for(int r=0; r<7; ++r) {
      for(int c=0; c<8; ++c) {
        *(subpix--) = *(subpixP--);
        *(subpix--) = *(subpixP--);
        *(subpix--) = *(subpixP--);
      }
    }
    
    subpix = rows;
    for(int c=0; c<8; ++c) {
      *(subpix++) = R * abs(8-c) / 8;
      *(subpix++) = G * abs(8-c) / 8;
      *(subpix++) = B * abs(8-c) / 8;
    }
  }
}

Shifting.h
Code:
#ifndef SHIFTING_H
#define SHIFTING_H

#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))

#define sbipin(pin) sbi((pin)<8 ? PORTD:PORTB, (pin) - ((pin)<8 ? 0:8))
#define cbipin(pin) cbi((pin)<8 ? PORTD:PORTB, (pin) - ((pin)<8 ? 0:8))

#define bitOut(pin, val) { \
  if ((val) == LOW) cbipin(pin); \
  else              sbipin(pin); \
}

#define shiftOutBit(dataPin, clockPin, val, bit) { \
  bitOut(dataPin, ((val) & (1 << (bit))) ? HIGH:LOW); \
  bitOut(clockPin, HIGH); \
  bitOut(clockPin, LOW); \
}

#define shiftOutByte(dataPin, clockPin, bitOrder, val) { \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?0:7); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?1:6); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?2:5); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?3:4); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?4:3); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?5:2); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?6:1); \
  shiftOutBit(dataPin, clockPin, val, (bitOrder) == LSBFIRST ?7:0); \
}

#endif
12  Forum 2005-2010 (read only) / Troubleshooting / Re: Missing suffices from 'Tab Menu' on: March 06, 2010, 04:54:59 am
Hi Chasmopolitan,

As said in my previous post, it's not fixed in 0018.
You will have to download the source and compile yourself to include the patch.

I have added it to the issue list and provided a solution. As you can see dmellis has accepted the issue and put a label on it that tells you it's now a milestone for 0019. So good chance it'll be included in the next official release.
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Missing suffices from 'Tab Menu' on: January 25, 2010, 10:16:52 am
I'm sorry chasmopolitan. I misinterpreted your question.
I didn't realize by "Tab Menu" you meant the dropdown.

And guess what, it's not fixed in 0018 either. Not yet at least.

I'm afraid the only option for now is to use an alternative editor...
The Arduino IDE does have an option to monitor files edited in another editor. To enable this go to File -> Preferences (Ctrl+comma) and check 'Use external editor'.

EDIT:
I have taken the liberty of adding it to the issue list, including a solution.
http://code.google.com/p/arduino/issues/detail?id=191
However, you will have to download the source code, apply the solution and compile the IDE yourself to benefit from this right now.
14  Forum 2005-2010 (read only) / Troubleshooting / Re: Missing suffices from 'Tab Menu' on: January 25, 2010, 07:56:40 am
What version (in the title bar of the Arduino IDE) are you using?
And what operating system? (Windows/Linux/Mac)

Maybe, if you're not using Windows, like I am, the problem is operating system specific and someone who's using the same could help you out.
15  Forum 2005-2010 (read only) / Troubleshooting / Re: Missing suffices from 'Tab Menu' on: January 25, 2010, 07:01:18 am
This is a know issue that will be fixed in 0018.

More information:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251245246
http://code.google.com/p/arduino/issues/detail?id=91

I don't, however, have trouble opening the .cpp or .h file when the tab is there. The open the respective files accordingly.
So if you'd put the files in the sketch folder, you should be able to open them.
Pages: [1] 2 3 ... 6