Discuss What is the best signal interface for PC ? in the Electrical Forum area at ElectriciansForums.net

Welcome to ElectriciansForums.net - The American Electrical Advice Forum
Head straight to the main forums to chat by click here:   American Electrical Advice Forum

Thank you mister @timhoward, and thank you for replying back.
  • Do not overthink it, every bit of new information for new tools is gold for me. Yes, I present in my movie I posted here in this thread, that I work in arduino and I also posted a recent code I already used also made in arduino. What is very novel to me is this teensy boards. I start to believe, from your last explanations, that arduino Board and teensy Board are 2 similar things but made by different companies. I think I get it now. The difference between arduino Uno and Teensy 3.2 is more IO ports and also your MIDI encoding system that you mentioned.
  • My target for my project, that I probably failed to mention in this thread, is to have 100 (or more) IO's. So far, using my arduino Uno board, 8xMCP23017 (8 being maximum allowed), and the I2C communication between all of them, I can reach to 128 IO's in the end. Which means the project mission is completed succesfully and in parameters. Not there yet, right now Im at 50% of the building process, literally, which took me a ton of time, because , again, I present it already in my last movie I posted in this page, I make everything manually and is hell, but is also --possible--, to model the board as much as I like. Its very hard to do it my way, but also very intuitive and customizable.
- Your idea was a good one, and now I understand is something of an alternative but for arduino board itself.
- My question to you, or anyone really, is how you will make 100 (or more) IO's ? Excepting 8xMCP23017 because Im into them right now. So an alternative to them somehow. Also to be easy to wire them up, and also easy to code them.
Thank you.
 
I would be looking at being somewhat more specific with the IO count and potentially using a scanning solution.

For example, the Max6818 debouncer has a change output line (to indicate it a change in state has been detected) and an output enable line (which resets the change indicator), so you could use those in combination to scan a number of inputs. 8 bits for the data lines, say 4 bits for the change detection (which you should be able to hook up to trigger an interrupt) and then say 4 bits to drive the enable lines. 32 debounced inputs with 16 bits of IO, but you could reduce the IO count if you just want to scan them and do the change detection yourself. 16 bits could then get you 64 debounced inputs.

But it all comes down to how general purpose you want the interfacing to be. If you can specify you want X number of inputs and Y number of outputs then you could probably optimise quite a bit.

A different microcontroller could provide more direct IO... the PIC18F97J94 for example can have upto eleven 8 bit I/O ports available (depending on what other on-board peripherals you are using). Clearly, if you use things like the SPI/I2C interfaces you're going to loose some of that, but depending on whether you really need that many outputs, depending on what you're driving there may be a single chip solution.

Another option could be a CAN bus based solution. I believe Microchip have a general purpose IO chip that literally just connects to a CAN bus and will send messages when inputs change or set outputs when it receives a message. It's a been a long time since I've looked seriously at any of this, but much of the design work I did was very targeted, meaning I had specific IO counts.
 
This is me in HERO mode. All 4 at once. The last 4. After they are finished, I will complete the entire project.
This picture is all 4 drawn and 1 of them starting to get metal pads.
What is the best signal interface for PC ? 20220801_125758 - EletriciansForums.net
This is all 4 starting to get some wires on them. You can see the small diagram, where I marked with red, the location and how many wires are placed at this stage. Very hard work I tell you, but it is possible, is all that I can show here.
You can also see my dezizolator machine, without it I could not start this project.
What is the best signal interface for PC ? 20220803_080549 - EletriciansForums.net
Pretty cool so far. Im working with numerous breaks because this is more intense than usual.
Thank you.
- Im also curious if is a possibility to replace arduino UNO that I have, with a --permanent smaller board--, more compact in size, but essentially to do exactly the same thing this UNO is doing. Is it possible? I am no expert with arduino, this UNO board is all I have all my life, but watching some youtube videos, it appears that it is possible as I say. If not, then I think on an alternative that is a bit more crazy, to buy the arduino UNO MCU, program it with this UNO code, and use only the pins I need, just to cut down in size. But I really think it is possible with somethng already made, like PICO or something. Which is the smallest you recommend?(but doing the same thing as UNO) Thank you !
 
q12x: Good morning from London. I have just read through this thread. You never fail to impress me. I am glad some other top folk are engaging with you as you work through your project. What is the final outcome please?

PS: I am not engaging because as you know I spend quite a bit of time helping another chap.
 
