Pages: [1] 2 3 ... 18   Go Down
Author Topic: Newbie needs assistance  (Read 13074 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will be creating a model of the uss enterprise and it will have a custom lighting and shuttle bay doors built into it.

heres the plan

stage 1: start up
Start up sequence
primary hull - immediatly on
secondary hull - immediatly on
deflector dish - fade on to standby 2 second fade to 100%
necells - N/A
Impulse - Fade on "standby" 2 second fade to 100%
Shuttle bay fade on 4 second fade to 100%
RCS thrusters - fade on 50% brightness
Flood lights immediatly on
Torpedo launchers - Immediatly on
Shuttle bay doors open

Stage 2: impulse power
Deflector "standby" orange 100%
Impulse "active" Red 100%
Necells "standby" off
RCS thrusters fade 100% brightness
Torpedo launchers immediatly on 100%
Shuttle bay: doors open

Stage 3: Warp power
Deflector "active" blue (fades to blue) 100%
Impulse "standby" (fades to orange) 100%
Necells "active purple" (fade on) 100%
RCS thrusters fade 50% brightness
Torpedo launchers Fade off
Shuttle bay: Doors close

Stage 4: Return to impulse
deflector "standby" orange (fades from blue to orange) 100%
Impulse "Active "red" (fade from orange) 100%
necells "standby" (fade off) 100%
RCS thrusters fade 100% brightness
Torpedo launchers fade 100% on
Shuttle bay doors open
Stage 2 through 4 on a loop until "shutdown sequence"

Stage 5: Shut down
All active lights fade off 25% per second.
shuttle bay doors close


Heres the thing, the doors are controlled by a small motor. There are also nagivation lights, that blink and white strobes included in the primary and secondary hull, the shuttle bay has landing lights and im sure theres more to it than that but havent realised yet.

I have absolutely no programming background and could use some help with this. I must note, i actually need to buy the arduino board but havent yet because i dont know what else will be needed other than wire, resistors and leds.

If someone can help me with this i would be forever grateful!
« Last Edit: December 20, 2012, 08:13:41 pm by secretreeve » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, more questions.

I'm probably looking at approx 100 3mm leds of different colors here, so would the board need expansion boards?

like 1 expansion for flood lights, another for primary hull, another for secondary hull, another for necells, another for shuttle bay and so on?

I'm really green at all this haha.
Logged

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Add up the number of "fade" channels and on/off channels you need. Count up the number of PWM (fade) and on/off (digital) channels on your Arduino and match them up. If you run out of PWM channels, digital channels can be made to do PWM but it's trickier than using a PWM channel. On/Off LEDs that are on and off at the same time can be on the same Arduino channel. I started to add up channels but got confused with the colors, fades, and on/off counts.

Make a spreadsheet and organize the LEDs by type (on/off, PWM), color, and when they need to be on and off and see if you have enough Arduino channels. If you run out, multiplexers can be added to increase the digital and PWM channel count but that gets more complicated. With a little creative matching you might be able to to everything with one Arduino.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

okay so heres what i got.



I have no idea if a standard board has enough channels to allow this but if needs be an expansion can be used.

would it be possible to get some help with the prpgram side of it? I have no idea where to start and would rather get the software done before the hardware smiley

Would i be right in thinking that each channel needs to be programmed individually and timings set?

or can each channel be "assigned" then "blocks" or "stages" made up with "trigger links" to the assigned channels? so you enter in a list of channels and then program in the stages?

or have i got this all comepletely wrong?
« Last Edit: December 20, 2012, 11:21:03 pm by secretreeve » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How can a strobe light be always on? If is always strobing then it is flashing on and off.
The real always on LEDs can be connected to the supply through a resistor, the others need an arduino pin each.

Get a board and some LEDs and resistors, then look at the blink tutorials and learn what code is all about.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Its always on as in its "active" from power on to power off.

i think "always active" would have been better term for it.

I'm sorry, but the tutorial is full of notes mixed in with the code and i cant determine what is code and whats notes.

Then theres the landing strip lights, fade effects and how to get it all timed in together, how to trigger the motor, how to get certain stages to "cycle" and how to program the startup and power down sequences to react to the power button.

This is why i have asked for help
« Last Edit: December 21, 2012, 12:09:30 am by secretreeve » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A line of notes starts with a double slash //
Many lines of notes start with /* and end with */
They will be a diffrent greyed out colour from the code.

You are not asking for help you are asking for someone to do it for you. Start of simple and work up to this do not try and do it all at once.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

okay, that clears that up.

But please understand, im not asking someone to do it for me, Im asking for someone who can go through it with me as i gradually assemble the program.

however i do need to know where to start and generally how it should be assembled.

I.E how things should be grouped together or linked together.

I cant really write up the program if i dont know how to assemble the sections of it.

Does that make sense?
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Get an Arduino and some LEDs and go from there...

Building an exact shopping list before starting is going to be difficult, but yes, you'll need some sort of expansion for all those LEDs (probably a set of TLC5940 chips on a circuit board).

If I was you I'd get an Arduino starter kit. They have an Arduino with breadboard, wires, LEDs, some motors, etc. Everything you need to start learning. Google "arduino starter kit"...

eg.

http://arduino.cc/en/Main/ArduinoStarterKit

https://www.adafruit.com/products/170

https://www.sparkfun.com/products/11227
Logged

No, I don't answer questions sent in private messages...

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
however i do need to know where to start and generally how it should be assembled.
When learning to speak a foreign language you start off by learning to ask directions. In practice this is no good to you because you can not use that skill until you have the skill of understanding the answers.

I could answer your questions and you would be even more confused than ever. You need to learn a bit of the language we speak here. You have good advice from fungus get some equipment and start playing with it. You don't start to learn an instrument by trying to play "the flight of the bumble bee", you start with something much simpler. Once you have one LED blinking you will know such a lot more.

I think you can do everything you want from an Arduino Uno without the need for any extra shields, you have 20 pins and each pin can control one LED or read a push button. Six of these allow you to fade LEDs so that is well within what you put on that spread sheet.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

mike, We're talking about 150-200 leds here. Not one LED. Im unsure of the exact numbers at the moment but the excell sheet only really shows the different catagories of lights and their function. within each catagory theres alot of leds.

so going by what you have said i will be needing those expansions.

also, i need to get this started and off the ground. i dont have time to sit there and learn the language then go into programming this. I essentially need to learn the language as I write up the program which is why I have asked for help and not asked people to tell me to learn the language first.
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 118
Posts: 4538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, i need to get this started and off the ground. i dont have time to sit there and learn the language then go into programming this. I essentially need to learn the language as I write up the program which is why I have asked for help and not asked people to tell me to learn the language first.

Ok, so pick a starter kit and get it ordered. You can probably use 90% of the kit in your model so it'll be cheaper than buying separate parts.

Next google "TLC5940" and start reading. Each one can control 16 leds from an Arduino with PWM. Go on eBay and order a dozen of those and a bag of mixed color LEDs. When it arrives and you have it working you can get some suitable size "prototype board", etc. to build the final gadget.

Logged

No, I don't answer questions sent in private messages...

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 506
Posts: 31345
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I essentially need to learn the language as I write up the program
This is impossible, it is too complex.

Quote
i dont have time to sit there and learn the language then go into programming this.
Then you don't have time to do this project, how about taking up knitting?


Quote
which is why I have asked for help and not asked people to tell me to learn the language first.
But you said:-
Quote
But please understand, im not asking someone to do it for me,
It sounds to me like you are.

OK here is what you need to do:-
Connect a bunch of shift registers and run the shift library:-
http://www.elcojacobs.com/shiftpwm/
The rest is trivial.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy_mike. I honestly cannot help but feel your making things more complicated that they need to be. Our wonderful language does include a way to portray information in lamens terms. However that link is very useful, thank you.

My only concern would be controlling say, led 10 then say led 1 then 16 in that order. but im sure its possible with that setup.

Its not impossible to learn programing as you do a project, I learnt programing a HD47780 screen with the RPI while working through that project.

Fungus, thats awesome. thank you. I assume that can be made to control the LEDs on the pin outs in a certain order or all together? Not used that chip before so it will be new, I have the data sheet to read through today for it though.
« Last Edit: December 21, 2012, 07:47:24 am by secretreeve » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, lets see if this sounds correct to you guys.

one shiftregister per catagory of lighting with its capacity expanded to accomodate the led quantity for that cagatory. But using the chip Fungus said for the primary hull and secondary hull lighting as these are on all the while the models lights are on. they only turn off when everything else is shut down.

Each shiftregister assigned to a specific output on the arduino.

Then program each stage into the arduino similarly (but in code) to how its laid out in my first post, Then from there set the cycle loop code and then worry over the push button triggers for start up and shut down as well as the motor triggers?

does that sound right?

so the first block of sort in the program would have the pmw settings for deflector, impulse, necelles, RCS thrusters and torpedo launchers?

and pretty much that for stages 2-3-4 then come back and work on stages 1 and 5 right?
Logged

Pages: [1] 2 3 ... 18   Go Up
Jump to: