Shop OBEX P1 Docs P2 Docs Learn Events
Relay board - Page 19 — Parallax Forums

Relay board

11719212223

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-07-17 03:40
    There are some other limitations to consider as well.

    The relays need to stay on for .5 seconds, so that slave has to be updated .5 seconds after it has been fired in order to turn the relays off. That means either not using that slave for .5 seconds, or doing some very tricky programming to allow it to be reused before the .5 seconds is up.

    If you have a lot of new slave data to upload the relays that are currently on may not be shut off after 0.5 seconds. They may be on for a little longer.

    On the plus side, some of the limitations can be planned around, and the way the timing works the errors are not cumulative. That is if a shell is fired .3 seconds late because there were a lot of slaves to update, the next one will be on time if there is enough time to upload the data before it needs to be fired.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-17 03:52
    See the attached schematic for the status leds.

    Let me know if you are making any changes to the master. In the glare of 20/20 hindsight I can see some changes that would simplify and improve the hardware and software. Don't want to push them unless you are already planning some changes to the PCB that mean making new ones.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-17 07:01
    kwinn it is bad practice to have an ic run the positive side of an led. should have a common positive and pull low to drive led.

    I had mentioned my modules could be tied to your master. After looking at your schematic I see yes up to 8 modules could be tied to each of the cat 5 cables with the use of a DS96173 and a master relay. My match verification system would not work because it requires bidirectional data.

    I am hoping I can meet you in September when you have your next show.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • BradCBradC Posts: 2,601
    edited 2009-07-17 08:05
    mctrivia said...
    kwinn it is bad practice to have an ic run the positive side of an led. should have a common positive and pull low to drive led.

    Really?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Release the hounds!
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-17 13:49
    most if not all ics can provide more current to VSS then VCC. Not sure if any other reason.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-17 15:10
    I think I follow the logic of the slave timing.· Will this work.

    At 350 S1 RY32

    AT 365 S2 RY14 RY16 RY 38

    AT 380 S10 RY1 RY 6

    AT 400 S12 RY48 RY49

    Since at what time would they all fire right now.· I would guess it would work since we are only sending it to one slave at a time.·We only have to worry about sending data out to the slaves that are either getting ready to fire, or have fired already to reset the relays.

    If that is the case, I can easily work the timing out on my end to compensate for it.

    Also, the relays can stay on for longer than .5 if needed. They can probably stay on until the next data cycle being sent out.· We can send the data out to all drivers at the same time right, for clearing the relays or is that also one at a time?

    I will be modifying the master from it's current version when I send it to get printed. I'm going to try and pack a lot more onto a smaller area (like mctrivia)· so I can get the cost down and fit more on the board. Let me know what hardware changes you want.· I got busy last night so I didn't get a chance to test the master at all and I have a company outing this weekend so I won't be able to test till about 12:00 on sunday.· How many slaves are we setup for right now, was it 12 or 15?·

    Also with the status LED's, these leds draw hardly anything so it shouldnt' be a problem for the status IC's.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-17 16:56
    Leds draw little still good idea to run otherway around

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-17 17:16
    By the way I should getting my first panel on the 27th and those phoenix connectors early august.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-17 17:26
    Is it just a simple change in the software to change the status LED IC's·from VDD·to VSS and then I change the wiring on the master?

    Post Edited (chaosgk) : 7/17/2009 6:46:20 PM GMT
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-17 17:30
    Hardware turn led around and change vss to vdd

    Software invert output

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-17 17:51
    chaosgk, it takes the same amount of time to fire one relay on a slave as it does all 56 relays. The data has to be sent to each slave in turn, so if you are firing 2 relays on different slaves it would take twice as long to send the data as it would if you were firing 2 relays on the same slave. The simplest way to deal with the limitations is to distribute shells that have to be fired close together on different slaves and put shells that have to be fired simultaneously on the same slave.

    I would like to modify the connections to the slave select '595's so that they share the data and clock lines with the line drivers. I will send an updated schematic later today. Let me know if you want to make the changes.

    mctrivia, re: "bad practice to have an ic run the positive side of an led"

    Lighting a led by pulling the negative to ground is more in the nature of a tradition from the days of ttl chips with open collector outputs than "good practice". That was the only way it could be done with an open collector output, and most driver ic's (ULN200x) have npn transistors with common emitters and individual open collector outputs.

    It is generally true that most chips can sink more current than they can source, but high efficiency leds draw so little current that it no longer matters how they are connected.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-17 19:10
    Kwinn,
    What amount of time are we actually looking at for sending data out to each slave.
    As I understand it, the problem would be if we tried to fire multiple shots from different slaves faster then what we can send data to them at. So it will really only be a problem if I want multiple slaves to fire at the same time. It's the amount of time we need to get them all addressed and ready to fire before the time runs out.

    Say I want to fire 10 relays, all on 10 different slaves all at the same time.
    As long as I have a little time .5-1 sec after the last shot, everything will be addressed just fine and fire the way it is supposed to.
    Say I fire a shot at 450 and try to fire the 10 shots listed above at 460, there wouldn't be enough time for them to all get addressed.

    There will be times that I will need to fire multiple slaves at the same time, but for the most part, there will be at least a 1 second pause in between them. In fact for the most part, there should really be at least 1 seconds between most shots if not more. I'm looking mainly at an effect where I have say a row of 10 mines, connected to 10 different slaves the sequence would be from slave 1-10, relay 1 on each slave with a .25 second delay between each relay firing. The mines would be spaced about 25 feet apart.
    About the only other place I could see it would be aerial shells where I want a bunch of different shells to burst in different areas of the sky in the same type of sequence.
    If this will work with the current programming, it will work just fine for me.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-18 06:10
    The exact time required to send data out to each slave will depend on how fast we can send it over the ethernet cables.

    - 1Kb/s would be 58ms per slave, 870ms for all 15.
    - 8Kb/s would be 7.2ms per slave, 108ms for all 15.

    Setting up 10 slaves would take .58 seconds at 1Kb/s, and .078 seconds at 8Kb/s so if you fired a shot at 4.50s you would need to send data at 8Kb/s to set up 10 slaves to fire at 4.60s. Even 4Kb/s would be too slow. I am reasonably sure we can run at 8Kb/s over 300 feet of ethernet but not positive. Once I get the pasm version working we can try it out.

    Having a .25 second pause between slaves being fired in sequence can be done even at 1Kb/s.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-18 06:21
    chaosgk, here is the schematic with the changes I would like to see. They are optional, so you do not have to make them, but I need to know what you decide.

    If you decide to connect the status leds between the '595 pins and VDD as mctrivia suggested you can do so, just let me know so I can make the software change.

    If you want to put leds on the other 2 '595's (slave select) you can do so, but keep in mind that if you connect them between the pin and VDD they will be off when the slave is selected. That is not something I can change in the software since the output has to be high to select the slave.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-19 02:16
    chaosgk, hold off making any changes until I have a chance to go over the current design. At the time I did the initial design I did not realize how tight the timing requirements would be. Give me until Sunday evening to go over everything.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-19 02:27
    why are you using only 8kHz? I am using 400kHz capable chips are the TKIPs not that fast?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-19 03:23
    mctrivia, I am doing the slave select/status at 600Kb/s and plan to run the slaves at 30Kb/s to start. I hope the line drivers/receivers can deal with 200-300 fet of cat5 cable at that speed.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-19 06:19
    RS485 specs say 100kbs at 1200m


    http://www.lammertbies.nl/comm/info/RS-485.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-19 14:38
    I may try 60Kb/s

    Chaosgk, in the original design I thought there would be more time between firing shells (fire shells, wait 0.5s, turn off relays, download new data) so I had the clear signal go to all the slaves in parallel. That will not work if we want to fire slaves closer together than 0.5 seconds. We will have to clear slaves individually, which means having the slave select go to both halves of the line drivers. I will post an updated schematic later today.

    Post Edited (kwinn) : 7/19/2009 2:52:47 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-07-19 20:46
    CHAOSGK, I have attached two versions of the updated schematic. While I can live with option 1 I would prefer option 2. It makes the software simpler and cleaner. Let me know which one you want to go with. I need that info asap so I can continue with the software.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-07-19 20:50


    Has there been anything built yet?
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-20 00:22
    Chaosk has built a few masters I believe. My modules which are not entirely related but do similar thing will be back from pcb shop on 27th and assembled early August for testing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-20 13:00
    What is the '244 on the Master V2? If I'm redesigning, I can change it to whatever you want.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-20 15:12
    That is great. Go with the second option with the '244 (74HC244). It allows us to use the same signal lines and software to output data to the slave select/status chips and the slaves. This makes the software simpler, faster, and smaller. I will continue working on the software with that in mind.

    Just to be sure it wasn't missed, the slave select signals now go to both halves of each line driver chips now instead of having SELE3,4 select one half of every line driver. The SELE3,4 signal is no longer used. The pin is now used to control the '244.

    BTW - Sorry for the confusion I am causing you. I am used to dealing with folks who know this stuff and the lingo as well as I do. I will try to do better in future.
  • chaosgkchaosgk Posts: 322
    edited 2009-07-20 18:09
    No problem. I assumed that the 244's were something along the lines of the 595's but I wanted to be sure. What exactly does the 244 do?
    I will draw up the new master tonight.· For a test, can I get by with only a couple of driver chips so I can prototype it quickly and make sure it works or do I need to build the prototype with all 16 slaves.

    All I'm really changing on the master is adding the '244 and making the selects the same for both sides of the 595's and the data is coming from the 244 instead of directly off the prop?

    Is this the correct order of selecting a slave.
    Data is sent to the 244, p10 selects the drivers to get the data and p11 selects the 595's to get data?· The 595's select the drivers to get turned on to receive the data, then the 244 sends the data to the drivers?
    ·
  • kwinnkwinn Posts: 8,697
    edited 2009-07-20 22:34
    The 244 is basically 2 separate 4 bit buffers on a chip. The input signals from the prop are connected to both sides of the input pins and P10/P11 enables the output of the 2 sides. This allows me to select the '595's or the slaves as the recipients of the signals.

    BTW I forgot the pullup/down resistors on the outputs of the 244. Pins 9 and 12 should have resistors to +5V, and the other 6 pins should have resistors to ground. Anything in the 10K to 22K range would be fine.

    As for the slave selects, the clocking and data signals to the '595's are now going through the '244 instead of directly, and there is also a change on the line driver chips as well. Pins 4 and 12 on the line drivers are both connected to the slave select (SELS1 - SELS15) line coming from the 595's.

    The sequence would now be:

    Make P11 low to allow the signals (SER_IN, SRCK, RCK, SRCLR) to go to the '595's and shift out 24 bits of data (1 of 16 slave selects and 8 status bits)

    Make P11 high and P10 low to allow the signals to go to the slave driver chips and on to the selected slave, and then send out 56 bits to the selected slave.

    Repeat for each slave that has to be updated.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-20 22:38
    Two driver chips on the master would be fine for testing.
  • kwinnkwinn Posts: 8,697
    edited 2009-07-24 00:30
    http://forums.parallax.com/showthread.php?p=826161

    mctrivia, I have taken your suggestion and started a synopsis of the relay board thread on the propeller forum. The link is above.


    chaosgk, I have posted the updated schematic and latest software there. It is not complete, but it can be used to test the master and slave boards when they are ready.

    It is set up for an on/off switch for the run/pause function and a momentary push button (although a switch would also work) for the reset. The run/pause switch has to go from the pause position to the run position before it will start.

    The attached command table will:

    select slave 1 and set relays 24 and 56 at 2 seconds

    select slave 2 and set relays 23 and 56 at 4 seconds

    etcetera, etcetera, until it:

    selects slave 16 and set relays 9 and 56 at 32 seconds

    It will stop execution and go to the initial state at the end. Putting the switch to pause and back to run will restart it.

    I still have a few things to finish, such as turning the relays off after .5 seconds, and controlling the music. If we can send data to the slaves at a rate of at least 60Kb/S we should be able to meet or exceed all your requirements (ie update and be ready to fire relays on all your slaves in less than .1 second).
  • chaosgkchaosgk Posts: 322
    edited 2009-07-24 15:05
    Sounds good. I'm still working on the redesign of the master. I've been getting frustrated with printing them myself so I will be using the advanced circuits company to get some prototypes printed. It looks like I should be able to fit the entire master on a 60sq/in board and I can get 4 of those for $33 each with a 5th one free. I am hoping to get the design of the master finished so I can upload the files tonight. Printing myself just seems to be a hastle and if I can design it correctly and get 5 printed and delivered for $150, it's worth not having to deal with it myself. That will also give me 4 boards to work with and one to send to you (kwinn) I have plenty of all the chips to populate the boards so I will send a fully functional master to you minus the switches.
  • mctriviamctrivia Posts: 3,772
    edited 2009-07-24 15:08
    Your lucky to Canada it is $60 extra for shipping from them

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5

    Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Sign In or Register to comment.