EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: Treehouseman on March 05, 2016, 05:37:27 am
-
I've been working on an overly complicated clock project that has resulted in it containing 7 arduino pro mini's, an arduino mega, and an ESP8266 for wifi. I came across the ESP-Link firmware that would give me a wifi based serial link and I'm wanting to add it to the clock to manage programming of the arduinos and configuration of the wifi ESP by adding a second ESP (I already have a handful as well as a handful of extra pro mini's). The original idea was that I would have configuration dip switches on the back, a tedious and clunky thing that while it would work would be annoying to install and use, but someone mentioned to me that I could use an analog switch IC, so I started looking into those. From what I can see so far it looks like they're designed for this type of use but I can't find any information on any successful/unsuccessful attempts of using one with this style setup. I'd need to be able to control the reset, tx, and rx, pins of each device and transfer them over from the normal wiring to go to the second ESP, so I've been looking at SPDT IC's. And after a few hours I just feel hopelessly lost, there's plenty of IC's that look like they'll work but I can't justify spending $30+ on a whim for something that if it doesn't work I'll probably not have an alternative use for. Ideally in the end I'll have the second ESP have a web interface to select the device to connect to, then I can just telnet in and reprogram or send direct commands as needed without needing to change wiring or switches. I'm less concerned with getting the ability to control the gpio on the second ESP when using ESP-link since I could just use one set of dip switches instead of 3 and a bunch of headers for an external programmer. If anyone has advice or experience with these IC's it'd really be appreciated.
Also for those curious why a clock needs 7 microcontrollers, the main display is made up of 6 viewfinders that each need a composite video feed.
-
I'm finding it partially difficult to understand how exactly, you have got things wired up together, WITHOUT a schematic diagram.
But it is beginning to sound like, you may be looking for logic level multiplexers. These (low cost) chips, allow you to connect, e.g. 8 devices (each with 4 signal pins), into one set of 4 signal pins. But I could easily be misunderstanding the situation.
Example:
http://www.digikey.com/product-detail/en/texas-instruments/CD74HCT251EE4/CD74HCT251EE4-ND/1507740 (http://www.digikey.com/product-detail/en/texas-instruments/CD74HCT251EE4/CD74HCT251EE4-ND/1507740)
CD74HCT251EE4-ND $0.26 Each Digikey.
It has three pins with a binary number (0 .. 7), which selects which of the 8 pins is sent to the output. You would need one of these chips, for each signal, you want to transfer.
Called S0, S1 and S2 on the datasheet. Here:
http://www.ti.com/lit/ds/symlink/cd74hc251.pdf (http://www.ti.com/lit/ds/symlink/cd74hc251.pdf)
But there are potential technical problems, with some types of signal (because they need to idle low or high, and other stuff). I don't understand what is required well enough yet, to advise.
There are different multiplexers available, depending on your exact requirements.
If they are NOT low voltage logic level signals, then a different method would probably need to be used. I.e. I am a bit confused as to why you wanted to use analogue multiplexers, rather than digital ones ?
There may be better/easier ways of doing this ?
-
between the slaves and the master (the arduino mega) there's 1 wire common to all, they look for a designator character and then get their data, what I need is something to let me connect a second ESP setup as a link/programmer to each one of the atmegas independantly, it needs the TX, RX, and RST pins, technically the only thing this circuit would modify is the single serial out from the master, which it would disconnect to switch over to the serial out from the ESP.
In the picture, the lines in red is as wired now, in blue is the pattern for what I'm wanting, though it'd also have to break the RX connection in red, I can't use software serial on the slaves while using tvout at the same time. Digital multiplexers are fine, there's no need for analog, I was just finding more promising results under the analog field than digital. Realistically the only pins that need to be SPDT are the RX pins on the slaves and the TX and RX on the main ESP, the rest could be SPST.
-
between the slaves and the master (the arduino mega) there's 1 wire common to all, they look for a designator character and then get their data, what I need is something to let me connect a second ESP setup as a link/programmer to each one of the atmegas independantly, it needs the TX, RX, and RST pins, technically the only thing this circuit would modify is the single serial out from the master, which it would disconnect to switch over to the serial out from the ESP.
In the picture, the lines in red is as wired now, in blue is the pattern for what I'm wanting, though it'd also have to break the RX connection in red, I can't use software serial on the slaves while using tvout at the same time. Digital multiplexers are fine, there's no need for analog, I was just finding more promising results under the analog field than digital. Realistically the only pins that need to be SPDT are the RX pins on the slaves and the TX and RX on the main ESP, the rest could be SPST.
Thanks, the schematic has improved my understanding of the situation.
When you say, you are wanting SPDT (single throw, double throw) switching.
It sounds like you want to use these:
http://www.digikey.com/product-detail/en/texas-instruments/SN74HC157N/296-1578-5-ND/277224 (http://www.digikey.com/product-detail/en/texas-instruments/SN74HC157N/296-1578-5-ND/277224)
SN74HC157N
Exact type, depends on what your I/O and supply voltages are, and maybe other stuff.
Basically there is a select pin (please see datasheet: http://www.ti.com/lit/ds/symlink/sn74hc157.pdf (http://www.ti.com/lit/ds/symlink/sn74hc157.pdf)).
Which chooses between the two (switch if you like) inputs, A and B. Y is the output (switch common if you like).
G = enable = active low = ground 0V.
There are basically four sets of these (switches) digital multiplexers, per chip.
My understanding is still only partial. As the other poster has also said. The signals may need some work to do, to keep it all working, in addition to the multiplexing (switching).
-
You could connect all the arduino boards together on a 2 wire data bus such as I2C or RS-485.
There are modules or shields for RS-485 and Arduios have I2c built in.
https://arduino-info.wikispaces.com/SoftwareSerialRS485Example?responseToken=7eeff6c13928a87679edfeac90003f8f (https://arduino-info.wikispaces.com/SoftwareSerialRS485Example?responseToken=7eeff6c13928a87679edfeac90003f8f)
https://arduino-info.wikispaces.com/RS485-Modules (https://arduino-info.wikispaces.com/RS485-Modules)
https://www.sparkfun.com/products/12965 (https://www.sparkfun.com/products/12965)
https://www.arduino.cc/en/Reference/Wire (https://www.arduino.cc/en/Reference/Wire)
http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/ (http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/)
Good luck