<div dir="ltr">Paul from Oxford expressed interest in ways of connecting multiple inputs (switches and potentiometers) to the likes of an Arduino, rather than having to use multiple Arduinos. <div><br></div><div>This is actually a common and easily solved problem. In fact there are multiple solutions, using different approaches with different advantages or disadvantages, using multiplexers, I2C and serial expanders. There are a number of useful integrated circuits (ICs) which could be useful, including members of the 4000 series of CMOS ICs (refer to <a href="https://en.wikipedia.org/wiki/List_of_4000_series_integrated_circuits">https://en.wikipedia.org/wiki/List_of_4000_series_integrated_circuits</a> ). Common ICs include the 4051 multiplexer (also known as a one of eight selector), the 4094 serial to parallel shift register, and the 4021 parallel to serial shift register. All three of these ICs will run off 5Volts and are cheap, readily obtainable, 16 pin devices.<div><br></div><div>The 4051 is useful for allowing up to 8 digital or analog signals to be scanned using just one digital or analog input of the Arduino, with 3 digital output lines from the Arduino being used to select which of the 8 inputs to read. It can also be used to select one of up to 8 output lines to drive - more on this later. The same three address lines can be used to drive multiple 4051 selectors.</div><div><br></div><div>The 4021 is useful for allowing up to 8 digital signals to be read in turn using just one digital input of the Arduino, but requires only two output lines from the Arduino - a "Clock" line and a "Strobe" or "Load" or "Reset" line, which is used to restart the scan process. Multiple 4021s can be wired in series so the same two output and one input lines can be used to scan 16, 24, 32,... digital signals. </div><div><br></div><div>The 4094 is used to drive up to 8 digital outputs (such as indicator LEDs) using three digital outputs from the Arduino - a "Data" line, a "Clock" line and a "Strobe" or "Load" line. Again multiple 4094s can be wired in series so the same three outputs can be used to drive 16, 24, 32,... digital outputs.</div><div><br></div><div>But wait - there's less!</div><div><br></div><div>The same "Clock" and "Load" or "Strobe" lines can be used to drive both 4094 and 4021 shift registers at the same time.</div><div><br></div><div>A final trick - multiple switches can be scanned by wiring them into a matrix such as an 8x8 array or an 8x16 array. If two switches on the same row or column can be closed at the same time, diodes can be used to allow the sense of each switch to be determines without "Phantom keys". There is no reason an 8x16 array cannot be scanned using a 4094 to drive a 4051 which selects one of 8 rows, and a pair of 4021s to read up to 16 switches on that row - or the 12 individual switches of a 12 position rotary switch.</div><div>And the same outputs of the 4094 can be used to drive the address inputs of a second 4051 which can scan 8 analog inputs. The remaining 5 outputs of the 4094 can be used to drive indicator LEDs and a second 4094 can be added to drive another 8 LEDs if necessary All of this can be achieved with about 5 ports of the Arduino - an analog input, a digital input and three digital outputs including a Clock and a Strobe which can also be used to drive other circuitry.</div></div><div><br></div><div>There are other approaches, but this will give an idea of what sort of things can be done.</div><div><br></div><div>Cheers</div><div>Trevor</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 14, 2018 at 10:21 PM, Mark Atherton <span dir="ltr"><<a href="mailto:markaren1@xtra.co.nz" target="_blank">markaren1@xtra.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
Excellent turnout with 29 attendees, and lots of huddles-of tech-talk. $38 + change (in gold, and flat-money) collected and transferred into the robotics loose-change jar (for later banking).<br>
<br>
Possibly the largest number of new faces turned up this evening; hope you enjoyed yourselves, please come back and join us at any meeting.<br>
<br>
Quick reminder: equipment donations are welcome for the trading table, but no CRT based product, printers, toner or items that are likely to be a disposal burden. All sales from the trading table should go into the brown box on the wall, and are directly for the benefit of our host club, NZART Branch 05.<br>
<br>
With thanks on behalf of the group,<br>
<br>
Mark Atherton<br>
<br>
============<br>
<br>
William brought along a home-made hardware demo for interfacing a Raspberry Pi to the outside world, mainly with the interest of connecting to a UPS, using opto-isolation. He also brought along an Arduino attached to temperature and humidity sensors. For output, the unit connected to LCD and 7 segment LED displays.<br>
<br>
Darran demoed a very impressive image recognition software with a web cam for image capture, and Python with OpenCV for processing. Thanks also go to Col for saving the day by bringing a uHDMI cable and adaptor, allowing Darran’s laptop to be connected to the video projector.<br>
<br>
Paul from Oxford brought along quite an impressive start on his flight-simulator-in-the-garage<wbr>. He has moved from a non-technical background into this new hobby, and has made significant progress in this multiple-skill project, including 3D design and printing, Arduino interfacing, and is making a start on interface programming.<br>
<br>
Levi and Seb gave an interesting talk about adventures with 3D design and printing. They have invested a huge amount of time and effort learning about mechanical design and printing, as well as real-world issue. Well done.<br>
<br>
Spencer talked about his waste-water management system. Latest hardware is assembled to a very high standard. He also mentioned interfacing to a 4-20mA sensor.<br>
<br>
Continuing from a discussion initiated by Andy G several weeks ago on the email reflector, Mathew gave an interesting talk about Kismet. This is a software network detector, packet sniffer, and intrusion detection system.<br>
<br>
<br>
______________________________<wbr>_________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank">Chchrobotics@lists.ourshack.co<wbr>m</a><br>
<a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" rel="noreferrer" target="_blank">https://lists.ourshack.com/mai<wbr>lman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" rel="noreferrer" target="_blank">http://lists.ourshack.com/pipe<wbr>rmail/chchrobotics/</a><br>
Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" rel="noreferrer" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>
When replying, please edit your Subject line to reflect new subjects.</blockquote></div><br></div>