Pages: [1]   Go Down
Author Topic: Hook up diagram for components  (Read 578 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm new here and also a bit of an electronics and arduino novice.
I'm hoping someone can help me by working out the connections between the various components for the following circuit.


The circuit is perfect for what I need, and I've been kindly given the code for the project, but I'm not sure how to wire up the various components.

If anyone can help me I would be very grateful.

Thank you in advance.

Jamie
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24353
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The circuit is perfect for what I need, and I've been kindly given the code for the project,  
Have you posted either?
They're interrelated, so difficult to provide the one without seeing the other.
I'm guessing charlieplexing.
« Last Edit: September 08, 2012, 11:02:32 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi AWOL,
I'm pretty sure the circuit uses charlieplexing, I don't have the circuit diagram that's the problem. I need helping sort of reverse engineering the diagram back from the video clip posted.
If someone can help I could PM them the code, which would probably be the easiest way for someone to solve this.

Thanks
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24353
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're aware that there's a charlieplexing library available?
Have a look around the Playground.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 4
Posts: 272
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will have a 100% higher chance of getting help with this if you start by posting the code HERE IN THE FORUM.  No one in this forum is interested in helping you with some top-secret code.  We are not for-hire electrical engineers where you post a video of a product, and ask us to reverse engineer it for you.  By looking at the code we can see what the Arduino is doing to produce the result shown in the video.

It's your choice, but without the code, you will get only general references to go read a library and figure out how to make it work on your own.
Logged

Offline Offline
Sr. Member
****
Karma: 5
Posts: 422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let me Google that for you... smiley-wink

http://www.instructables.com/id/CharliePlexed-LED-string-for-the-Arduino/?ALLSTEPS

I would suggest that as a novice, you start with the "standard" arduino and drive the LED`s (with series resistors) directly, rather than jumping in at the deep end with an AtTiny and CharlilePlexing.

http://startingelectronics.com/beginners/start-electronics-now/tut4-arduino-knight-rider/

You can add a speed control, once you get the basic circuit working.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Lakes for the links.
I didn't mean to be deliberately cryptic or awkward by not initially posting the code.
Here's the code as it was given to me.
If someone could help me out with a wiring diagram for the components based on this code that would be great.

---------------------------------------------------------------------------
int ledPORT1 = 1;
int ledPORT2 = 2;
int ledPORT3 = 0;
int ledPORT4 = 4;

int analogPin = 3;
int val = 0;

void setup()
{
}

void loop()
{
pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT2, HIGH);
delay(val);
digitalWrite(ledPORT2, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);

pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);

pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT3, HIGH);
delay(val);
digitalWrite(ledPORT3, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);

//die ersten 6 LED's

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT3, HIGH);
delay(val);
digitalWrite(ledPORT3, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT2, HIGH);
delay(val);
digitalWrite(ledPORT2, LOW);

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT2, HIGH);
delay(val);
digitalWrite(ledPORT2, LOW);

//jetzt die gefolgten 4 LED's

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT3, HIGH);
delay(val);
digitalWrite(ledPORT3, LOW);

// und zurück

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

// das waren die ersten 2 zurück

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT2, HIGH);
delay(val);
digitalWrite(ledPORT2, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

pinMode(ledPORT1, INPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT2, HIGH);
delay(val);
digitalWrite(ledPORT2, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT3, HIGH);
delay(val);
digitalWrite(ledPORT3, LOW);

// das waren die nächsten 2 zurück

pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, OUTPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT3, HIGH);
delay(val);
digitalWrite(ledPORT3, LOW);

pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, INPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, OUTPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT4, HIGH);
delay(val);
digitalWrite(ledPORT4, LOW);

pinMode(ledPORT1, OUTPUT);
pinMode(ledPORT2, OUTPUT);
pinMode(ledPORT3, INPUT);
pinMode(ledPORT4, INPUT);

val = analogRead(analogPin);
val /=4;
digitalWrite(ledPORT1, HIGH);
delay(val);
digitalWrite(ledPORT1, LOW);
}
---------------------------------------------------------------------------


Thanks again.

Jamie
Logged

Offline Offline
Sr. Member
****
Karma: 5
Posts: 422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The instructable shows you  how to wire the LED`s.

Have you used an AtTiny before?, do you know how to program it?

http://hlt.media.mit.edu/?p=1695

http://www.instructables.com/id/8-LED-Larson-Scanner-with-Arduino/
http://www.instructables.com/id/The-KITT-duino-DIY-Larson-Scanner-with-an-Arduino/

All the information is out there, do some research, buy a breadboard, experiment! smiley
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24353
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
do some research, buy a breadboard, experiment!
...use loops and code tags.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: