PS - You could put a led on the driver select line from the prop to see when a driver is active. It would have to be before the 1K resistor, with the current limiting resistor and led connected to the port and ground.
That's what I was thinking on the enable pins and LEDs. I will probably keep the p0-p4 all consecuitive, and anything above 4 I can use for enables correct, What was the limit again on number of drivers I can put in? 12? I have 16 drivers so I will use all but one as a spare if possible.
You can put 15 or 16 driver chips in if you want. The limit is how many I/O lines are available from the prop. Right now you have P0-P4 for signals to the drivers, P28-P31 for the eeprom and communications with the prop, leaving 23 lines. At least 2 will be needed for control switches ( stop/start, reset ) so there are still 21 lines left for driver select lines and other uses.
Even this is not really a limit since we could use 4 lines to control 16 drivers, 5 lines to control 32 drivers by adding 1 or 2 chips. Not that I can see any point to doing so, 15 drivers is 840 relays, which should be adequate.
Absolutely!,
Well, I am in the process of experimenting with the best transfer media for going from laser to PBC, so far the laser transparency seems to be working pretty well, I'm having to go back and move some of the traces in the design to get a little more space between them on the board when they transfer. It's also odd to see how much free space is actually on the board compared to how it looks packed on the screen.
I'll keep you guys posted on the results. I'm planning on etching with muratic acid and hydrogen peroxide so we will see how that works out.
Well, this has been a semi productive weekend.· Started out Friday night soldering something and my 7 year old daughter came out to see what I was doing and she wanted to learn how to solder, I figured, what the hell, she'll burn herself and be done with it.· Well, needless to say it is her new current favorite past time. I started out with her soldering some scrap wire together, then had her solder a couple of the surface mount LED's to a board with a resistor, then made a more advanced board with 4 led's and a resistor, which she placed and soldered all by herself.· I was in the middle of practicing my toner to PCB transfer methods (which by the way blows).· So I ran in and drew up a board in the PCB artist for a board with 10 surface mount LED's and one of those cheap little bar led's with 10 lights in it I found at radio shack for $.47 and a resistor for every 2 LED's.· Did a quick toner transfer, dropped it in my HCL/Hydrogen peroxide echant and watched it slowly etch it away.· I was impressed with that in itself.·
I cleaned the board and told her what goes where and she proceeded to build the entire circuit board herself. The only thing I was allowed to help with was holding it for her while she soldered those surface mounts.· For a 7 year old with no prior experience, she did amazing. I'll have to post a pic of her board.· I have it setup with a main on/off switch, then another switch to switch between red and green.· I think I found a helper on the 7500 solder points here in week or two when I go to full production.
Anyway, that was just a precursor to getting my toner transfer method down, after many, many, many sheets of laser transparency paper, glossy laser paper, plain paper, and whatever else I could find, I finally settled with the glossy paper method. It worked ok at best, but after about 4 hours of trial and error, I finally got a good transfer on both the front and back of the prototype board.
My PCB drills haven't come in yet so I settled for a #60 bit i found at the hardware store for the drilling, it's about twice the size it needs to be, but it's working ok. The final version when drilled on the CNC will have the correct bits.· So, to keep from dragging this post out any longer, here's where I'm at.
Prototype board will be ready·Monday night, I started drawing up the board for the master console and that should be completed Tuesday night.· I have 2 tpics on the prototype board and 16 relays as planned.
Kwinn, if you get a chance in the next couple of days, can you write a quick program for the propeller to run a test on this board.
I'm going straight ahead with the master console into the full scale, 15 slaves.· The pins will be assigned to the drivers according to our last diagram.· If you can, have each relay turn on for 1 second, then turn off and turn the next one on and off. At the end of the set, turn all on and off, maybe make them flash or do a little dance, be creative if you want. I want to be able to test that the tpics are doing what they want and that the board can push a full set of relays on at the same time. Hell, at one point, kick the whole board on so every relay is active.
By the way, I'm gonna have to send you a thank you gift after the 4th for all of the help and work you've put into this. [noparse]:)[/noparse] ·
Here is the spin program to test the prototype slave.
The data is sent out very slowly so you can see the leds blink. The led on P0 (SER_IN) will blink twice after each 16 bit pattern without toggling the SRCK (serial clock) line as a visual indicator. You can change the speed by increasing (slower) or decreasing "sd" and "ld" in the "CON" section'
You can change the number of slaves the program loops through by changing the number in the "repeat 3" statement just below the "slave := 5" statement.
You can place as many bit patterns as you want in the DAT section. The first one has to be labelled "table" and the last one "tblend". Since we are testing with 16 bits the bit patterns must be words. Only the words between "table" and "tblend" will be sent out. Anything else in the dat section will be ignored so you can keep a bunch of test patterns there.
btw - For the leds to be lit when the signal is active all the led/resistors on the prop pins have to be connected between the signal line and ground except SRCLR which needs to go from the signal line to +3.3V. Makes troubleshooting a lot easier when a lit led always means the signal is active, whether the signal is active low or active high.
Any of you guys ever play with reflow soldering?· I have been doing some research and it looks like a simple toaster over works fine with the correct temp curves for warm up, melt and cool down periods.· This may be a good solution to solder all of these slave boards.· Also, I reprinted my prototype board using the photo paper method and it came out much better then the transparency method. I am using the HCL/hydrogen peroxide method and that seems to eat right through sharpie marks i'm using to repair the traces. Any other good suggestions. I was going to experiment with using something heavier like nail polish or crayon, any other good ideas for something local. My local radio shack doesn't carry a etchant pen.· I also tried the wash proof sharpie. It worked better, but I want something that will work every time.
Will reflow work with boards that have both surface mount and thru hole points? All of the LEDs are surface mount and everything else is thru hole. Maybe push the pins thru the board and give them a little bend onto the trace?
btw - For the leds to be lit when the signal is active all the led/resistors on the prop pins have to be connected between the signal line and ground except SRCLR which needs to go from the signal line to +3.3V. Makes troubleshooting a lot easier when a lit led always means the signal is active, whether the signal is active low or active high.
So would I be correct in assuming tha the srclr is a ground when it is active and that's why you have me running the LED to the +3.3v?
· _xinfreq = 5_000_000············ 'Crystal speed: 5 MHz
' · High = 1························· 'A CONstant used to set an output port to about 3 volts · Low· = 0························ 'A CONstant used to set an output port to about 0 volts · Out = %1························ 'A CONstant used to set a port's direction to Out · sd = 20_000_000·············· ' short delay time····································· · ld = 40_000_000·············· ' long delay time
Am I reading this correct, the sd (short delay) would be 4 seconds and the long would be 8 or is it the 20_000_000/80mhz (80_000_000) so .25 and .5? or am I just all messed up on understanding this timing? I can't imagine you'd make mey wait 8 seconds on the long delay, unless it's some type of canadian joke. [noparse]:)[/noparse] ·
Damn, too bad I already have most of my components in through hole already here and waiting.
Oh well, it will still save me the hardest solder points on the surface led's, maybe I can find some surface resistors cheap too.
I think I understand most of the programming in the test program except this part.
DAT
table word %1111000011110000
word %0011001100110011
tblend word %0101010101010101
What do these relate to? I understand they are 16bit, but I don't see what they are supposed to do. can you give me an example of what the output would be from the table or is this a surprise?
I sure hope so...... I don't want to fire that much stuff by hand and have to wait a year to see all of this hard work in action. And yes, there will be video.
chaosgk, that is the actual data that gets sent to the TPIC's. In the test program we are shifting out 16 bits so there is a " repeat 16 " loop in the program. Being a lazy sort I have only drawn a diagram for 8 bits so if we were shifting 8 bits out that loop would be " repeat 8 ".
So if we wanted to actuate every second relay we would have to shift out " 01010101 " one bit at a time starting with the bit at the right.
First we put the data bit out to the SER IN line from the prop.
Then we bring the SRCK line high and back to low to clock (shift) the bit of data into the TPIC serial register.
After doing that 4 times the data in the TPIC would look like drawing one.
After doing that a total of 8 times the data in the TPIC would look like drawing two. At this point all the data has been loaded but no relays have been actuated.
To actuate the relays the RCK line must go from low to high to transfer the data to the output registers and then taken low again. When that is done any relay connected to an output register pin that has a 1 in it will actuate and things will (hopefully) go boom. See drawing three.
After the relays have been activated for the required time the TPIC will be reset and the entire procedure repeated for the next pattern.
btw - I picked up 2 74HC595's (TPIC without the output driver transistor) and a small prototyping board to build a circuit similar to your 16 relay test board. That way I can test the software with the same circuitry.
Ok, lets see if my logic is with yours... [noparse]:)[/noparse] We are using two tpics so we are shifting out 16 bits, 8 for each tpic? so these would read from the first tpic to the last, left to right with relay 1 being at the far left and relay 16 at the far right?
table word %1111000011110000 Relays that would activate. 1-4.9-12
word %0011001100110011 3,4,7,8,11,12,15,16
tblend word %0101010101010101 2,4,6,8,10,12,14,16
I'm guessing this was just a pattern you made up in your head to give me something to watch?
If my logic is correct, then for a full slave board, we will shift out 56 bits of data to a slave which would look something like:
10101010: 10101010: 10101010: 10000111: 10101010: 10011101: 01010110 without spaces and :'s
once slave 1 has the data, the driver disables, and slave 2 enables, sends out it's 56 bits and so on till all of the slaves are done.
Then all drivers enable and the prop sends out a low signal to RCK, then high, then low, at the instant it goes back to low, we should hear a lot of noise. or in the test version, lights turning on?
Also, before I print the master board, we had talked about having a pause/start pin, which pin will that be assigned to. I think I am only going to wire the master console for 12 slaves, but put the traces in for the other 3 because I have 12 port rj45 panels and right now won't need the additional 3 channels.
To answer your last question first, I would suggest starting at the highest available pin (27) for the buttons and work down from there. That way you can add both and still have them grouped. I would suggest putting pads for series and pullup resistors on all the button and unused lines.
Corect logic and and sequence of events except for the RCK. After all the data has been output the prop waits for the correct time to light the matches then sets RCK high, enables the half of the drivers (P4) that go to all the slaves, then takes RCK low, then high ( toggles it low ). At this point any relays connected to a TPIC pin set to 1 will activate.
I did make up the pattern, but not just for you to watch. I have leds attached to the prop pins so I can watch the lines toggle, and I wanted to be sure the program was picking up the right data from memory, not just some random bits anywhere in memory.
With this pattern:
SER IN led comes on
SRCK blinks 4 times
SER IN led goes out
SRCK blinks 4 times
SER IN led comes on
SRCK blinks 4 times
SER IN led goes out
SRCK blinks 4 times
The next pattern is similar but the SRCK led only blinks twice for SER IN on/off, the last pattern only one blink per SER IN on/off
It's a pretty distinctive pattern and not likely to happen at random so it is a good check.
No, I haven't had a chance to test it. I printed a new prototype board testing a different transfer method, it turned out so good I started soldering to it tonight, I just have a few more vias to solder in tomorrow and that board will be ready.· I'm still drawing up the master board, there's canadian ton (which is bigger then an american ton) of traces that need to be routed on a 8x11 board so it's taking a while or I'm just really slow drawing boards.·
I understood the logic on flashing all of the data lights, I was wondering about these patterns being made up to do something.
table word %1111000011110000 Relays that would activate. 1-4.9-12
word %0011001100110011 3,4,7,8,11,12,15,16
tblend word %0101010101010101 2,4,6,8,10,12,14,16
I think you answered me on those, but just so I'm clear (mind you, i've been sniffing solder smoke all night and it's 1:30am here) on my board, I will see the same pattern of lights you have on the master light up, along with the relay lights above on the test board when they activate?
I'm sure I should know this, but it's late, What do you mean series and pullup resistors on the unused lines?·
Sorry, must be suffering from a case of "everyone knows that itis". Attached is a typical 10K pullup and pulldown resistor with a 1K series resistor. The pullup/down is used to keep the line from floating if it is set to input. An input is very high impedance so noise pickup could cause it to be high or low. All of the lines to the line drivers should have pull down resistors except SRCLR which should have a pullup resistor.
The patterns I sent were made up for me to test the program. I wanted something simple and distinctive to be sure I was outputting the correct data. I can send patterns that will turn on each relay in turn, turn on all the odd numbered relays, all even numbered relays, or any pattern you want. All you have to do is paste the pattern in the "CON" section.
Now that I think about it if you used solenoids instead of relays you could play a keyboard instrument with it.
The series resistors are in case you want to connect to 5V chips. I don't mean for you to actually put the resistors on the unused lines, just to have the pads there in case you need them in future. Each unused line should have pads to put in a pull up or pull down, and series resistor if needed. You can leave them out if you want, but expect an "I told you so" if it turns out you need them.
BTW I picked up a prototyping board and 3 74HC595 (TPICS without output transistors) and wired it up to make sure the test program was working. I modified the program slightly so you could see the output each time it shifted one position. I will attach it to the next post. Keep the program I sent yesterday as well. It outputs to the slaves in the same manner the actual software will.
Here's the prototype board, it still needs power connectors and the cat5 end attached, but this is how it turned out.· Not bad for my first etched board.· Let me know if you notice anything wrong or missing from this one. I will be adding a couple of capacitors to the 5v to help drive the relays.· The full boards will have the LED's on the same side as the relays, that was a oops in the design I didn't want to go back and spend another few hours fixing.· Note, that american dollar is for size reference, so Kwinn, that would actually be something like 15% bigger than your dollar.
Now on to the master console.
I now understand the pullup and pull down resistors, but what is a series resistor? ·
The series resistor limits the current that can flow from a 5V chip to a prop pin. Not needed if everything runs at 3.3V, but that is not always possible. There is a 1K series resistor on the lines going from the prop to the line drivers in the master.
PS Nice guy, rub it in about our dollar. We're used to it.
Wow, too many things going on at once. here it is.
That's my bad.
We get a lot of canadians shopping here since we're about an hour from the canadian border and they're good for business too. Mctrivia, I didn't realize you were from Canada too.·
BTW, what the hell do you guys do for livings anyway?·
Comments
Even this is not really a limit since we could use 4 lines to control 16 drivers, 5 lines to control 32 drivers by adding 1 or 2 chips. Not that I can see any point to doing so, 15 drivers is 840 relays, which should be adequate.
Well, I am in the process of experimenting with the best transfer media for going from laser to PBC, so far the laser transparency seems to be working pretty well, I'm having to go back and move some of the traces in the design to get a little more space between them on the board when they transfer. It's also odd to see how much free space is actually on the board compared to how it looks packed on the screen.
I'll keep you guys posted on the results. I'm planning on etching with muratic acid and hydrogen peroxide so we will see how that works out.
I cleaned the board and told her what goes where and she proceeded to build the entire circuit board herself. The only thing I was allowed to help with was holding it for her while she soldered those surface mounts.· For a 7 year old with no prior experience, she did amazing. I'll have to post a pic of her board.· I have it setup with a main on/off switch, then another switch to switch between red and green.· I think I found a helper on the 7500 solder points here in week or two when I go to full production.
Anyway, that was just a precursor to getting my toner transfer method down, after many, many, many sheets of laser transparency paper, glossy laser paper, plain paper, and whatever else I could find, I finally settled with the glossy paper method. It worked ok at best, but after about 4 hours of trial and error, I finally got a good transfer on both the front and back of the prototype board.
My PCB drills haven't come in yet so I settled for a #60 bit i found at the hardware store for the drilling, it's about twice the size it needs to be, but it's working ok. The final version when drilled on the CNC will have the correct bits.· So, to keep from dragging this post out any longer, here's where I'm at.
Prototype board will be ready·Monday night, I started drawing up the board for the master console and that should be completed Tuesday night.· I have 2 tpics on the prototype board and 16 relays as planned.
Kwinn, if you get a chance in the next couple of days, can you write a quick program for the propeller to run a test on this board.
I'm going straight ahead with the master console into the full scale, 15 slaves.· The pins will be assigned to the drivers according to our last diagram.· If you can, have each relay turn on for 1 second, then turn off and turn the next one on and off. At the end of the set, turn all on and off, maybe make them flash or do a little dance, be creative if you want. I want to be able to test that the tpics are doing what they want and that the board can push a full set of relays on at the same time. Hell, at one point, kick the whole board on so every relay is active.
By the way, I'm gonna have to send you a thank you gift after the 4th for all of the help and work you've put into this. [noparse]:)[/noparse]
·
The data is sent out very slowly so you can see the leds blink. The led on P0 (SER_IN) will blink twice after each 16 bit pattern without toggling the SRCK (serial clock) line as a visual indicator. You can change the speed by increasing (slower) or decreasing "sd" and "ld" in the "CON" section'
You can change the number of slaves the program loops through by changing the number in the "repeat 3" statement just below the "slave := 5" statement.
You can place as many bit patterns as you want in the DAT section. The first one has to be labelled "table" and the last one "tblend". Since we are testing with 16 bits the bit patterns must be words. Only the words between "table" and "tblend" will be sent out. Anything else in the dat section will be ignored so you can keep a bunch of test patterns there.
btw - For the leds to be lit when the signal is active all the led/resistors on the prop pins have to be connected between the signal line and ground except SRCLR which needs to go from the signal line to +3.3V. Makes troubleshooting a lot easier when a lit led always means the signal is active, whether the signal is active low or active high.
Any of you guys ever play with reflow soldering?· I have been doing some research and it looks like a simple toaster over works fine with the correct temp curves for warm up, melt and cool down periods.· This may be a good solution to solder all of these slave boards.· Also, I reprinted my prototype board using the photo paper method and it came out much better then the transparency method. I am using the HCL/hydrogen peroxide method and that seems to eat right through sharpie marks i'm using to repair the traces. Any other good suggestions. I was going to experiment with using something heavier like nail polish or crayon, any other good ideas for something local. My local radio shack doesn't carry a etchant pen.· I also tried the wash proof sharpie. It worked better, but I want something that will work every time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
· _xinfreq = 5_000_000············ 'Crystal speed: 5 MHz
'
· High = 1························· 'A CONstant used to set an output port to about 3 volts
· Low· = 0························ 'A CONstant used to set an output port to about 0 volts
· Out = %1························ 'A CONstant used to set a port's direction to Out
· sd = 20_000_000·············· ' short delay time·····································
· ld = 40_000_000·············· ' long delay time
Am I reading this correct, the sd (short delay) would be 4 seconds and the long would be 8 or is it the 20_000_000/80mhz (80_000_000) so .25 and .5? or am I just all messed up on understanding this timing? I can't imagine you'd make mey wait 8 seconds on the long delay, unless it's some type of canadian joke. [noparse]:)[/noparse]
·
You can cut just make the values smaller for faster times
Reflow does not work for through hole. You need wave soldering for that. You could reflow all the leds
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
Post Edited (mctrivia) : 5/13/2009 9:07:17 PM GMT
Oh well, it will still save me the hardest solder points on the surface led's, maybe I can find some surface resistors cheap too.
DAT
table word %1111000011110000
word %0011001100110011
tblend word %0101010101010101
What do these relate to? I understand they are 16bit, but I don't see what they are supposed to do. can you give me an example of what the output would be from the table or is this a surprise?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
So if we wanted to actuate every second relay we would have to shift out " 01010101 " one bit at a time starting with the bit at the right.
First we put the data bit out to the SER IN line from the prop.
Then we bring the SRCK line high and back to low to clock (shift) the bit of data into the TPIC serial register.
After doing that 4 times the data in the TPIC would look like drawing one.
After doing that a total of 8 times the data in the TPIC would look like drawing two. At this point all the data has been loaded but no relays have been actuated.
To actuate the relays the RCK line must go from low to high to transfer the data to the output registers and then taken low again. When that is done any relay connected to an output register pin that has a 1 in it will actuate and things will (hopefully) go boom. See drawing three.
After the relays have been activated for the required time the TPIC will be reset and the entire procedure repeated for the next pattern.
table word %1111000011110000 Relays that would activate. 1-4.9-12
word %0011001100110011 3,4,7,8,11,12,15,16
tblend word %0101010101010101 2,4,6,8,10,12,14,16
I'm guessing this was just a pattern you made up in your head to give me something to watch?
If my logic is correct, then for a full slave board, we will shift out 56 bits of data to a slave which would look something like:
10101010: 10101010: 10101010: 10000111: 10101010: 10011101: 01010110 without spaces and :'s
once slave 1 has the data, the driver disables, and slave 2 enables, sends out it's 56 bits and so on till all of the slaves are done.
Then all drivers enable and the prop sends out a low signal to RCK, then high, then low, at the instant it goes back to low, we should hear a lot of noise. or in the test version, lights turning on?
Also, before I print the master board, we had talked about having a pause/start pin, which pin will that be assigned to. I think I am only going to wire the master console for 12 slaves, but put the traces in for the other 3 because I have 12 port rj45 panels and right now won't need the additional 3 channels.
Corect logic and and sequence of events except for the RCK. After all the data has been output the prop waits for the correct time to light the matches then sets RCK high, enables the half of the drivers (P4) that go to all the slaves, then takes RCK low, then high ( toggles it low ). At this point any relays connected to a TPIC pin set to 1 will activate.
I did make up the pattern, but not just for you to watch. I have leds attached to the prop pins so I can watch the lines toggle, and I wanted to be sure the program was picking up the right data from memory, not just some random bits anywhere in memory.
With this pattern:
SER IN led comes on
SRCK blinks 4 times
SER IN led goes out
SRCK blinks 4 times
SER IN led comes on
SRCK blinks 4 times
SER IN led goes out
SRCK blinks 4 times
The next pattern is similar but the SRCK led only blinks twice for SER IN on/off, the last pattern only one blink per SER IN on/off
It's a pretty distinctive pattern and not likely to happen at random so it is a good check.
Did you test it on your prototype already?
I understood the logic on flashing all of the data lights, I was wondering about these patterns being made up to do something.
table word %1111000011110000 Relays that would activate. 1-4.9-12
word %0011001100110011 3,4,7,8,11,12,15,16
tblend word %0101010101010101 2,4,6,8,10,12,14,16
I think you answered me on those, but just so I'm clear (mind you, i've been sniffing solder smoke all night and it's 1:30am here) on my board, I will see the same pattern of lights you have on the master light up, along with the relay lights above on the test board when they activate?
I'm sure I should know this, but it's late, What do you mean series and pullup resistors on the unused lines?·
The patterns I sent were made up for me to test the program. I wanted something simple and distinctive to be sure I was outputting the correct data. I can send patterns that will turn on each relay in turn, turn on all the odd numbered relays, all even numbered relays, or any pattern you want. All you have to do is paste the pattern in the "CON" section.
Now that I think about it if you used solenoids instead of relays you could play a keyboard instrument with it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
BTW I picked up a prototyping board and 3 74HC595 (TPICS without output transistors) and wired it up to make sure the test program was working. I modified the program slightly so you could see the output each time it shifted one position. I will attach it to the next post. Keep the program I sent yesterday as well. It outputs to the slaves in the same manner the actual software will.
Now on to the master console.
I now understand the pullup and pull down resistors, but what is a series resistor?
·
The series resistor limits the current that can flow from a 5V chip to a prop pin. Not needed if everything runs at 3.3V, but that is not always possible. There is a 1K series resistor on the lines going from the prop to the line drivers in the master.
PS Nice guy, rub it in about our dollar. We're used to it.
Post Edited (kwinn) : 5/15/2009 3:08:38 AM GMT
We had companies fearing bankruptcy when bush was in power killing the US dollar and ours reached $0.95 Can to $1 US
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
That's my bad.
We get a lot of canadians shopping here since we're about an hour from the canadian border and they're good for business too. Mctrivia, I didn't realize you were from Canada too.·
BTW, what the hell do you guys do for livings anyway?·
Post Edited (chaosgk) : 5/15/2009 3:34:19 AM GMT