Go Down

Topic: Wiring help for a hardware newbie (Read 1 time) previous topic - next topic

wubbahed

Okay, I'm an experienced software developer so programming the Arduino has been a breeze.
However, I'm a complete noob when it comes to hardware/electronics, so that's what I need help with.

My first project uses Lilypad. I've worked through the tutorials, and can get each demo working fine.  However, I'm not sure how to put it all together correctly.  Attached is an image describing what I'm trying to do -- combine on one board a AAA battery power supply, a serial group of four LEDs, two separate light sensors, and two groups of two tri-color LEDs.

Here's a list of current questions which I'm having a hard time figuring out.
- when trying to make a serial connection of two tri-color LEDs, do you connect each LEDs RGB outlet directly to the pin?  Or do you connect one light directly to another light, and then have the last light talk directly to the pin?
- when connecting a battery, are there some guidelines around when to wire something (like a sensor) directly to the battery?  Or should you only wire the battery to the PWR/GND in the board and have all the power go through the board?

Thanks in advance.

p.s. If the attached image is too small, you can see the original version on Google Docs here
http://bit.ly/gJhZM5


noisybit

Well ... the wiring for the LEDs looks equivalent to me. I'm talking about the wiring on the bottom of the drawing. It does not matter whether you connect two wires on the output pin or if you connect the output pin with the pin of LED 1 and connect that pin of LED 1 with the pin of LED 2.

But be careful. I don't know Lillypad nor the LEDs you use. Maybe you need a resistor in front of each LED! Check out the description of the LEDs. See whether you can connect them directly with 3.3 V or 5 V (depending on what voltage the schematic works).


CrossRoads

Tricolor LEDs cannot be wired serially (meaning current flows THRU one device to the next device). They must be wired in parallel, with each operating on the same supply voltage. A current limiting resistor should be used for each device (so, two tricolor LEDs require 6 resistors. can't tell if yours have resistors built in). Your bottom right hand connections give that impression - with 5V going in and the lilypad pin going low to turn the LED on (those are common anode parts, yes?)

Your standard group -  you will drive D2 high and D1 low to turn these on? Better get a current limit resistor in there - if each LED will take 20mA, you  will burn out D1 or D2, kind of a crap shoot as to which will go first. One per device would be better. Unless the resistor is built into the LED module.

Sensors - unless you are doing something to switch the power on & off, where you connect to the positive supply voltage is basically a matter of convenience.
What you show is fine.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

CrossRoads

#3
Feb 22, 2011, 10:54 pm Last Edit: Feb 22, 2011, 10:57 pm by CrossRoads Reason: 1
Yeah, you are right noisybit - they are wired in parallel in both, the connection point is just in different locations.
I think I was a little misled by the red source wire for some reason.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

u0421793

#4
Feb 22, 2011, 10:59 pm Last Edit: Feb 22, 2011, 11:08 pm by Ian Tindale Reason: 1
Both the single lilypad pcb-mounted LEDs and the lilypad RGB pcb-mounted leds have limiting resistors already fitted, so that's one less thing to worry about.
There's no need to connect the parallel white LEDs to the lilypad twice per electrode, once you've made the connection, you've made the connection. (Are you sure it's supposed to connect across two output port pins, rather than one output and ground, or one output and +ve (whichever way round you end up using the LEDs?)

The diagrams for both ways of connecting the RGB leds are the same -- they're both in parallel.

The lilypad light sensors are also fitted with the correct resistors for a 5Vdc power supply.

The AAA psu puts out 5Vdc (it's quite a clever psu). However, you've got the connections a bit wrong on it. The AAA psu actually has three negative terminals and only one positive terminal!

wubbahed

Thank you everyone for the help and advice.  I'll post some images soon when the project is completed.

Magician


What for this AAA power supply?
You are not going to power all set up from 1.5 V battery?

CrossRoads

It is apparently a battery holder with a voltage boost converter built in.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Magician

Well, than power issue:
arduino board - 50 mA;
4 rgb * 3 = 12 leds ;
4 regular leds;
I = (12 + 4) * 20 = 320 mA;
two light sensors, only God knows current consumption;

It's approximately up to 400 mA.
If converter boosted 1.5 up to 4.5 at minimum, battery has to supply 1.2 A.
Apparently it will be dead in a minutes

CrossRoads

AA atteries are good for 1200-1500mAH, should last a while if the LEDs are not on full blast, I'm sure the design is not to be a walking flashlight :)

http://en.wikipedia.org/wiki/AA_battery
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Magician

Yes, CrossRoads, I agree that it is not design for Mars mission.
Just couple things author has to pay attention for.
There is more in it:
". Good up to 100mA. Short circuit protected."
If LED's current to be decreased to 5 mA, and only half of them light up simultaneously,
it will works. Just calculation for led's resistor has to be done in the beginning,
not to redo it later on, and testing for less led current , not to be disappointed
if brightness less than expected

And  btw, battery AAA.
http://en.wikipedia.org/wiki/AAA_battery

wubbahed

Wanted to thank everyone again for the help, I couldn't have done it without you. Based on your comments, I ended up scaling down the design somewhat from my original thoughts, but the end result is ready to go.  You can see the first demo here:

http://www.youtube.com/watch?v=OHeB1v8PbzE

I've got a Lilypad Arduino connected to a Bluetooth Mate, and that's being driven by a custom Android app.
The tilting demo shown is just one example, but there are others in the works (e.g. when a specific person calls me on my phone then the entire shirt will blink rapidly, etc.)

I'll be releasing full source code and sketches soon, no worries.

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up