I had this strange idea to mod my playmates Toy TNG Phaser Type 2 into a replica prop from the show featuring all of the needed electronics inside so it's more to the show.
I'm just gonna build the main electronics first and get the sounds in later and how I can program the 10 LED segment or 8 LED segment (if those exist) to go up a step if I press a button? like this
Press once for Stun level 1 - press twice for stun level 3 and so forth until it's up to the max kill level?
then once those are programmed in then I can worry about the PCM audio, I'm basically working on my own version instead of stealing a sketch from someone else, as this is my replica Phaser Type 2.
plus I'm adding in a relay but not sure what kind I should use to turn off if the phaser is left on for about a mere 10 seconds.
Plus should I ditch the two AA battery holder and mod it hold a 9v battery?
9V batteries have a very low capacity and current, forget them. Can you fit 4xAA or 4xAAA somehow? Another possibility would be a Li-ion or LiPo battery, but you would need a suitable charger.
A relay will not be necessary. You can put the circuit into a low power sleep mode to save battery life.
Driving 8 or 10 leds is easy if you have 8 or 10 pins free. An Arduino Pro Mini would be a good choice. If 8MHz is fast enough for your PCM audio sketch, you can get. 3.3V Pro Mini.
Post some close-up external and internal pictures of the device so we can see what space you have to work with.
PaulRB:
9V batteries have a very low capacity and current, forget them. Can you fit 4xAA or 4xAAA somehow? Another possibility would be a Li-ion or LiPo battery, but you would need a suitable charger.
A relay will not be necessary. You can put the circuit into a low power sleep mode to save battery life.
Driving 8 or 10 leds is easy if you have 8 or 10 pins free. An Arduino Pro Mini would be a good choice. If 8MHz is fast enough for your PCM audio sketch, you can get. 3.3V Pro Mini.
Post some close-up external and internal pictures of the device so we can see what space you have to work with.
I don't mind lower capcity as I won't use a lot XD as for low power I need to completely shut it off to converse battery so a relay is needed for mine if I can tell the arudino to shut off for 10 seconds of no play
seen it on youtube and what I see is a 10 pin led segment and mine will only feature maybe 5 or 6 (have to buy both and see f one of them fits into the fake display of the toy.
Using a relay will probably waste more battery power when the circuit is on than it will save when the circuit is off, even if it is off for 99% of the time. Relays use a lot of power.
Using a low power sleep mode, the Arduino can consume very little power when the circuit is not being used.
PaulRB:
Using a relay will probably waste more battery power when the circuit is on than it will save when the circuit is off, even if it is off for 99% of the time. Relays use a lot of power.
Using a low power sleep mode, the Arduino can consume very little power when the circuit is not being used.
I see now I'll have to add in that code to make it off and not in use.
is there a way to make a 8 x 16 (two rows of 8 LEDS) light up as I go through the button increase the power level?)
Yes, you can connect two leds in parallel to each of 8 Arduino pins. You will need 16 series resistors. The value of the series resistors must be chosen such that you don't overload the Arduino pins with too much current. What colour will the LEDs be?
PaulRB:
Yes, you can connect two leds in parallel to each of 8 Arduino pins. You will need 16 series resistors. The value of the series resistors must be chosen such that you don't overload the Arduino pins with too much current. What colour will the LEDs be?
it's gonna be yellow, green, and red - it's basically close to the actual 3rd Season power display, wwith rectangle LEDS crammed on an little circuit board it's like this I'll make a key
= on
= off
***-----
it's basically gonna be like that plus 11 is needed for PCM sound and a wire going to the toy's speaker and I need to somehow hot wire the 2nd sound when it's in the Red leds of the power level and only plays if I press the trigger button and if it's off red it uses the first sound and vice versa
PaulRB:
So you need to individually control 16 LEDs? Is it important that the LEDs remain on while the sounds are produced?
only if it can be done...so I'm gonna do a 8 LED series and yes it must be on while pin 11 is used for the speaker for the PCM Audio library, plus how I can wire the needed sound when it's on the max red led of the main soundbaord of the Phaser?
Captain_Alexander:
so I'm gonna do a 8 LED series and yes it must be on while pin 11 is used for the speaker for the PCM Audio library
I was going to suggest multiplexing to control 16 leds, but that would not work while the PCM audio is running, unless you add extra chips for the leds. But you may not have space for extra chips.
Captain_Alexander:
how I can wire the needed sound when it's on the max red led of the main soundbaord of the Phaser?
I don't understand your question. The sound always goes to the speaker from pin 11, whichever sound you play. Your sketch will know if the red leds are lit or not. I will then choose which PCM sound to play.
PaulRB:
I was going to suggest multiplexing to control 16 leds, but that would not work while the PCM audio is running, unless you add extra chips for the leds. But you may not have space for extra chips.
I don't understand your question. The sound always goes to the speaker from pin 11, whichever sound you play. Your sketch will know if the red leds are lit or not. I will then choose which PCM sound to play.
well a standard 8 LEDs will be ideal since the mini 8MHZ will be used anyway.
as for the sound the switch where it controls the two sounds would be tricky to hot wire to the green to yellow leds then when the first red is on it sounds the next sound from the toy's sound board and so forth the last two as well which would require tons of wires for every led that's lit.
Captain_Alexander:
as for the sound the switch where it controls the two sounds would be tricky to hot wire to the green to yellow leds then when the first red is on it sounds the next sound from the toy's sound board and so forth the last two as well which would require tons of wires for every led that's lit.
Hmm.. it's hard to make sense of what you are trying to explain. Are you planning to re-use the PCB shown in the picture to drive the speaker? I thought you were going to have the Arduino play pcm audio through pin 11? I think you should draw a diagram of the various components you want to use. Just a block diagram at this stage, not a full schematic. Draw it out neatly on paper and post that. Also some close up pics of the toy's soundboard showing where the wires coming from the board go to.
PaulRB:
Hmm.. it's hard to make sense of what you are trying to explain. Are you planning to re-use the PCB shown in the picture to drive the speaker? I thought you were going to have the Arduino play pcm audio through pin 11? I think you should draw a diagram of the various components you want to use. Just a block diagram at this stage, not a full schematic. Draw it out neatly on paper and post that. Also some close up pics of the toy's soundboard showing where the wires coming from the board go to.
I'm gonna use the toy Soundboard to do the phaser fire sounds and light the light buld (will replace with amber 5mm LED soon) while the arudino contains the beep for the power level up.
Yes, you can use the analog input pins as digital output pins to drive leds. But digital pins 0 & 1 are used for sketch upload and serial monitor, so avoid using them if you can. Won't you also need some pins for buttons (up, down, fire)?
Captain_Alexander:
I'm gonna use the toy Soundboard to do the phaser fire sounds and light the light buld (will replace with amber 5mm LED soon) while the arudino contains the beep for the power level up.
How will you do that? Does it have some input connections, so you can select which sounds to play?
If that works, the Arduino will not need to make the sound effects (except beeping), so you can use multiplexing to light your 16 LEDs using 8 pins, or as few as 5 pins (charlieplexing).
PaulRB:
How will you do that? Does it have some input connections, so you can select which sounds to play?
If that works, the Arduino will not need to make the sound effects (except beeping), so you can use multiplexing to light your 16 LEDs using 8 pins, or as few as 5 pins (charlieplexing).
yes with the sound board I must hot wire to the corrsponding led like yellow to green is the first sound of a short fire and the reds will play the weird disruptor sound (unless I build a arduino code to fire a new mini disrupter sound)
so how I can multiplex pins 2-9 to make one line of leds lit then the second line to be lit? that's gonna be a challenge to do so and use analog pins a the button circuits to light the LEDs
I'm gonna use push momentary buttons so that means I click turn on the leds by sequence and down by the other one, and program in a diagnostic mode to it by holding it for about 4 seconds.
PaulRB:
Stop stalling. Tell us what you know about the sound board. Post pics.
There's this switch - other then the speaker and this is how it switches over the sounds https://goo.gl/hWLS4H
now here's the board (on another photo) https://goo.gl/t7ujxc - it's this switch that controls the two sounds it has and it also controls the light too when pressing the fire button.