chaosgk, after writing a bit of the software for the master I would really suggest using a keyboard instead of push button switches. While I will not have time to do it for the July 4th weekend or possibly even this summer, having a keyboard connected would allow us to use the prop to generate the timing commands as outlined earlier in the posts.
I didn't really want to use keyboard, i wanted it to be a simple toggle switch for the pause/start function and a momentary switch for the reset, but if a keyboard will work better, I can go with that. I don't have the keyboard/mouse on the prop, but I can order that as well. Whatever fuctions you need to to set for the pins, just let me know and I will make it work based on what you are doing. Did I understand that correctly, this won't be functional by the fourth. A friend of mine's dad is a software developer and she thought he would be able to write the software that would allow us to create the time code based on the keys pressed and export that to a text document or whatever we need.
If you prefer a toggle switch and a momentary switch that is OK. I will write the program with that in mind.
The program for the prop should be functional before the fourth of July. What I referred to was software for the prop to generate the timing not being ready by then.
I am counting on you having someone else do all the non prop software. I just will not have the time.
I should have the layout for the time code and ignition bit sequence for you by Thursday morning at the latest. That should be all you need to write the PC side of the software.
Awesome. I was planning on having someone else do the timing codes. I'm going to experiment this week a bit and see what I can come up with for that. I am also going to pull my mixer and CD player out to see what the signal is that comes from the mixer to remote start it. It has to be just a simple pulse of some sort, I can't imagine it's a very advanced protocol.
I'm in Minneapolis for training today so I will check back when I can.
Ok, did some quick research and it appears that the fader cue start I want to use is simply a relay in the CD player. When it recieves a pulse from the mixer, it starts the song, when it recieves another pulse, it resets the song. This will work for start/reset on the song, but I think I would have to manually pause it.
I have a couple of damaged CD players that only play the first 30 min of a disc then have trouble. I may be able to hot wire the start/pause button to have the prop control it somehow.
It's either hot wire the button or use a solenoid or motor to press it.
Now on to relay numbering. I am assuming that we will be numbering the relays as per the attached slave schematic. That seems to be the simplest. Let me know ASAP if you need something different. The sequencing will be done in software but both the prop and pc software need to have this settled.
What would be the output of the sd card? 3.5mm standard headphone jack? If it can play/pause the music linked to the play/pause of the program it sounds like a good solution to me. ·
the sd card has a data output. connects to 4 pins on the prop. prop reads the files off the card and outputs the audio signal on 1 wire for mono 2 for stereo.
Awesome. Kwinn, can you incorporate that into the software?
I'm not sure how it calls it, but let me know what you need and what pins to assign to what.
Not sure about music from the SD card. I sure would like to if time permits Depends on how much work is involved to integrate it with the timing software.
mctrivia, can you pm or email the schematics and software to me?
Numbering scheme will be as on the slave schematic attached to the post earlier today.
chaosgk, attached is a .spin file with the constants, sample data table, and explanation to create the timing commands. Let me know if you have any questions.
I plan to get the command interpreter working before I look at adding the sd card and wave player to the prop.
Adding the SD card and 2 audio lines will use up every available pin on the prop:
P0 to P19 - Slave select and control lines.
P26 and P27 - Start/Pause and Reset push buttons
P20 to P23 - SD card interface
P24 and P25 - Audio out
Come to think of it, we also need at least a couple of status leds (run/pause, reset). I can free up several lines by adding a decoder or shift register to do the slave selection. Shift register would use fewer lines. What do you think?
Version 0.01 of the master console software.
It still has at least 1 bug, and the timer has not been implemented. For testing I am using a delay loop which is actually a bit easier since I can vary the value of the delay to speed up or slow down things. You may find it useful for testing slaves, and it may help in writing the PC software.
The spreadsheet I used to produce the commands in the DAT section of the software. I would suggest the first version of the PC software only produces a text file with "at ttt 'a cr cr" where ttt is elapsed time in tenths of a second (no decimal point), a is the keyboard character pressed, and cr is a return.
Kwinn, I will look at it when I get a chance. For some reason after my flight in from Minneapolis last night my ears haven't popped and I feel like Smile so just trying to think is making me feel worse.
I may try to etch the master board yet tonight, but we'll see how long I can stay up.
mctrivia, going mono would leave 1 free pin. I will wait and see what happens. If we have to add a chip or two to free up some prop pins we may as ell get back as many as we can at that time.
chaosgk, as they say on the islands " no worries mon ". The software is on track with very little left to fix. Relax, have a drink, and go to bed.
I have replaced the controller software in my earlier post with the latest version. As far as I can tell there are no bugs remaining but it is not finished. For testing I am using a keyboard with the return key being used for start/pause and esc for reset. This version is intended for testing the master and slaves.
The following items remain to be done.
Replace keyboard with switches.
Replace counting loop with 1/10th second timer.
We may need to add some status leds - run, pause, reset - Any others?
Add sd card and audio output for music.
Additional decoding to free up lines. Three 74HC595's for slave select and status? It would free up 14 lines.
Ok, working on getting the information to my programmer for the timing software.
In the excel spreadsheet, you have S1+RY56 for everthing. Am I correct in assuming that is a reference to the Slave1, relays 1-56 and the RY24 would be Relay 24 on Slave 1.
Slave 2 would be S2+RY56 and Relay 24 would be· Slave 2 relay #24
The att would read as 30 for 3 seconds, 300 would be 30 seconds and 12000 would be 20 min?
Then I will need to create a map of where I want things to be and edit the excel file to have the correct address of whatever I want ignited.· The letters output from my program is just a reference for me making the map, then I choose the Slave and relay in excel to ignite that pyro at the time recorded.
Is this the current reasoning.
What else do I need to order for the master console now, get me a list of parts and I will get them on the way for the audio add in.
·BTW, I feel much better today, a night off from thinking really helped.
The +RY56 means relay 56 will be activated. If you look at the table at the bottom of the spin program you will see that the relay commands are 2 longs.
long S1 + RY33+RY41+RY56
l l
l relays to be activated. Each RYxx causes a specific bit to be set to 1 in this long. up to 24 relays (from 33-56)
l can be specified on this line
> slave to send the bits to. up to 15 slaves can be addressed (from S1-S15). in hex it is 11 to 1F, with the first digit (1) indicating a slave
command and the second digit being the slave number.
long RY1+RY7+RY24 +RY32
l
l relays to be activated. Each RYxx causes a specific bit to be set to 1 in this long. up to 32 relays (from 1-32)
can be specified on this line
The relays in the spreadsheet are arbitrary. I chose 56 because it is the the first one shifted out, so I could see it move down the line of leds. Relays 1 to 24 were selected so I could see each led light up in turn and make sure the timing code works. I assembled a small board with 3 shift register chips and 24 leds to test and debug the software so I have to be a little creative to verify bits 33-56.
You are correct about the timing "at + 30" would be the command to activate the relays set up by the slave commands at 3.0 seconds from the start of the program.
The spread sheet I sent was only to illustrate a fast simple way to generate the command table. After a bit more thought I would suggest that you don't bother with excel, but use WordPad instead. If the PC software generates a text file as shown below for each key press:
1- long S < These lines would be read from a text file by the
2- long RY < program and inserted in front of each "at time" line
3- long at + <time> 'x < This line is produced by the program <time> is the time in 1/10 seconds and x is the key you pressed.
You can use WordPad to add the slave numbers, relay numbers, and add the "+"
S and RY do not have to be upper case, and you can use any convenient character instead of the + and do a search and replace later.
Lets see if I got it now.
Line 1: long S1 (specifies slave #) + RY# (any relay from 33-56) + RY# (any relay from 33-56)
Line 2: long RY# (any relay from 1-32) + RY# (any relay from 1-32)
Line 3: long at + 20
Line 1 specifies Slave 1, plus we choose any of the high relays 33-56
Line 2 specifies the 2nd set of relays, 1-32, the slave has already been specified in the first line.
Line 3 specifies that this occures at 2 seconds into the program.
I am guessing that somewhere in the code it is telling it to run the commands to trigger the selected relays once they have been set, then go on to the next sequence of clear, shift, ignite.
Once the table is complete at the end, it will have the entire show consisting of sets of 3 lines of longs.
How do we pick more than one slave to fire different relays at the same time?
Say Slave2 triggers Relay 5 and Slave 6 triggers Relay 33, both at 450?
I'm just looking for examples of the way things may go.
A friend of mine already has some of the timer software written, he just has to figure out how to include the time in 100ms incriments, but he only worked on it for a few minutes.
You got it, and you can put as many slave commands between the time lines as you want. For instance, the following would activate relays:
[noparse][[/noparse]24 and 51 on slave 1],
[noparse][[/noparse]23, 37, and 48 on slave 2],
[noparse][[/noparse]19, 22, 31, 54 on slave 3],
[noparse][[/noparse]21 0n slave 4]
All of these relays would be activated at 80 seconds from the start. Also note that the order of the relays does not matter within one line, and the s4 line does not specify a relay. If the next line is not firing any relays a zero should be entered there. I will add a constant to the program to take care of that.
long RY24
long S2 + RY37 + RY48
long RY23
long S3 + RY54
long RY22+RY31+RY19
long S4
long RY21
long at + 800
kwinn said...
You got it, and you can put as many slave commands between the time lines as you want. For instance, the following would activate relays:
[noparse][[/noparse]24 and 51 on slave 1],
[noparse][[/noparse]23, 37, and 48 on slave 2],
[noparse][[/noparse]19, 22, 31, 54 on slave 3],
[noparse][[/noparse]21 0n slave 4]
long RY24
long S2 + RY37 + RY48
long RY23
long S3 + RY54
long RY22+RY31+RY19
long S4
long RY21
long at + 800
This was either a typo or a test, but I think it should have started as
long S1 + RY51··· (this line was missing)
long RY24
Then the rest of it.
As far as the S4 goes, would there ever be a reason to select a Slave and not a relay on either line?
Relays 33-54 are always with the Slave select line and relays 1-32 are always on their own line? ·
Yes it should have started with "long S1 + RY51". It was there in the beginning. I must have deleted it by mistake.
No there would not be any reason to select a slave and not have a relay on either line. No harm in it, but you are basically doing nothing. The S4 does have a relay on the second line.
The slave command is a 2 long or 8 byte length command. The first long has the slave command and number in byte 4 and the 24 relay bits in bytes 1, 2, and 3. The second long has 32 relay bits in bytes 1 to 4. Having a relay line missing like I did would not be good. It could lead to enabling the wrong relays from that point on.
You could also output to a slave more than once between 2 time commands, The last relay command would be the one that is done.
Comments
The program for the prop should be functional before the fourth of July. What I referred to was software for the prop to generate the timing not being ready by then.
I am counting on you having someone else do all the non prop software. I just will not have the time.
I should have the layout for the time code and ignition bit sequence for you by Thursday morning at the latest. That should be all you need to write the PC side of the software.
I'm in Minneapolis for training today so I will check back when I can.
Ok, did some quick research and it appears that the fader cue start I want to use is simply a relay in the CD player. When it recieves a pulse from the mixer, it starts the song, when it recieves another pulse, it resets the song. This will work for start/reset on the song, but I think I would have to manually pause it.
I have a couple of damaged CD players that only play the first 30 min of a disc then have trouble. I may be able to hot wire the start/pause button to have the prop control it somehow.
Now on to relay numbering. I am assuming that we will be numbering the relays as per the attached slave schematic. That seems to be the simplest. Let me know ASAP if you need something different. The sequencing will be done in software but both the prop and pc software need to have this settled.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
board1, Relay1-56
Board2, relay1-56 or however you need to number it.
·
http://obex.parallax.com/objects/324/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
I'm not sure how it calls it, but let me know what you need and what pins to assign to what.
Post Edited (chaosgk) : 5/19/2009 7:18:05 PM GMT
mctrivia, can you pm or email the schematics and software to me?
Numbering scheme will be as on the slave schematic attached to the post earlier today.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
uSD does not have irq and p9
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Post Edited (mctrivia) : 5/20/2009 5:02:26 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
chaosgk, attached is a .spin file with the constants, sample data table, and explanation to create the timing commands. Let me know if you have any questions.
I plan to get the command interpreter working before I look at adding the sd card and wave player to the prop.
Adding the SD card and 2 audio lines will use up every available pin on the prop:
P0 to P19 - Slave select and control lines.
P26 and P27 - Start/Pause and Reset push buttons
P20 to P23 - SD card interface
P24 and P25 - Audio out
Come to think of it, we also need at least a couple of status leds (run/pause, reset). I can free up several lines by adding a decoder or shift register to do the slave selection. Shift register would use fewer lines. What do you think?
Version 0.01 of the master console software.
It still has at least 1 bug, and the timer has not been implemented. For testing I am using a delay loop which is actually a bit easier since I can vary the value of the delay to speed up or slow down things. You may find it useful for testing slaves, and it may help in writing the PC software.
The spreadsheet I used to produce the commands in the DAT section of the software. I would suggest the first version of the PC software only produces a text file with "at ttt 'a cr cr" where ttt is elapsed time in tenths of a second (no decimal point), a is the keyboard character pressed, and cr is a return.
Post Edited (kwinn) : 5/21/2009 1:27:16 PM GMT
I may try to etch the master board yet tonight, but we'll see how long I can stay up.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
chaosgk, as they say on the islands " no worries mon ". The software is on track with very little left to fix. Relax, have a drink, and go to bed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
The following items remain to be done.
Replace keyboard with switches.
Replace counting loop with 1/10th second timer.
We may need to add some status leds - run, pause, reset - Any others?
Add sd card and audio output for music.
Additional decoding to free up lines. Three 74HC595's for slave select and status? It would free up 14 lines.
In the excel spreadsheet, you have S1+RY56 for everthing. Am I correct in assuming that is a reference to the Slave1, relays 1-56 and the RY24 would be Relay 24 on Slave 1.
Slave 2 would be S2+RY56 and Relay 24 would be· Slave 2 relay #24
The att would read as 30 for 3 seconds, 300 would be 30 seconds and 12000 would be 20 min?
Then I will need to create a map of where I want things to be and edit the excel file to have the correct address of whatever I want ignited.· The letters output from my program is just a reference for me making the map, then I choose the Slave and relay in excel to ignite that pyro at the time recorded.
Is this the current reasoning.
What else do I need to order for the master console now, get me a list of parts and I will get them on the way for the audio add in.
·BTW, I feel much better today, a night off from thinking really helped.
Post Edited (chaosgk) : 5/21/2009 4:10:22 PM GMT
The +RY56 means relay 56 will be activated. If you look at the table at the bottom of the spin program you will see that the relay commands are 2 longs.
long S1 + RY33+RY41+RY56
l l
l relays to be activated. Each RYxx causes a specific bit to be set to 1 in this long. up to 24 relays (from 33-56)
l can be specified on this line
> slave to send the bits to. up to 15 slaves can be addressed (from S1-S15). in hex it is 11 to 1F, with the first digit (1) indicating a slave
command and the second digit being the slave number.
long RY1+RY7+RY24 +RY32
l
l relays to be activated. Each RYxx causes a specific bit to be set to 1 in this long. up to 32 relays (from 1-32)
can be specified on this line
The relays in the spreadsheet are arbitrary. I chose 56 because it is the the first one shifted out, so I could see it move down the line of leds. Relays 1 to 24 were selected so I could see each led light up in turn and make sure the timing code works. I assembled a small board with 3 shift register chips and 24 leds to test and debug the software so I have to be a little creative to verify bits 33-56.
The spread sheet I sent was only to illustrate a fast simple way to generate the command table. After a bit more thought I would suggest that you don't bother with excel, but use WordPad instead. If the PC software generates a text file as shown below for each key press:
1- long S < These lines would be read from a text file by the
2- long RY < program and inserted in front of each "at time" line
3- long at + <time> 'x < This line is produced by the program <time> is the time in 1/10 seconds and x is the key you pressed.
You can use WordPad to add the slave numbers, relay numbers, and add the "+"
S and RY do not have to be upper case, and you can use any convenient character instead of the + and do a search and replace later.
Line 1: long S1 (specifies slave #) + RY# (any relay from 33-56) + RY# (any relay from 33-56)
Line 2: long RY# (any relay from 1-32) + RY# (any relay from 1-32)
Line 3: long at + 20
Line 1 specifies Slave 1, plus we choose any of the high relays 33-56
Line 2 specifies the 2nd set of relays, 1-32, the slave has already been specified in the first line.
Line 3 specifies that this occures at 2 seconds into the program.
I am guessing that somewhere in the code it is telling it to run the commands to trigger the selected relays once they have been set, then go on to the next sequence of clear, shift, ignite.
Once the table is complete at the end, it will have the entire show consisting of sets of 3 lines of longs.
How do we pick more than one slave to fire different relays at the same time?
Say Slave2 triggers Relay 5 and Slave 6 triggers Relay 33, both at 450?
I'm just looking for examples of the way things may go.
A friend of mine already has some of the timer software written, he just has to figure out how to include the time in 100ms incriments, but he only worked on it for a few minutes.
[noparse][[/noparse]24 and 51 on slave 1],
[noparse][[/noparse]23, 37, and 48 on slave 2],
[noparse][[/noparse]19, 22, 31, 54 on slave 3],
[noparse][[/noparse]21 0n slave 4]
All of these relays would be activated at 80 seconds from the start. Also note that the order of the relays does not matter within one line, and the s4 line does not specify a relay. If the next line is not firing any relays a zero should be entered there. I will add a constant to the program to take care of that.
long RY24
long S2 + RY37 + RY48
long RY23
long S3 + RY54
long RY22+RY31+RY19
long S4
long RY21
long at + 800
Post Edited (kwinn) : 5/21/2009 11:19:08 PM GMT
long S1 + RY51··· (this line was missing)
long RY24
Then the rest of it.
As far as the S4 goes, would there ever be a reason to select a Slave and not a relay on either line?
Relays 33-54 are always with the Slave select line and relays 1-32 are always on their own line?
·
No there would not be any reason to select a slave and not have a relay on either line. No harm in it, but you are basically doing nothing. The S4 does have a relay on the second line.
The slave command is a 2 long or 8 byte length command. The first long has the slave command and number in byte 4 and the 24 relay bits in bytes 1, 2, and 3. The second long has 32 relay bits in bytes 1 to 4. Having a relay line missing like I did would not be good. It could lead to enabling the wrong relays from that point on.
You could also output to a slave more than once between 2 time commands, The last relay command would be the one that is done.