SteveChamberlin

Member Since: March 30, 2008

Country: United States

  • Yes the 25% tariffs will hurt, and will force you to increase prices, but I don’t see why they would create some big new uncertainty or compliance task of the sort implied by this blog post. With 140 employees, SparkFun is not really a “small business”, and I question whether you’re making this more complicated than it needs to be. You already deal with constantly fluctuating prices of supplies. Why would a 25% tariff need to be handled any differently than a 25% increase in supply cost? They have the same net effect, so you can calculate the impact on your costs the same way, with the same approach to determining necessary price increases and making future sales projections. As for auditing your supplier’s goods classifications, start with your highest dollar value purchases that were classified in a 25% tariff category, and double-check the classification, continuing with lower dollar value purchases until the potential savings is no longer worth the time invested.

  • The datasheet says 25 watts at 5 volts, which implies 5A. I assume that’s for the worst case, where every single pixel is turned on full white.

  • No video, no sale!

    Just kidding (sort of)

  • Good point. If you unroll the loop a little, you can get intervals of full-speed LED blinking: 62.5ns off, 62.5ns on, blink frequency of 8 MHz. So if there was any doubt, yes the Arduino really can perform a single operation in 1 / 16 millionth of a second!

    Here’s my test program, no assembly language required:

    void setup() 
    {
      pinMode(13, OUTPUT);
    }
    
    void loop() 
    {
      char pb5on = 1 << 5;
      char pb5off = 0;
    
      while (1)
      {
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
        PORTB = pb5on;
        PORTB = pb5off;
      }
    }
    

    And logic analyzer output to show that it really does toggle the LED every 62.5 ns:

    Saleae logic analyzer screenshot

  • You’re right that you can’t toggle an LED at 16 MHz using the Arduino libraries, but that’s not the hardware’s fault. It’s the result of using the Arduino libraries, which as jweather says, are not exactly optimized for speed. digitalWrite() is not a single instruction, but a call to a C function that does lots of checking and setup stuff before it actually sets the pin output. This makes it quite slow. In your example, there are no interrupts and no serial checking, so everything can be blamed squarely on digitalWrite(). :-)

    You overlooked one thing in your analysis, which is that when the program reaches the end of loop(), it must jump back to the beginning of loop(). This involves additional function calls in the Arduino library, and takes a small amount of time, and explains why your LED was in the low state longer than it was high. If you switched the low and high lines of your loop, you’d see that the LED was high longer than it was low. There’s nothing inherently slower about setting a pin low than high.

    I would encourage anyone who needs faster Arduino performance, or is just curious, to look at the source code for the Arduino libraries. Look at what digitalWrite() actually does. Read the Atmel datasheet for the ATMEGA328 chip. Read about direct I/O port manipulation here: http://playground.arduino.cc/Learning/PortManipulation . You don’t necessarily need to write code in assembly language to get fast performance. With a program like:

    void loop()
    {
      while (1)
      {  
        PORTB = 0;
        PORTB = 1;
      }
    }
    

    you should be able to get LED blinking performance much closer to 16 MHz.

  • Important note: this is a 250 mA power supply! As others have mentioned, the PTC fuse limits the output current to no more than 250 mA. It would be great if you could change the item description - calling it “1.5A max current” as shown above is misleading and confusing.

  • Mine died after sitting in a closet for a year. Anyone have experience repairing these? For a while I had to slap the case to make the temperature display turn on, and the air heat up. But now no matter what I do, I just get cold air blowing out, with nothing on the temperature display. Sounds like a loose connection or bad solder joint somewhere, but where?

  • Anyone have a good tutorial for how to solder SMD parts using this hot air station? Do you just point the nozzle at the part and go, or is it necessary to use another heater to preheat the board first, and follow a specific heating/cooling profile? Also can I get away with pre-tinning the pads with normal solder, instead of solder paste? The paste seems like a pain in the butt since it needs to be kept refrigerated, and I don’t want to keep it in the kitchen with my dinner, or pay distributors extra money to overnight ship it in a cool pack.

  • The CCV084 buzzer has a resistance of only 16 ohms– could somebody explain why it’s OK to connect it directly between two digital output pins, without a current-limiting resistor? When the buzzer is on, I would think it would draw 5V / 16 = 312 mA, which would damage the ATmega.

  • Ack! After two days of working nicely with 0x15 bias, I reset the board today, and the LCD appeared way over-dark. I changed the bias back to 0x14 and it looks perfect. What the heck?! I think there must be some temperature-sensing or temperature-dependence going on, so the same init values may produce good-looking results one day but not the next.

No public wish lists :(