q12x: Good morning from London. I have just read through this thread. You never fail to impress me. I am glad some other top folk are engaging with you as you work through your project. What is the final outcome please?

PS: I am not engaging because as you know I spend quite a bit of time helping another chap.
Good morning London, here is Romania. Over. Haha.
Hello, it is no problem, and thanks for the comment mister @marconi . The final outcome of this project is very simple. I will have 100x I/O's from my PC that I can play with. I've already put LEDs on each IO pad, so when a pad is activated, it's corresponding LED will light. And because this is a digital communication, this means everything will be at its extremes, either +5V or 0V, but nothing in between as in an analog situation. Im not sure (yet) how some analogue Input will be resolved.... like a button, LDR, senzors,(if I will have to put in the middle some ADC- I hope not) but for sure the Output will be a train of digital impulses so the extremes, +5&0V. Because all this arrangement is quite new to me (the MCP chips + Arduino) and very different from the old way I did it back in 1995-2005-ish times, with a 20 or something IO's back then and I said "I want more IO's !!!" but never get to it. Now, this is that wish, from back then, 55% in reality. And I think is very cool !
I hope is clear enough now.
 
Last edited:
Good morning London, here is Romania. Over. Haha.
Hello, it is no problem, and thanks for the comment mister @marconi . The final outcome of this project is very simple. I will have 100x I/O's from my PC that I can play with. I've already put LEDs on each IO pad, so when a pad is activated, it's corresponding LED will light. And because this is a digital communication, this means everything will be at its extremes, either +5V or 0V, but nothing in between as in an analog situation. Im not sure (yet) how some analogue Input will be resolved.... like a button, LDR, senzors,(if I will have to put in the middle some ADC- I hope not) but for sure the Output will be a train of digital impulses so the extremes, +5&0V. Because all this arrangement is quite new to me (the MCP chips + Arduino) and very different from the old way I did it back in 1995-2005-ish times, with a 20 or something IO's back then and I said "I want more IO's !!!" but never get to it. Now, this is that wish, from back then, 55% in reality. And I think is very cool !
I hope is clear enough now.

