Show Posts
Pages: [1] 2 3 ... 281
1  Using Arduino / Project Guidance / Re: Very Simple Project - Using Sleep - Need Help Debugging on: July 29, 2014, 08:52:17 pm
Very nice job on your projects and web site. I like the Google gauges, I've played with them a bit, but I'll have to have a look at your code too.

Here is sleep code I use for the 328P, I think it's very close to what you're trying to do. (BTW, you could do without the external pullup resistor, use the 328P's internal pullup.)

It gets discussed regularly, but if you're not aware, Arduino boards aren't the best for low power projects:
2  Using Arduino / LEDs and Multiplexing / Re: seven segment display help on: July 29, 2014, 07:52:29 am
ok so i ran this code on my break out using this
now i have NO resistors and NO transistors

Bad idea. Even if Sparkfun does it, it's still a bad idea.

.. i was just doing this just to see what it displays quickly and it shows the code no issue? ..
so i move back to my MAN71A seven segment displays and i dont get the same feedback? i am using 220ohm res and pnp transistors? whats the big difference in these displays?

It's not the displays, its the transistors. They invert the logic for the digit drivers. Have you changed your code as described in Reply #21?

With the transistors (and resistors) in the circuit, the Sparkfun code should work if

#define DIGIT_ON  HIGH
#define DIGIT_OFF  LOW

is changed to

#define DIGIT_ON  LOW
3  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 29, 2014, 07:41:51 am
The link you provided is for the mega328. Will this work with the atmega8?

Unknown. Missed that you were using ATmega8.
4  Using Arduino / LEDs and Multiplexing / Re: seven segment display help on: July 28, 2014, 10:10:58 pm
Oh, if you're using PNP high-side drivers, the code needs to keep all the bases pulled HIGH except for the one digit being displayed, pull that one LOW.  Looks to be backwards in the code above.
5  Using Arduino / LEDs and Multiplexing / Re: seven segment display help on: July 28, 2014, 10:05:18 pm
well then i dont get it?? my display still wont work right.. ugh.. is my code right?

Can't see near enough of it to tell. Post it all, please.
6  Using Arduino / Microcontrollers / Re: Serial baud rate on: July 28, 2014, 10:03:25 pm
I could not find a bootloader for operation at 8MHz...

A couple come with the IDE: \arduino-1.0.5\hardware\arduino\bootloaders\atmega

And here is an 8MHz version of Optiboot.

7  Using Arduino / LEDs and Multiplexing / Re: seven segment display help on: July 28, 2014, 09:53:56 pm
ok thanks.. sorry bout that.. i am going to be using 3v in the end.. so should i change my 220 to 100?

Resistor selection may require some experimentation with your particular display.

and should i change my pnp to a 4403 pnp?

Most any general-purpose small-signal PNP type should work. I might have actually built the thing with 2N3906s, I forget...
8  Using Arduino / LEDs and Multiplexing / Re: seven segment display help on: July 28, 2014, 09:48:21 pm
Put your code in code tags. Read this.

Here is a circuit of mine driving a 4-digit 7-segment common anode display. It's a single unit display, all the segments are connected together internally. It's also a 3V circuit, so the 100Ω segment resistors may be too small for your project. 220Ω should be a safe value to start out with.

PS: We'll probably want to see all the code, not just some of it.
9  Using Arduino / General Electronics / Re: Using a transistor instead of a relay as a button on: July 28, 2014, 09:33:44 pm
It should work, I would wire it like below. In the pinMode() call, turn the pullup resistor on for the input pin (INPUT_PULLUP). This circuit will invert the logic: When 12V is applied to the transistor, the MCU pin will be pulled LOW. When no voltage is applied, the MCU pin will read HIGH. The transistor can be any general-purpose small-signal NPN type, e.g. 2N3904, 2N2222, 2N4401, etc.
10  Using Arduino / Sensors / Re: resistor on: July 28, 2014, 09:23:16 pm
what does the above means . i thought resistor reduces the current.

The application of a resistor as described would probably not affect anything if the microcontroller were being connected to another high-impedance device, e.g. CMOS. Because the impedance is very high, so little current flows that the resistor would not cause a significant voltage drop, but would protect the microcontroller by limiting current in the event of a short or other wiring error.
11  Using Arduino / Sensors / Re: resistor on: July 28, 2014, 09:12:59 pm
It would look something like this.
12  Using Arduino / Sensors / Re: resistor on: July 28, 2014, 09:07:00 pm
A 5V relay should not be connected directly. The current drawn from a pin should be limited to 20mA. Check the datasheet for the relay, it almost certainly needs more current than that. Use a transistor driver with a flyback diode across the relay coil.
13  Using Arduino / General Electronics / Re: Connecting potentiometer to breadboard? on: July 28, 2014, 09:04:24 pm
I have a soldering iron and solder at home.
But I don't know if it's a good idea to use it. What if I want to use this for something other that a breadboard?
I guess I would have to desolder...?

Sure, not a problem. Coincidentally, I did the same thing today. Desoldered some old wires from a pot, cleaned up the terminals with desoldering braid, soldered new wires on so they'd plug into a breadboard. I used 22 gauge solid wire which works well with breadboards but too much flexing or moving of the pot could eventually cause a break, so I secured the pot with some double-sided tape. It's just for a demo I'm doing, so not a long-term situation.
14  Using Arduino / Programming Questions / Re: How to share code? on: July 28, 2014, 01:22:47 pm
Yeah, I'm sure some documentation would be a good thing. Two days ago it was just my private stash so its pretty terse.

-jim lee

Looks like some good stuff, though.
15  Using Arduino / Project Guidance / switch versus if on: July 28, 2014, 01:22:09 pm
Are "switch" statements faster to process than "if / else" statements?

I haven't looked at the assembly code, but I'd be surprised if there were significant differences. It's probably six and a half of one and a dozen of the other  smiley-wink
Pages: [1] 2 3 ... 281