Go Down

Topic: Potentiometer Controlling LED Graph and Servo (Read 10547 times) previous topic - next topic


now the only thing i need is transistors... can you guys recommend some dip packages of transistors... i would like anywhere between 5 and 10 transistors per package...


Have a look at your code again Richard. It will not compile as is, you do not declare your variables, nor do you hint on what they ought to be.

Then there is this part:

Code: [Select]
if (55 - (val / 5)) = pinnbr {
   outval = HIGH;

It looks as if you assign the value of "pinnbr" to an expression? This is not valid C-syntax. There may be some good intention here, but it's certainly hard to spot.

For a guy who is 11 years old, I'm pretty impressed by his skills and ability to stay focused through some "challenging" advice.


Jun 15, 2010, 07:41 pm Last Edit: Jun 15, 2010, 07:46 pm by Jeremy1998 Reason: 1
Is the "protocal" the same for these? As in do I still use a 1k ohm resistor between the base and arduino?

I still haven't decided on one yet, but i want them with all normal npn transistors. I am still reading the datasheets.


i compiled it, and it worked, but i cant test it...

Compiled != worked.

You have much to learn, my young padawan.    ;)

(Keep it up!)


... and sometimes forget which ones use == vs. = for comparison.

If you fix that, there is still an issue with parentheses. As written, the conditional expression in your code is "(55 - (val / 5)). In "C" you need to enclose the full conditional expression in parentheses.


So I think I will get the ULN2004A's. If I am correct, the left pins (pins 1-7) are the base, the right pins (pins 10 - 16) are the collectors, and pin 9 is the common emitter? Please tell me if I am right.  


Jun 16, 2010, 12:21 am Last Edit: Jun 16, 2010, 12:25 am by Jeremy1998 Reason: 1
Ok, so I found these:


They are cheap, and they look like they should work. From what I understand, the ULN2801A is for use with external ressitors, and the ULN2803A is for use with 5 volt signals? Please correct me if I am wrong.

Also, what would I hook the common load connection to? Would it be 5 volts because that's what I am driving my led's with?


Jun 16, 2010, 04:09 am Last Edit: Jun 16, 2010, 04:25 am by Jeremy1998 Reason: 1
Yay! I am finally understanding! LOL!

It's a website called Newark, I'm sure you have heard of it?

And as far as FINDING then, i just Google searched "transistor array" and went into images. Then i found a schematic that I liked, and looked up the corresponding IC in google shopping. http://computerchristmas.com/tmp/myimages/7-2803.jpg


i searched it in gogle shopping, and thay actually ahve it cheapest... but i know what you mean... i wanted some crystal oacillators, and they had em super cheap! the catch was that they were going to charge me a $25 fee just to get them off of the stupid shelf! i said forget that!


Alright, so I finished the Fritzing design... It took me 2 dsya and a total of over 12 hours!

Can someone tell me how i pulpad the JPG image? I am prety sure that I have to upload it to photobucket or flickr or some other photo server?

Go Up