Jump to content

Newbie Looking to Drive (real!) Pipes


Trevor
 Share

Recommended Posts

Trevor,

Go to http://www.uCApps.de, select the midio128 on the left hand list.  There is a schematic for connecting relays to the ULN2803.  As mentioned earlier,  I don't think it will work either thats why I recommended the reed relays. there is also a schematic for driving reed relays.

Good luck,'

Johnc

Link to comment
Share on other sites

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

you could use a small transistor per channel to convert each output of the ULN.

But thats not a nice way.

To drive it with relays would be very expensive in your case.

I would do in the following way (my guess):

Don't use ULN as a driver (wrong output for you). You can use small transistors as drivers (cheap) on each output to drive +12V at the output.

You need per channel:

1 resistor (from dout to base)

1 small-signal transistor (PNP!)

1 Diode (1N4148) to protect the output.

This would be much cheaper than one relay and you have your solution!

You don't need a ULN (wrong output for you) or a relais (expensive) to convert the +5V output to +12V

You also need a small change in the firmware, to "invert" the DOUT behaviour (high/low instead of low/high)... but that's not a big thing.

I'm also very impressed about your project.

If you're interested, I can give you a schematic. If you like, I can also make a printed board for you, but (as far as I read your post) you are going to bradboard it again .... no good way.

greets

Doc

Link to comment
Share on other sites

thanks doc!

I will remove the 18 pin DIP sockets from the DOUTs then.  What resistor value should I use between the 74HC595 and the transistor bases?  I am all for using PCBs rather than breadboard.  Could you send me some more info and your schematics?  My email is       oddrocketboy2 [at] comcast [dot] net

Thank you!

Link to comment
Share on other sites

  • 2 weeks later...

Trevor,

I see Doc's point, but  the cost of the Meder electronics reed relays (SIL05-1A72-71D) in the mouser catalog is $2.30 for an order of 50,  $2.43 for an order of 25.  The good thing is that the relays will fit directly on the dout pcboard and the contact is good for 1 ampere.  See the reed relay example on the ucapps website. 

I would venture that the reliability of the static relay device would exceed the transistor approach with much less trouble to install, and  I would suspect that the final cost would be very close.

Good luck,

Johnc

Link to comment
Share on other sites

Your friend is right. 2803s connect positive to ground when on.

Have you thought about using a UDN2981A from Allegro Microsystems or one of the TD62783 series from Toshiba?  These have the same pinout as the ULN type EXCEPT that the supply pins are swapped.  The will output a positive output wrt ground.

I have used these on a large installation and they do work.

Hope that helps.

Regards

Sparx

Link to comment
Share on other sites

Hi all

Have just checked the data sheet and my circuits, I used the TD6273AP.

To use, just connect DOut outputs to the inputs of the TD chip, add supply to the TD chip(s) and when a DOut is active you will get (very) nearly the supply at the output of the TD chip.

I note Trevor describes himself as a newbie and I haven't read all of this thread, but there will need to be a common ground (0V) between the MBHP and the TD boards, ie connect the two GROUNDS fromthe power supllies together.

Sorry if I am teaching Grandma to suck eggs.

Any problems though please post or get in touch.

And of course let us know about your progress.

Regards

Sparx

Link to comment
Share on other sites

Yes as far as I know, the TD62783AP is an equivalent of the UDN2981A-T (or maybe its the other way round!) so either will work.

Sorry if I'm miles off because I haven't followed this thread closely, but wouldn't it be functional to use ULN2803, and invert the DOUTs in software? The software part is easy....

Thats a very logical and reasonable thing to ask, I tried it!

The issue is that the ULN type chips use the positive supply as the 'common' and when the input is high, the output is low thus completeing the circuit.

When the input is low, the output is high impedance so the circuit isn't completed.

If Trevor really wanted to use ULN chips, he could reverse the supply TO the organ as solenoids are not polarised and therefore won't care which way round things are.  But there maybe other issues why this isn't suitable here.

For me, reversing the supply did work for testing but this wasn't a permanent option as the instrument I was working on is an 'original' 1920's residence organ and was already set up to play from a roll player and a console (thats a keyboard for non organ people, myself included).  Adding MIDI COULD NOT interfere with the way the instrument had been designed or operated in the past. The MIDI interface had to connect to the instrument exactly the same way as the other playback devices with no alterations.

Am extremely pleased to say that MIDIO128 was ideal for the job, been said many times before but thank you TK!

Am also very pleased that my experience can now help others do the same.

Feel free to ask more questions and I'll bore you with long answers like this!

Regards

Sparx

Link to comment
Share on other sites

Sparx;

I am planning a similar project using lots of solenoids like the one being discussed here. Am I correct in saying that although the output of the ULN2803 is "inverted", it is still a suitable device for driving a bank of relays used to power solenoids?

Thanks; Ciaran

Yes, you can drive relays and small solenoids with the ULN2803. The issue is what is hooked up full time to the other coil wire. If you use the ULN2803 you hook the full time connection to +5 volts. The ULN2803 connects the other end to ground when the ULN output is on.

Most people find that arrangement counter-intuitive, or at least they did before solid state electronics became commonplace. Older devices like most pipe organs typically have the full time connection to ground so you have source the positive voltage to turn the device on.

Link to comment
Share on other sites

  • 1 month later...

hey all,

I am once again back to this project.  Last night I connected my LCD and powered up the core for the first time.  I got it communicating with the MIOS Studio and SysEx Librarian.

Here's what I have

n210901242_30513221_9647.jpg

I have a couple issues though.  First, the LCD always has all of the pixels on while the power is on.  I checked, re-checked, and re-re-checked the wiring and the contrast pots  My LCD datasheet is located here-

http://www.purdyelectronics.com/pdf/AND491GST.pdf

Second, I have no idea what I need to do next.  My PIC has MIOS on it already.  Do I just have to upload a MIDIO128 syx file and I'm good to go, or is there more to it than that?  I would like to test my completed DOUT (with ULN2803's for testing) driving soleniods.

Link to comment
Share on other sites

so, this evening I realized that I wired the whole darn LCD backwards (wired 1-16, 2-15, 3-14, etc.).  I rewired it correctly tonight, but it still doesn't work.  The contrast pot works now, but still nothing comes up on the LCD.  Did I most likely kill my LCD? Maybe even my PIC too? or is there something else I'm doing wrong? 

Link to comment
Share on other sites

Treavor,

Disconnect the LCD and with the core connected to the midi in on your pc, use midiox to monitor the output of the core. If you get the usual syex string displayed you probably are ok.  I don't have an LCD on my cores and rely on midiox to tell me what is going on.  If you get nothing, then maybe you have a problem.

In any event the next step after loading midio128, you need to configure and load the ".ini" file to configure the system. Go to the wiki and read the procedure on how to do that.  The ini file is where you define what incoming midi message will activate each output pin on your dout cards.

Johnc

Link to comment
Share on other sites

Johnc,

When I boot the thing up while MIOS Studio is running, I do get the single upload request in the monitor.  I can't run Midiox because I don't have a PC.

I configured the ".ini" file then converted it to ".syx" then used SysEx Librarian to put it on the PIC.  I can't really find anything on the wiki about what to do next.  Do I have to load the MIDIO128 application main.syx next or something? Sorry, I'm clueless. ??? ??? ??? ??? ???

Link to comment
Share on other sites

YAY! I did a little messing around it kind of works! ;D

The shift register outputs on the DOUT are actually working!!!! They read +5V when no notes are on and the correct output goes to 0V when I press the corresponding key in the MIOS Studio keyboard.  So, I guess that's progress!

Now, what do I have to do to get this to work with my positive keying?  I have ULN2803's (just for testing) and UDN2981's that I'm actually going to use.  I tried changing the INVERSE_OUTPUTS to enabled in midio128.ini. That caused all outputs on the shift register to read 0V, but when I sent the correct "note on" message, the outputs still read 0V.

One last (simple) question.  What is the best place to connect the +12V to the COM on the ULN/UDN's?

Thank you everyone for your help so far.  I've gone from knowing nothing to having a somewhat working midibox!  You all are great! :)

Link to comment
Share on other sites

Trevor,

On the ULN2803, the com pin connects to the  positive 12 vdc supply and the driver in the chip connects the load connected to the output pin to ground.  The common of all of your magnets is connected to 12vdc rather then ground.

On the UDN 2981,  the common or ground pin connects to ground and the 12vdc supply connects to VS on the chip. In this case, the UDN is switching DC positive voltage to the high side of the magnets.  One side of all of the magnets are connected together and to connected to ground.

On my system, the console is remote from the pipework and chests, so I use a core with DINS only in the console, and each key toggles the DIN input pins from 5vdc to ground.  The ini file for the midio128 with the DINS is set to default, or low active state.  If I ground an input pin, a note sounds. 

On the output side, I have another core with DOUTS in the pipe chamber (35 feet from the console)with midi cable inbetween the two cores.  The [iNVERSE_OUTPUTS] in the ini file for the midio128 with the DOUTS is set to default also, or disabled to get active high on the output of the shift register.  With a uln2803 connected, an active high  to the input pin of the ULN2803, 0  to  5 vdc +/- and the output of the ULN goes to almost 0 volts,  connecting one side of the magnet to ground, with 12vdc on the other side of the magnet.

If you use the UDN in lieu of the ULN,  The active high input to the UDN will produce an active high on the output, 12 vdc.  With a magnet connected between the the UDN ouptut and ground, it would see +12vdc +/- and pickup.  I have not used the UDN driver, but I suspect that its  active high input,  active high output.

You said that you are getting 5vdc out of the shift register on the DOUT with no input, and 0 vdc ouput with active high input. That tells me that your ini file is set set with [iNVERSE_OUTPUTS]  ENABLED,  The outputs are low active, or  5vdc normally going to 0 volts with input.  It should be set to the default value DISABLED.

If I remember your setup,  you need +12vdc to your relay to pickup your magnets,  Evidently,  the stop switches and keyboards on your console are switching  +12vdc on and off.  To duplicate this,  I would think that you have to use the UDNs to provide the 12vdc drive to your relay.

Johnc

Link to comment
Share on other sites

Ttrevor,

Concerning where to connect the 12vdc, Which of the DOUT cards available from Smashtv are you using?  Did you substitute the socket for  the ULN in lieu of the resistors?  Bear in mind that the connections are different for the UDN chip and the DOUT cards made with the option for installing the ULN chip will not work with the UDN without some changes to the card.  I have not examined a DOUT to confirm this, but I feel sure that thats the case.  This should be checked with Smashtv before installing the UDN chip.

Johnc

Link to comment
Share on other sites

hmmm

now that I look at the datasheet for the UDN, it looks like I'm going to have to switch pins 9 and 10.  What would be the best way to do this?  I'm thinking I can just make a solder bridge between the Vs and the unlabled pin and the pin that would go to the COM on a ULN.  Then, can I bend up the Vs pin on the UDN and and solder it to a wire without damaging it?  It wouldn't look pretty, but I think it'd work.

http://www.allegromicro.com/en/Products/Part_Numbers/2981/2981.pdf

^that's the UDN datasheet^

Link to comment
Share on other sites

Trevor,

You didn't say which pc board you were using for the DOUT.

the DOUT boards I am using are early revision boards that were intended to be used with the resistors.  It just so happened that the spacing of the holes was the same as a connector, so SMASHTV figured out how to cut some traces, and add some jumpers to allow installation of the ULN sockets. It worked, but as you say, not pretty.  I think that I would lean toward  cutting some traces, drilling some extra holes and installing jumpers from point to point on the pc board rather then lifting the pin and soldering to it.  Thats my opinion. Without knowing which pc board you have, its hard to comment in detail on what you suggested.

Johnc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...