Need some help please

draftnbyu

New Member
Hope some of you can help. I am building a light saber and would prefer to build the control board myself. A friend of mine suggested this site, so hopefully you can me. I think I will get the 18x starter kit. My saber will have 60 leds needing 3-5 volts at 20mah each.

1) Can each of the outputs create a pulsing effect? I think this could be achieved by dropping/increasing voltage/current on the outputs. Is this possible through programming.

http://www.youtube.com/watch?v=2omzw-tqqE4

2) What is actual voltage of the outputs (I think current id 800mah?)

3) Of course I need a on/off switch but I would like to adjust brightness and turn on the pulse effect, however I think there are only two analog inputs, do you have any suggestions?

4) My hilt size 1 and ¼ inside dimensions. I can’t seem to find the dimensions for PCB board that comes with the 18x. Do any of you know what the width and length are? Anyway to make it smaller?

5) I will be using an after market sound board, because I’m not sure if this board can handle the sound needed, not to mention, the aftermarket board has motion/clash sensors built in. Any recommendations for the 18x for sound (what format?) and does any know how to incorporate a motion/clash sensor with the 18x?

http://www.youtube.com/watch?v=52xZ2i8uYY4&feature=channel_page

Thanks for all you’re help
 

draftnbyu

New Member
yeah, is saw the first link already, and building of it is not problems for me. im trying to figure out what i can do with 18x beyond lighting a led. the other two links are interesting and i have to see if that works for application needs

thanks for the response
 

BeanieBots

Moderator
The 18X has THREE analogue inputs.
Each 18X pin can handle 20mA with a total of 100mA for the whole chip.
However, the boards have higher current outputs. How much and how many depends on which one you get.

There's no way to make the board smaller but you could make your own.
In addition to the three analogue inputs, there are TWO digital inputs. These could be wired up to vibration or tilt swithes to do what you want.

The 18X can make sounds but they are rather harsh (square wave).
 

draftnbyu

New Member
The 18X has THREE analogue inputs.
Each 18X pin can handle 20mA with a total of 100mA for the whole chip.
However, the boards have higher current outputs. How much and how many depends on which one you get.

There's no way to make the board smaller but you could make your own.
In addition to the three analogue inputs, there are TWO digital inputs. These could be wired up to vibration or tilt swithes to do what you want.

The 18X can make sounds but they are rather harsh (square wave).
thank you, my understanding is that the 18x starter pack comes with a darlington driver with 7 or 8 outputs at 500mah each i think. more than enough to power my leds. anyone know the width and height of the board?

ill guess ill stick with my aftermarket sound board then, although its also an led driver and cost$115 US and i just need it for its sound capabilties
 

vttom

Senior Member
A possibility for producing sounds would be to program the sound into an EPROM, and then simply use the PICAXE to provide it with an appropriate clock. The outputs from the EPROM would go directly to a digital-to-analog converter to produce the analog waveform that you'd pass through an amplifier and into a speaker.

Total parts cost would be less than US$20. Although, you would have to figure out (1) how to produce the sound you want (2) convert it to a "raw" format, and (3) program it into the EPROM.

Maybe you could buy one of those off-the-shelf single-chip audio recorder/playback devices? Those are a lot less than US$100.

Actually, if you're really adventurous, you could buy a cheap-o MP3 player, take the case off, and then hook up the PICAXE to control the play and pause buttons.
 

westaust55

Moderator
Light Sabre

5) I will be using an after market sound board, because I’m not sure if this board can handle the sound needed, not to mention, the aftermarket board has motion/clash sensors built in. Any recommendations for the 18x for sound (what format?) and does any know how to incorporate a motion/clash sensor with the 18x?

Thanks for all you’re help
Firstly welcome to the PICAXE forum.

If you have not purchased a PICAXE chip yet, consider the new 18M instead of the 18X. One advantage of the 18M is that it has the TUNE command so a simple tune can be played. It al depends how complex a tune/sound you wish to play.
Download the latest manuals (see PICAXE Manuals in the the orange bar at top of this forum pages) and look at the TUNE command in Manual2.
 

BeanieBots