For simple digital inputs, what I usually do is use a pullup resistor (something like 100Kohm - only needs to be a tiny current, just so the input isn't floating) to connect the input to +5v. Then you can connect one side of a single pole single throw switch to the input and the other side of the switch to 0v. Switch not closed, input is high, switch closed input is low. Nice straight forward digital input. The only drawback is that you will need to debounce the inputs yourself unless the chips have built in debounce (this is where the Max6818's come in handy... if you have a lot of switches, I think the 6818s support 3.3v and 5v logic levels, so you could just put them in front of your existing inputs and that's the debounce taken care of.

You'd only need to worry about ADC's if you're looking at analog devices like potentiometers, thermistors, LDRs etc.
 
My question to you, or anyone really, is how you will make 100 (or more) IO's ? Excepting 8xMCP23017 because Im into them right now. So an alternative to them somehow. Also to be easy to wire them up, and also easy to code them
It would depend on how quickly they needed to be read and processed, but I’d also be considering:
-Using shift registers, as these can use any IO pin on a microcontroller for clock and latch signals. So several chains of shift registers could be read by one board.
-or using multiple microcontrollers connected to a central one. The Teensy has 4 serial
ports and each slave microcontroller could use any of the technology mentioned in this thread to have a high number of IO lines. I’d then write a basic protocol to report to the central board.
Just some random thoughts…..
 
--To mister @marconi , yes you send me one 7 x 5 LED matrix, but dont worry, it is a very interesting component for me, especially for testing stuff. I will make a light game with it after everything is finished up. Also showing some letters on it as you initially intended, though your project was way more challenging than mine here. At least is how I perceive it.
--To mister @SparkyChick - your Max6818 is a --- VERY interesting IC !!! --. I never heard of it and is completly new to me. Definitely I will consider it in the near future, if not in something practical then as a curiosity and still will be a gain for me. I really like cool practical IC's like these, very specific and dedicated. Very cool chip, I like it ! I am unsure how many components around it will be necessary, OR if it will be by itself, input and output and nothing else than that, just clean connections between the analog buttons and the digital pads.
If its simple like this:
What is the best signal interface for PC ? 1659548729343 - EletriciansForums.net
then is very nice, I like it.
I also read the intro in its datasheet, (I always do), and it "feature single-supply operation from +2.7V to +5.5V" and then "switch/buttons inputs ±25V " which is very interesting.
You'd only need to worry about ADC's if you're looking at analog devices like potentiometers, thermistors, LDRs etc.
- So I was right to assume I will have to convert with an ADC. ---Thank you very much--- to confirm it back to me. In a sense, now that I stay and remember "stuff" that I know but long time on the shelf of memory, full of dust and some crap, I remember that I had some trouble with some PIC's that did not had ADC included on them. So I had to debounce a button using a delay made from a fixed capacitor like 100nF to gnd, I have the circuit somewhere in my PC specific for it. Also I could debounce it directly in code. So 2 ways. Also, you may remember me using a lot of 12F508, who does not have ADC incorporated so I had to be very smart about inputs. It worked fine for buttons but I could not advance to other inputs types... So the idea I am saying here, is that I confirm that the --digital-- PIC had to have an ADC, and the same goes for my --digital-- pads I have here, the same as for the PIC, must be made a conversion first.
- What is the cheapest ADC chip ? and doing good job and easy to mount in circuit that you guys recommend to me? I usually buy 100pcs, but at a very low price - if possible.
--To mister @timhoward , I actually thought on multiple PICs as you suggested, but the biggest problem was the price per PIC , so for a large number of them, the price got very high very quickly. Also, interfacing them, programming through them, probably its a nightmare. I never use them like this and I think is an interesting idea, but remains to be experimented in the future. So I'll put it on my shelf of memories. I actually used shift registers in my very first experiments back in 2000's and I got hooked up by them very quickly. Back then I was programming in Pascal !!! and I had to find a special library to access the LPT printer port or something... but 90% of those memories are a blur, I largely forget everything I did back then, how I did it and the circuits I used. Im glad I got this new way using I2C which is more simple to program and to make the circuit. Someone suggested to use it, and I listen and I did it. Good stuff !
 
Last edited:
Holly caramboli...
Ive just checked the prices for both IC's on Aliexpress,;
- This is the cheapest I could find on aliexpress for an ADC and that 36$(+shipping) price is only for 10pcs - aaaah, too much, I make those money in a couple of years from my digital artistic capitalistic profits. Hahaha.
What is the best signal interface for PC ? 1659549907470 - EletriciansForums.net
Im contemplating making a couple of ADC circuit boards.... depends how complicated they are. At a first glance, I find some circuits using a couple of opams.... im not sure what I find. Heh.
------
- Ive also looked for Max6818 and the cheapest is 5.7$ + some additional taxes probably because 'corona virus' is killing all the mail woman. And for only 5pcs? 'aaaah' again...
What is the best signal interface for PC ? 1659550347558 - EletriciansForums.net
This is just a fast search, maybe there are others IC's with less pins and more cheaper... I hope. Research is to be made... OR, one of you can jump in with your findings.....

Ive also looked on ebay and they are out in the woods with the prices, doule-or triple than aliexpress... what a shame for ebay... what a shame. It was very cool while it was the cheapest online market in the WORLD ....
 
- I am a bit 'new' to using self alone ADC's; ... I used it as integrated function of a PIC, I read about it, I have a general idea as one does, but using it as a stand alone chip, I Never. So...forgive me if I was a bit hasty or jumpy or stupid when encounter NEW concepts like this. For me this is a new territory. Very interesting territory actually that I will get into more depth... but it remains in a todo list. Not right now. Right now I am putting on the table the cards that I consider important. So... I get into digging on wikipedia and I opened 3 pages: [Analog-to-digital converter], that lead me to [Gray code]. And a 3rd one very new to me, I never heard of it [Flash ADC].
Mister @marconi here (I've almost write Tarcone, like a mafia boss name, haha, but you are not far from one, right? hahaha - little joke). You first introduced me to the [Gray code] concept actually in your last project which I avoid it since it was completely new to me. But you also give me the lecture about it, and I also read on wikipedia myself back then. But now, scrolling and reading lightly in ADC page, to refresh my memory about the principle, the rotary encoder using [Gray code] jumped on me, like that. And is excellent ! - This means, I will certainly build one and play with it. Again, not right now, now I am putting on the table what is important. Making some plans and speaking my mind. From my understanding, [Gray code] is exceptionally used for rotary encoders, where you get only one possible code all the time, whiteout uncertainty, while rotating between the values, or as wiki says more elegantly : "between two successive values differ in only one bit". I want to believe it can be adapted to a device that is not rotating like a potentiometer does, but something like a LDR or termistor. Very fascinating subject that remains to be dig in.
- Another interesting 'card' on the table, is future addons to my board. One addon that I will surely built immediately after I finish all these IO boards, for security reasons only, is a string of transistors for a safe and secure Output drive. I will probably use BD 139 because I already have 100pcs brand new. I will probably but unsure yet, I will build a string of mosfets but at this chapter, I only have very small, smd mosfets like my A09T What is the best signal interface for PC ? 1659582024436 - EletriciansForums.net , which is a N-Channel and possibly A19T which is a P-channel. But they are very small and not so powerful. My greater wish is to have more powerful mosfets than those, to drive some serious loads. It will probably remain to do it in time, in the future,when I will have access to such mosfets, but for sure, the next step I will add those BD139, because I have them and are powerful enough. I want more powerful than them , but like i said, in time. So this is my security plan for the Outputs only. Next, it will be the inputs, and that is a bit of a new territory for me, because I played way too little with inputs in general. This entire 100 IO's project, partially its big reason, is built for testing and learning all sorts of inputs. I hope I will get to that and soon enough.
Thank you for reading. Romania, end of communication. Haha
 
Ive researched some more and I found this one:
What is the best signal interface for PC ? 1659590820109 - EletriciansForums.net
Now is a bit more reasonable price. But still high for 1 single chip... My limit to buy, is 1 or 2 of them.... instead of the usual 100. Aaah. But still, much better than the last one I find.
I really wish from all my hearth this website allowing me to edit my previeous posts, for a cleaner overall thread... like they do it on AAC forums. This is my research so far... and I also learned new things in this time. Very complicate subject this stand alone ADC chip. You have to be very smart on choosing the right thing. I found a number of ADC options, in some boards and on chips. Very complicated subject. Hmmmm...for now while im fresh in the middle of it.
If you find more cheaper than this, do tell me about it, keep in mind the shipping to add to the total sum as I pointed alredy in the screenshot I made.So that ADC0820CCN that I selected is actual total price is 2.6$ for 1 single chip. Still high price for me.
I am very serious on building a ---TEST--- ADC made from opams set as comparators, that I have a lot, and resistor voltage dividers. If you have a circuit diagram for a DIY ADC that you can recommend to me, please do so.
Thank you.
 
You can use the LM3914 which I think you have a few to be an ADC.

Interestingly this chip will produce an output which changes by only one bit between successive voltage intervals eg 00000, 00001, 00011, 00111, 01111, 11111.
 
Last edited:
You can use the LM3914 which I think you have a few to be an ADC.
Wow, I never have of thought of using this chip ! Yes indeed I have a few more left. You just had a genius idea !!! Thank you. Im not sure what is the difference between LM3914 and a normal ADC. My very best guess, LM3914 will be a 3 bit ADC or something close to one. Ive seen on youtube a 3bit ADC made out of 7 opamps. I believe I am not wrong. I just searched and "a 10 bit ADC counts 0 to 1023" but I didnt find how many opamps has inside. I bet something like 200 opamps?, wild guessing.
 
Assuming the LM3914 has 5 outputs - it has more but for this explanation it does not matter - then the 5 bit word uniquely represents a voltage interval. By voltage interval I mean the the voltage levels at which the 5 bit word changes by one bit. So, if you wanted to measure an analogue voltage input in the range 0 to 10V, each voltage interval would be 2V since 10/5 = 2 where 10 is the voltage range and 5 is the number of code words ie 00000. 00001, 00011, etcetera.

Now you have 5 bit digital code word for each voltage threshold you can convert it into a binary or decimal number using combinational logic or a look up table using a Programmable Read Only Memory or using some software code.

I seem to remember you can connect LM3914s in cascade to cover a wider range of voltage or have more voltage intervals to increase the resolution of the conversion from analogue to digital.
 
Last edited:
  • The first layer of wires is done for all, you can tell because the squares have a second longer bottom cardboard they are glued to.
  • What Im showing here are the PADs - I worked literally 4 days on them. I had to take longer breaks because is so repetitive and so incredible boring doing it manually. Surprisingly, it was 'kind of' pleasant after you manage to enter in trance, in 'the flow'. Especially when you literally STOP thinking in perspective, in the future, when you STOP expecting total and full results, as our mind is tricking us so often, and concentrate on the damn job, piece by piece, pad by pad, 1 by 1, until you wake up from the trance and realized (after a good couple of hours, sometimes >5) that finally, 1 strip of pads is done. Aaaah, I cant explain in words what a relief is. Haha. Now, all 4 are finished. One big stage of the project is done.
What is the best signal interface for PC ? 1659769738118 - EletriciansForums.net
What is the best signal interface for PC ? 20220806_100449 - EletriciansForums.net
 
Assuming the LM3914 has 5 outputs
LM3914 has 10 Outputs.
LM3914 has 10 opamps inside, wired as comparators on a string of 1k resistors.
What is the best signal interface for PC ? 1659770745070 - EletriciansForums.net
You are very right ! they can be cascaded to obtain a better resolution/fidelity of the variable analog input (sig at pin5). Very interesting line of thoughts, I like it.
What is the best signal interface for PC ? 1659770929541 - EletriciansForums.net

I just searched for half an hour because I forget where I put them, and I count I have 8 of them left.
So yes, we are good for 2 or 3 mounted in cascade.
I start to realize that the best thing is to buy a 10bit(or higher) ADC, as expensive as it is per 1pcs.
It's small dimension beats everything and also I don't have to built them... this is my current thought.
Ideally, I wished to have 16 ADC, one for each pad on one of my square MCP23017 board. At least one full and complete. Hmmm.... Things start to get hairy at this point. But in the end, 1 or 2 expensive but good brand ADC will probably satisfy the curiosity, at least, in the begining. And is always room for upgrades later in the future. Nice is to have it good from the start, when Im cooking it now, but... Ill have to adapt to the contemporan capitalistic monetary situation.
On another way of view the situation, LM358 is already a dual opamp in one package, and I have 100smd and another 100DIP in my stock. Also they are very cheap. But is a ton of work if I have to get on this road, and I know it... But I am thinking, that 3bit ADC made from 7 opams, I can use 3xLM358 and one uA741 which I also have 100pcs as well. And voila, 7 opamps for a very shitty ADC but I will have 16 shitty ADC for each pad on 1-ONE MCP board at least.
Money, huh? In capitalism. It sucks. Thats why this project stagnated so long from my youth years, because capitalistic money... Damn. Eh well. All I wish right now is not having the worst idea ever and regret it later with the 3bit ADC.
To continue your idea, with the LM3914, I can use all 8 of them also as a 3bit ADC, using only 7 of its opamps... or all 10 opamps why not. It will be a tiny bit over 3bit in this case. But this means that 8 of them will serve for only half of my 16-I/O MCP board. Thats why I bring the idea of using the actual opamps, 7 of them to cover all 16 pads. My idea is an alternative. Its the same shitty 3bit resolution either way, haha.
Also, is good to mention:
with __3bit ADC we will have 2^3 = 8 steps resolution (using 7 opamp comparators)
with __8bit ADC we will have 2^8 = 256 steps resolution. (using 255 opamp comparators)
with 10bit ADC we will have 2^10 = 1028 steps resolution. (using 1027 opamp comparators)
with 24bit ADC we will have 2^24 = 16777216 steps resolution. (highest ADC ever built)
- Thank you for involvement !
 
Last edited:
I believe... it all comes down to:
A- Many and Bad (multe si proaste- its a saying in my language)
(Many because I have many opamps already and Bad because only 3bit resolution)
or
B- Few and Good
(Few because expensive and Good because 10bit resolution)
What are your thoughts? What you will do in my place?
 
I have a very funny idea, to use a single opamp for each pad of all my 8 MCP boards. So I have 128 pads in total, linked to 128 opamps and it will give me a gigantic big --- ADC ! Hahahaha. 128 steps resolution means 2^7. Just for the fun of it I suppose.
 
And the moment we all were expecting, all 8 boards are finished, tested and working.
I still have some small problems to resolve until the "final product", this right now is in test stage still.
I am very happy how it come out.
I've also made a movie about it:
Thank you.
 

Reply to What is the best signal interface for PC ? in the Electrical Forum area at ElectriciansForums.net

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc

Electrical Forum

Welcome to the Electrical Forum at ElectriciansForums.net. The friendliest electrical forum online. General electrical questions and answers can be found in the electrical forum.
This website was designed, optimised and is hosted by Untold Media. Operating under the name Untold Media since 2001.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock