Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RE: Cash Draw Interface

Status
Not open for further replies.

otm

Member
Hello Everyone,

I'm working on a little project at the moment that I'm a little stuck with....

Me and a friend are working on creating a Point-Of-Sale software for selling confectionary.

My friend is doing all of the software (C#) and my only input to this is interfacing the software to a cash draw (I'm not involved with the software so this post is only about the interfacing electronics).

Inside the cash draw is a 24v Solenoid latch along with a microswitch to detect whether the draw is open/closed. I have already sorted out a system for supplying a 24v supply to the solenoid, but this is where my problems begin.....

The PC that we shall be using certainly doesn't have the old style parallel port so I will need to rely on a serial DB9 port or USB.

Money is at an absolute premium hence, why I haven't bought some kind of off the shelf USB interface, as these are generally more complex than we actually need, therefore not worth the price.

My issue, is I need to create a system, that allows the following:

An output that can be used to trigger either a relay or FET for the 24v Solenoid and an input that can be used to tell the software if the draw is open/closed (from the Microswitch).

One Thing I did think about was a usb to parallel port adapter, but I wasn't sure if this would work! If so I think I know who to interface with that (and remebering the 74HC07 non-inverting buffer, or an IC along those lines).

Although I said I am not involved with the C# programming I do need to consider how it could be programmed...


Any help is always appreciated.

Owen.
 
Last edited:
RTS and DTR (pins 4 and 7) on that old-school DB9 serial port can be operated as general purpose output port bits. If you only need a pin or two for driving a solenoid, this is an option.

Similarly, DSR, CTS, RI and CD can work as general-purpose input bits for the switches.
 
Last edited:
I agree with Duffy. If you only need a single DI (Digital In) it can easily be done using a RS232 port. If there is no RS232 port a USB to RS232 is a cheap solution. I have one I use for basic projects like that. Beyond the data lines, as Duffy covers, the RS232 offers up three digital inputs and two digital outputs. Lacking a RS232 port, a simple USB to RS232 adapter fits the scheme nicely.

Ron
 
Hi guys thanks for the responses,

So from my understanding of what you are saying, using the standard Serial DB9, and a Maxim MAX232 chip, I can use the I/O from that?

If so, that was quick and painless, and also, Why didn't I think of that!! I can leave it upto my friend to work out the best way to code it!

Cheers,

Owen.
 
Note post #5 in While you could build your own, considering cost I would just buy one.

Ron
 
Ron,

Thanks for that, that is a nifty app!!

Just so I don't end up making a fool of myself, I will need a MAX232 when interfacing +5v logic to the +/- 12v for RS232, correct?

Other than that, It sounds great!!

Owen.
 
Last edited:
You should not need the MAX232. I suggest you try using a USB to RS232 converter. When I was playing around I had no problems reading the data lines. Using that little app you can even wire output pins to input pins (jumper them) and click the outputs driving them high and read them on the input pins. :) There really isn't much to it.

Ron
 
One thing I will say when switching using the RTS / DTS lines, I have had it in the past where I have driven a relay using these lines and as the machine is booting up the lines sometimes switch causing all sorts of interesting things.

Not sure if this happens on all machines, but in my particular case it did, and is just something to be aware of!

Wilksey
 
Ron,

I bought a USB to RS232 and it works exactly as you said it would!!!

Wilksey, Thanks for the comments, this is something I will take on board. I can create some form of RC delay on startup perhaps....

I will cross that bridge as we get to it!

Thanks for all your help,

Depending on how things go, I might be back!!!!

Thank You,

Owen.
 
Hi Owen

The fact that you bought an interface and it actually works the way I said it would supports my theory that even a blind squirrel like myself finds an occasional acorn. :)

Your friend should have no problem reading from the port in C or whatever he is using.

Ron
 
Hello,

Something that I thought would be simple, Is just getting harder!

I can't for the life of me get the interfacing circuit to function. It's not complicated, I just cant get it to work....

I'm basically doing the same as this:

**broken link removed**

but Am using a 5v source instead of 12v.

The Usb to serial adapter I'm using creates a -7v to + 7v swing, and on its own, functions as I would expect using the Software app by Ron.

However, when I try and use the interface, I'm getting 1.7v out of DTR pin (when set high, 0v low), and nothing at the base of the Transistor (I'm using a BFY51, simply as it was to hand, and I don't need anything fancy).

The only difference between the schematic and my Stripboard layout is that I'm using 1n4001 diodes (again to hand, and shouldn't make any real significant differences)

I don't get it..... its not hard!!

Any Ideas??

Cheers,

Owen.
 
Hello,

School Boy error, I should pay more attention to my wire links than the voltage reading sometimes.... I had accidentally connected the Base to ground, not the emitter.

I will need to check again when I put the subminature Relay in to make sure it functions as I expected.

Sorry to bother you.

Owen.
 
Last edited:
No problem and keep us up on how things are going. Watch that wiring. :)

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top