Moderator
Yes, you can do that.
Have a look at the PWM/PWMout commands.
Tricky to get a nice fade up/down if your code needs to be doing much else at the same time. You could resort to a hardware solution as well. A cap and a few transistors would do it if you don't mind a fixed pulse rate.
 

westaust55

Moderator
Light Sabre

To expand upon what BB has advised.

1. There are certain PICAXE chip pins which can be used for PWm functions. That is not all outputs.
But one of those PWM type pins can drive a transistor to control one side of all the LED's.

2. If you then want to be able to control LED's independantly or in groups then use a standard output for each (group of) LED.

In the U-Tube example the pulsing seems to be for the entire sabre so that would be relatively easy.
 

draftnbyu

New Member
[ In the U-Tube example the pulsing seems to be for the entire sabre so that would be relatively easy.[/QUOTE]


you are correct, the entire run of leds need to pulse. so the outputs can be programmed to do that? that would require the outputs to decrease voltage then increase voltage,correct? can the timing of the increase and decrease be dictated by programming? if this the case, i can also manually adjust the voltage of the outputs to control brightness through a variable resistor?

if this board is capable of doing what i want, i would be glad to compensate someone who can help me get the programming correct. its been 24 years since ive programmed basic,lol.
 
Last edited:

draftnbyu

New Member
the up/down effect will be the only code during that time. the problem is, trying to sync the up/down light effect with the aftermarket sound board. if the picaxe can play these sounds ( mind you i need the sounds to be at 1 watt, but perfer to have it 1.5-2 watts. ) then the picaxe would to play sounds and do the up/down effect at the same time. i amagine thats when the code will get tricky.

The pulse effect would only be used after the entire leds are lighted. i have to figure out the function command:
1) on/off switch
2) brightness switch/variable resistor
3) button press to activate " pulsing effect "

im also limited to space. the electronics have to fit inside a 1.25 inch pipe with about 9 inches of length. as i stated before, if someone help me engineer this setup, i would be glad to compensate. i have $1000 solder station with anti-static mat and have been repairing circuit boards for 20 years,yet i do not engineer electronics.lol
 
Last edited:

eclectic

Moderator
@draftnbyu

Just some possible ideas / questions.

How many LED's are there?

Use two or more picaxes; one dedicated just to PWMout/phasing.

Can you do SMD? Get some SOIC ULN2803 to handle the high current.

e
 

eclectic

Moderator
Extra to above.
60 led's (I reread post 1) 60 * 20 mA.

It could be possible, if the LED's are in parallel,
using two or three 18 pin DIP ULN2803 and vero/strip board.
All LED's would need their own indidual resistors. (SIL arrays?)

Although the picture is of another project, it shows an 18X,
inside a 25.4mm / 1" internal diameter tube.

e
 

Attachments

draftnbyu

New Member
Extra to above.
60 led's (I reread post 1) 60 * 20 mA.

It could be possible, if the LED's are in parallel,
using two or three 18 pin DIP ULN2803 and vero/strip board.
All LED's would need their own indidual resistors. (SIL arrays?)

Although the picture is of another project, it shows an 18X,
inside a 25.4mm / 1" internal diameter tube.

e
2 versions, 1 with 60 leds and 1 with 120 leds. doesnt a darlington driver optional with 18x and it can produce 500mah per output. 6 groups of 10 leds is 200mah per group. so 1 darlington could run all these,correct?
 

draftnbyu

New Member
I'm just being cautious. :)

http://www.rev-ed.co.uk/docs/ULN2803A.pdf

page 5, figure 12

e
you have lost me,lol. from what i read each output can handle 200mah,however, i am lost at voltage requirements ( in put ). im trying stay with no more 12v in using lithuim or nimh batteries. i know i can limit input voltages with voltage regulators. i may have to pay someone for engineering my setup, which is fine. i have already sent an email to a company that designs sound boards, so maybe they can build my specs for sound but the led driver is whats killing me
 

eclectic

Moderator
you have lost me,lol. from what i read each output can handle 200mah,however, i am lost at voltage requirements ( in put ). im trying stay with no more 12v in using lithuim or nimh batteries. i know i can limit input voltages with voltage regulators. i may have to pay someone for engineering my setup, which is fine. i have already sent an email to a company that designs sound boards, so maybe they can build my specs for sound but the led driver is whats killing me
1. The Datasheet shows a maximum of ~150mA
for each output, when all 8 outputs are on.

