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

Relay board

1111214161723

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-06-02 14:49
    chaosgk, I am not quite sure I understand your question but I will do my best to explain what I meant.

    First, the "Home" position sensors. These are totally separate from the encoders. They are usually a photo interrupter or a micro switch on each axis of motion that is activated at one end of the range of motion. For your CNC that could be left side on the X axis, front on the Y axis, and up on the Z axis. This is usually considered the 0, 0, 0 position

    The encoder I suggested is a very basic one using an inexpensive photo interrupter and a pattern printed on clear plastic with a laser or ink jet printer. I am not sure what you mean by a solid pattern, but the matching pattern over the open slot is there to provide a good signal. When the black lines line up a maximum light gets to the detector, when the lines on the encoder disk line up with the clear areas of the stationary pattern minimum light gets to the detector. This provides the best possible signal from the photo interrupter.

    The type of encoder that has 2 outputs is called a quadrature encoder, and can provide the direction the motor is turning in while the simple one I suggested only provides an indication that a step was taken. This is done by comparing the timing of the A and B signals which are 90 degrees out of phase. If A changes before B you are going in one direction, If B changes before A you are going the other way. It is possible to add a second photo interrupter to the circuit and produce a quadrature signal but alignment would be tricky.

    Not too sure how your PC software works or if it would support it, but it is feasible to have one pulse out from the encoder for every 2 or 4 steps of the motor. More complicated since the signal now has 3 or 5 levels instead of just minimum and maximum. My guess is that if you have a quadrature encoder input to the software, then it supports feedback to have actual position match the commanded position. Just a guess though.

    The trickiest part may be printing the encoder disk. The ones I made had a nice binary number of slots (8, 16, 32, 64) and were produced by starting with 2 lines at right angles, copying and rotating those lines, and then overlaying them until we had as many lines as we wanted.
  • chaosgkchaosgk Posts: 322
    edited 2009-06-02 20:08
    Printing the disk is simple enough, my CNC design software allows me to create gears and I can specify the number of teeth. I could also use excel to create a pic chart and simply use 1's and 0's for dark or light on the chart.·

    I may look into it here and do some simple experimenting.· You know any place to get the photo sensors, something to reuse them out of or a local shop like radioshack?
    ·
  • Dale StewartDale Stewart Posts: 8
    edited 2009-06-03 00:48
    People who do pyro for a living use dedicated hardware and software.

    Suggest that you bark up that tree...
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-03 00:56
    Dale your sugestion does not make sense. He is building a dedicated hardware platform with dedicated software. The system will run nothing more then those tasks associated with the pyrotechnics.

    If you are thinking he should use a system allready out there because it is already out there you miss the point. Someone always has to build a newer, better, cheaper version. In this case he is building a cheaper version then what is available. When he is done with some testing and some upgrades he could start selling them to people like you that just want to use something already made.

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

    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-06-03 03:03
    Well said mctrivia, thank you. I don't think he actually read the entire thread. If he did, he would actually understand that everything here has been built from scratch just for this purpose and nothing else.
    A system comparable to this would run tens of thousands of dollars for half that many cue points.· It may just be a prototype for now, but who knows, a year or two down the road, you may be looking to buy something like this from me.· (Btw, mctrivia and kwinn you two share in any profits if anything ever comes around from this).·

    Post Edited (chaosgk) : 6/3/2009 3:10:26 AM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-06-03 03:11
    I took a quick look at Mouser and found the attached opto switch. This is not necessarily the cheapest or best one for the job, just the first one I found. I have also made my own using a small block of black plastic, an IR led, and a photo transistor.

    Some of the older more expensive printers (dot matrix and daisy wheel) used them to limit carriage travel.

    Never thought of using excel for a pie chart. Great idea, must try it.
  • chaosgkchaosgk Posts: 322
    edited 2009-06-03 03:52
    That was exactly what I was thinking it was.
    Can one of you verify for me. I'm tired and going through double checking the master before I print it. VSS is ground and VDD is + on the propmod, VDD should be 3.3v. Everywhere there power going into some type of chip on the board, there should be a capacitor between + and ground to take out any noise.· All of the other chips should be 5v.·
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-03 04:06
    That is correct. The propmod has the caps onboard so you do not need one for it but it will not hurt if you do.

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

    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-06-03 14:05
    I took a look at a few more opto interrupters and found this Omron unit at DigiKey (DigiKey pn OR625-ND). It has a 0.5mm aperture, so if the disk has lines that width or wider there is no need for a matching pattern on the opto sensor.
  • chaosgkchaosgk Posts: 322
    edited 2009-06-05 07:39
    Well, we're on our way boys. The CNC is finally fully functional and accurate. WOOO HOO. I've found it's by far easier to drill the board, then do the transfer to it. It seems nearly impossible to get it perfectly aligned with where the drill holes need to be if the board is already printed and etched. I also had trouble with it ripping the copper off the pads that way as well. My little distribution boards that the ignitors plug into take exactly 50 minutes to drill the 375 holes on them. I know for sure that none of us could do that. I The distribution boards will be etched tomorrow night, and If there are no other changes to the master, that will finally be drilled tomorrow night too. I'm expecting that one to take around 2 hours to drill. What a relief. Most of my other supplies are on the way. It looks like I'm going to have to order more PCB's, I didn't realize just how many I've burned up testing the machine. At least they are cheap.

    If you two ever need boards drilled, please don't hesitate to ask, I will always be willing to help you out with whatever I can. I used the Press N peel the other night and I was not impressed with the how it transferred. It may have been the copper, but I sanded it with 600 grit on the orbital till it was almost a mirror finish, then went over it with acetone and immediately transferred the image. The traces come out awesome if everything would stick. I have two more sheets so I will try it again on the master, but if it doesn't pan out, I don't think I'll waste any more money on it.
    Well, it's late and I have a long day and night tomorrow.
  • kwinnkwinn Posts: 8,697
    edited 2009-06-05 15:15
    That's good news. I will have most of Saturday and all of Sunday to work on cleaning up the software so I expect to have it ready to start testing and debugging next week. I wont have a hardware setup identical to what you have, so you will need to check it as well.
  • chaosgkchaosgk Posts: 322
    edited 2009-06-05 17:28
    Just after I posted that last message, I went out to check the drilling, exactly 50 min like I expected, It returned to exactly it's home position for that board and life seemed good.· Then I realized a little (450 count) OOPS.· I used the wrong size of bit for the board.· The boards it was drilling were the igniter distribution boards and they have larger size pins on it. Apparently when I drilled the original, I had used the correct size bit and didn't realize it wasn't my standard size.· Needless to say, I have to redrill 1/2 of the holes on each board. Not a big deal, and I learned my lesson. It only takes 17min to redrill.

    The other thing I notice is my drilled holes don't line up exactly with the printout.· I have a transparency of the board that is printed with the drill holes and they are all close, like with in 1/50th of an inch or better, but I'm curious why the print wouldn't match exactly with the drilled holes.· All groups of pins are exact, it's just the distance from one side of the board to the other that gets off just a bit.· I don't think I'm losing any steps because it returns to exactly home every time. If I was losing steps, I would notice it at the home position.· Any guesses.· As far as I know, X and Y are square to each other. I will do some testing tonight to see if they are true square, but that wouldn't affect the X distance being off a bit.


    Post Edited (chaosgk) : 6/5/2009 8:03:11 PM GMT
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-05 18:03
    Maybe your step size is bigger then you thought.

    20 mil is pretty large

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

    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-06-05 19:50
    That's what I'm thinking of, but it wouldn't be off by much and I don't know exactly how to calculate it besides what it should be in theory.
    200 steps/revolution. 10 turns per inch. = 2000 steps per inch. If I wasn't coming back to exactly home on X,Y,Z I would chalk it up to losing steps. I may play around with the digital caliper tonight and see if I can get a measurement at 0 and at 6". Maybe the lead screw isn't exactly 10tpi, maybe it's actually closer to 9.99 or whatever and that slight difference is throwing me off. It is more noticable on the X axis than the Y which does make sense because Y is 8", X is 11".

    Perhaps I can just try dropping
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-05 20:02
    Drill 4 holes 8 inches apart measure and then compensate for the error. Make sure you measure from the same edge of the whole.

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

    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-06-06 23:21
    Did some testing and it looks like i was off by about 10 steps per inch on the x axis and around 5 on the Y axis. Doesnt' sound like a lot, but·10 steps would put me off by about .05 inches over the course of a foot, give or take a few 1000th's. The Master is being drilled again with the new settings and should be ready later tonight.

    Anyway, I hope to have the master functional tomorrow if the transfers go good.

    Well, off to DJ a wedding. Why does work have to get in the way all the time.....

    Post Edited (chaosgk) : 6/7/2009 6:40:52 AM GMT
  • chaosgkchaosgk Posts: 322
    edited 2009-06-08 01:06
    Well, I had a MAJOR setback today. The 500 2 position spring connectors I have for connecting the igniters to in the system are all wrong. They are all two position, one connection type instead of two position, two connection. Luckily I found it now before they were all soldered in place, but it's still a major setback. If you know of any place for cheap spring connectors, let me know right away. I never even thought to make sure they were seperate. It has two pins and two holes, it should be two connections!
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-08 01:08
    can you not cut the wire between them?

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

    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-06-08 03:30
    No, I opened it up and it's the whole assembly inside. the spring and everything is tied together. On a side not of progress, my solder flux came in and I did a test with 15 LEDs spread out across a test board, some with the traces tinned with regular solder and most with the new paste. Threw it in the toaster oven for about 2 min on 250 (F) and cranked it up to 450 for about 3 min, as soon as I saw everything melt I turned it down to 150 and let it sit for a couple min then off.
    That is AWESOME. Every LED worked perfectly so I'm very happy about that. Not happy enough to counteract the other problem, but still very cool.
    Got any use for spring connectors?
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-08 03:34
    reflowing is definetly the best way for surface mount. That is what I now use to assemble the propmods.

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

    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-06-09 14:07
    Another snag last night, fried two driver chips on the CNC machine last night, had one spare and replaced it, but it's down for a few days. I have a new controller and two spare chips coming. Was my own fault, I accidentally shorted the 28v feed while hooking up cooling fans and the drivers were plugged in. It must have caused a spike and blew the chips.
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-09 14:32
    That is why my propmods have the over voltage protection. I shorted 12v to 1 while designing. Add a zener to the circuit will protect against short sparks.

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

    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-06-10 20:53
    I decided to try something new on the transfer process, instead of using the 400-600 grit sandpaper, I said F it and took my wire buffing brush mounted on my drill press to one of the scrap boards I've messed up, lifted the drilling base up till it was putting a lot of pressure on the board and buffed the heck out of it till it was shiny. It was a perfect transfer, not a single trace or pour area came off during transfer and removal of the paper. It's a little more work to get the paper off because it sticks so much better, but well worth the effort. Just need to find a way to quickly heat and press the boards. At least I have a glimmer of hope to get this done.
    I may hand drill the master, which sucks with roughly 600 holes on the master.. Ah, an idea..... I am using sockets for all of the chips, I didn't think to bend some of the pins out and use them as surface mounts on the top side. Dang, that will save me a bunch of hastle. I know you mentioned it earler to bend pins on other things to make them SMD, but it didn't occure to do it half and half. Sweet. Just gotta update the layouts. Awesome!!!!
  • chaosgkchaosgk Posts: 322
    edited 2009-06-17 19:44
    Is there a simple way we can add status lights to the slaves to verify that they are actually on and receiving data from the master. I picture it as a key switch on the master that when turned one way it sends out data to the slaves and have it blink the lights.· This would be independant of the original programming for the show and the show program cannot be started until that test key is turned back to·the run position.· It would be cool if each of the slaves would blink their slave number.· Slave 1·blinks once at 1 second intervals,· Slaves 2-15 blink their slave # at 1/2 second intervals with a 2 second pause in between flash sets.

    I will sacrifice a relay on each slave if we can make this work.· It would be nice to have some type of confirmation that they are receiving data without risk of something firing, then during the show, I would like them to flash fast just before a relay triggers.· If this part is too complicated or will cause a problem, it's not a big deal, we could also just have them come on when any of the relays are active on that slave.



    ·
  • kwinnkwinn Posts: 8,697
    edited 2009-06-18 13:38
    The only thing I can think of is to activate the last relay in the slave. This requires that a 1 bit is shifted all the way from the input to the last position and then shifted to the output. It would also be prudent to test each slave before connecting it to the matches. A simple circuit with 7 leds and current limiting resistor that you can plug in to each RJ45 in turn along with a simple pattern to activate each relay in turn.

    I was under the impression you were going to have an led on each relay in the slaves. Did that change?
  • chaosgkchaosgk Posts: 322
    edited 2009-06-18 16:04
    No, it didn't change, the slaves are still going to have their LED's for the relays, but I was looking for a status indicator for when we connect them to make sure the connection is actually good, and then right before the show go around to the slaves and verify they are receiving data after the ignitors have been connected. I suppose I can just put a switch on the common ground that runs to the relays and disable all of those, then start the program for the show. The only problem we have with that is the music runs for about 5 minutes before anything goes off so it would be a bit of a wait for the status lights.
  • kwinnkwinn Posts: 8,697
    edited 2009-06-19 18:44
    You could run a test program to activate the relays on each slave before you connect the matches or power them up.
  • chaosgkchaosgk Posts: 322
    edited 2009-06-22 15:10
    That would work. Do we have a final version of the spin code for everything ready to go?
  • kwinnkwinn Posts: 8,697
    edited 2009-06-23 03:29
    chaosgk said...
    o we have a final version of the spin code for everything ready to go?/quote]

    Not quite. Everything is written but I still have some bugs to find. I will clean it up tomorrow and add in the places for mctrivia to insert the start, pause, and restart of the music so he can do that while I fix the rest of the bugs.
  • mctriviamctrivia Posts: 3,772
    edited 2009-06-23 08:51
    The pause and play functionzs are are already writen so you jusi need to call them

    I am assuming you will be premixing the music before only way to garente timing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us and propmod_1x1 are temporarily out of stock(selling faster then expected). Only $30. PCB available for $5

    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.