Touch screen for input selection - Page 1
Forum section: electronics / beginners

author: Barnys1
author_rank: Newbie
timestamp: September 23, 2016, 11:38:57 am
content: HiI am a first time poster, a little skilled but have the time to try, try, and try again...I have been trying to figure out....In a DIY project, how would I create a system where a touch screen can be used to control things like audio inputs – outputs?E.g. if there are two inputs, one going to two outputs and the other going to a singly output, then with a touch screen be able to rearrange which input goes where, how would that work?I have been asking lord google but getting nowhere, so any ideas, points and/or even component suggestions are welcome.Regards.

author: Marco
author_rank: Super Contributor
timestamp: September 23, 2016, 01:05:23 pm
content: Do you have an old android mobile phone lying around by chance?You can connect it to say aTI Launchpad. Do the electronic interfacing on the Launchpad and the GUI on the Android phone.

author: MarkF
author_rank: Super Contributor
timestamp: September 23, 2016, 11:21:44 pm
content: Touch screens have a serial or USB interface the to read the x/y location that was touched. You define an area of the screen for a button, draw the button and then check that area for a touch. Some times you can get a driver that will translate the touches into a curser input. Then you just process mouse inputs.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: September 24, 2016, 08:26:05 am
content: To add to MarkF's answer, the switching of the actual inputs/outputs for audio would typically be done using relaysexamplePre-amp projectby Mark Hennessy

author: Barnys1
author_rank: Newbie
timestamp: October 03, 2016, 02:39:34 pm
content: HiThanks for the replies.I don’t have a smart phone that can be used for this but I have (tentatively) been investigating a potential Arduino/ Launchpad/ Raspberry PI etc solution. They “appear” to be a likely option. I am thinking I will need 8 output pins to switch the relays, does anyone know if an Arduino etc touch screen setup would have enough pins available for the pin-relay switching and screen connection?Relays.I am currently leaning toward a nominal 5 volt DTDP latching style of relay. My reasoning is simply that I have 5V available, DPDT means fewer relays and self latching appeals because it removes the need to always have each active relays coil energised. I am thinking of trying 4 relays so I can run 2 separate unbalanced stereo inputs with both being able to independently switch to 2 separate outputs.Zettler AZ832P2–2C–5DE, 5Vhttp://www.azettler.com/pdfs/az832p.pdfHONGFA HFD3/5-L2S1R, 4.5Vhttp://www.azettler.com/pdfs/az832p.pdfWhat about relay minimum contactor load, as far as I can tell the Zettler doesn’t state a minimum load but the Hongfa is classed as a Signal Relay with a contactor minimum listed as 10mV and 10 micro amps (I have been trying to read data sheets). How critical is a minimum contactor load, would the Zettler serve my purpose? I am having trouble finding suitable relays, there are lots of non latching single pole options but very few DPDT latching types (that is if I don’t want to buy 20 or more of them). Also, is contactor bounce an issue, when dealing with such small current values?Connecting the relays.I have seen some (expensive) premade multi relay units labelled as “passive” with only one diode per relay coil. Alternatively I have seen a lot of examples with many being labelled “for Arduino etc” applications where each relays set (and reset) functions are switched via circuit using transistor(s), resistor(s) and diode and what I think is an optocoupler, alternatively I have seen discussions suggesting a circuit looking similar to this:So, why are some assembled relay boards labelled as passive? Is it because they don’t have active components (e.g. transistor) connected?Since my choice of relay type means I may have to assemble the relay board, what is the expert opinion about each relays associated circuit, is the type linked to above acceptable or is it better to use something like the optocoupler versions, e.g. 3:42 and 8 minsRegards.

author: MarkF
author_rank: Super Contributor
timestamp: October 03, 2016, 08:21:16 pm
content: Latching relays sound like a lot of expense to save a little current.I would suggest an arduino shield with relays and a small touch panel.http://www.arduino.org/products/shields/arduino-4-relays-shieldhttps://www.adafruit.com/products/2050

author: cncjerry
author_rank: Unknown
timestamp: October 04, 2016, 04:46:03 am
content: Latching relays are good for maintaining the status when power is off. If you plan to have this thing under power then it isn't worth the expense as others pointed out. You can use EEPROM to maintain power on/off status. I use relays for things like this and using an arduino shield you can integrate touch screen, wireless, Bluetooth, Ethernet, just about everything even IR control for cheap.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: October 04, 2016, 07:32:38 am
content: Quote from: Barnys1 on October 03, 2016, 02:39:34 pmIt could be a little tight, may depend on the exact display you use, the cheap ILI934x ones on ebay typically use SPI for both the display and the touchscreenFor the relays, you can use 74HC5951coupled with ULN2803/20031which allow 8/7 relays (but can be daisy-chained for more relays) to be controlled using just 3 pins using SPI (can bit-bang so any pin can be used)The ULN2xxx have inbuilt diodes so are ideal*1. other members on this forum may have better options ?

author: Barnys1
author_rank: Newbie
timestamp: October 09, 2016, 12:49:05 pm
content: Thanks again for the replies.I chose DTDP relays because the unit will be powered down and I want it to maintain whatever the previous setting was. Also, I want to switch audio input signals and thought it would be better if the switched relays coils were not continually energised.FreddyVictorPlease correct me if I have this wrong, but as I understand the 74HC595 application the chip allows for multiple switches from each Arduino pin and not an increase in number of unique switches available.Is this possible with an Arduino-relay solution; is there a better way to achieve my goal of being able to use a touch screen to control the destination of multiple audio inputs?E.g. there are two (or 3, or 4...) inputs and two (or 3 etc) outputs, I want to be able to choose which outputs each input goes to. Theoretically input one can go to 1, 2 or all of the outputs, alternatively it could be isolated (no outputs) and the same for input 2, 3...Regards

author: FreddyVictor
author_rank: Regular Contributor
timestamp: October 09, 2016, 03:47:21 pm
content: Quote from: Barnys1 on October 09, 2016, 12:49:05 pmSeethis pageIn1st color picture, they have arduino connected to ULN2803 controlling multiple relays but needing same number of pins on arduino as relaysLater onthey insert 74HC595 between arduino + ULN2803 so they only need3 control pinsfrom arduino to control up to 8 relaysThis pictureshows the 74HC595's daisy-chained together to control 16, but any number can be connected.On the 74HC595, the DS pin is the Serial-Input pin and the Q7 pin the Serial-Output which is connected to the following 74HC595 etcQuote from: Barnys1 on October 09, 2016, 12:49:05 pmYes, every output must have a relay connecting it to every possible input, so, the number of relays required could get quite high depending on how many inputs/outputs you have !

author: MarkF
author_rank: Super Contributor
timestamp: October 09, 2016, 11:32:17 pm
content: Check out the MCP23S17-E-SP instead of the 74hc595:http://www.digikey.com/product-detail/en/microchip-technology/MCP23S17-E-SP/MCP23S17-E-SP-ND/894276