2. I don't know the specs of your soundboard, but Picaxes only need
4.5 - 5.0 volts to run safely.

3. LED driver? A starter, when you get your chips
Code:
#Picaxe 18x
main:
high 3 ; All on
pause 1000; pause 1 second.
low 3

for b0 = 1 to 255

pwmout 3, 64,b0
pause 15
next


for b0 =  255 to 1 step -1

pwmout 3,64,b0

pause 15
next



goto main
e
 
Last edited:

draftnbyu

New Member
1. The Datasheet shows a maximum of ~150mA
for each output, when all 8 outputs are on.

2. I don't know the specs of your soundboard, but Picaxes only need
4.5 - 5.0 volts to run safely.

3. LED driver? A starter, when you get your chips
Code:
#Picaxe 18x
main:
high 3 ; All on
pause 1000; pause 1 second.

for b0 = 1 to 255
w1 = b0*4
pwmout 3,b0,W1
next

for b0 =  255 to 1 step -1
w1 = b0*4
pwmout 3,b0,W1
next

goto main
e
i see what you mean now. what would you recomend to remedy that. 200mah needed for each output. it seems at 7 ouputs running it is just at 200mah but thats pushing it. i read the chart wrong, i did not realize that i need to read at full duty cycle
 
Last edited:
Why not use some BD681/862's Transistors?

These darlingtons and are good for up to 4A (4000ma) continuous. They should handle the current easily. (120 x 20 = 2400 ma, 60 x 20 = 1200 ma)

Datasheet: http://www.datasheetcatalog.org/datasheet/stmicroelectronics/4201.pdf

Use 6 Transistors (one per led group/output) on the cathodes (-) of the leds
and 1 for the PWM connected to the anode (+) of all of the leds?

Have a dedicated 18X incharge of the LED groups and PWM.
Have another 18X (or M) for other tasks.
 

slimplynth

Senior Member
My saber will have 60 leds needing 3-5 volts at 20mah each.

Just out of interest, what power source were you planning on using? sounds like a nine inch pipe is going to get pretty cramped.

these look pretty useful http://ledz.com/led.strip/STR3F.pdf

http://ledz.com/?p=z.led.products.pricelist

though they require 12V.

also in case you hadn't checked here...

http://www.instructables.com/id/S82SLVCFLROM0UJ/

someone posted a link to this Glow EL Wire which looks pretty cool and similar to the kind of colour a lightsabe should be ...6ft and only requires 2 AA batteries, should make interfacing with a picaxe much simpler but no mention of how big the base unit with batteries would be.

http://www.save-on-crafts.com/neon.html?gclid=CLyKvueiqpYCFQ4RnQodM15jyw
 

draftnbyu

New Member
Why not use some BD681/862's Transistors?

These darlingtons and are good for up to 4A (4000ma) continuous. They should handle the current easily. (120 x 20 = 2400 ma, 60 x 20 = 1200 ma)

Datasheet: http://www.datasheetcatalog.org/datasheet/stmicroelectronics/4201.pdf

Use 6 Transistors (one per led group/output) on the cathodes (-) of the leds
and 1 for the PWM connected to the anode (+) of all of the leds?

Have a dedicated 18X incharge of the LED groups and PWM.
Have another 18X (or M) for other tasks.
well the transistors would need to be a pnp then to npn i think:

for 1 neg ouput:neg to base of pnp (also to collector of npn ), +5v to emiiter of pnp, then collector pnp to base of npn, then collector of npn to led.

that would require 2 transistor x 6 outputs puts me at a total of 12 transistors
i only have 7 inch tube with a 1.25 inch inside diameter. i still have sound board, 11v lithuim batt pack and speaker to fit. i know it can be done because one company has already done it

http://www.hyperdynelabs.com/hyperblade/photo_prod.php?picID=prod_BLDU2_lrg.jpg

http://www.hyperdynelabs.com/hyperblade/purchase.php

i may have to outsource this to an eningneering group,lol.
 
Last edited:
Top