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

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

I mean.... the best and the easiest to use.
I remember back in the 2000's I used a serial interface, I think it was the printer serial port, 25 pins or similar. I believe I even used a mouse port as well, that versatile those systems were back then.
What I could do with it was ... program in C++ and pascal back then, using some imported dll's specific for communication with this serial port, I think it was port 40 or 25? It had a number is all I remember. And I could link to it any transistor base, back then I was working exclusively with BJT's, to light LED's, drive motors, beep some 8ohm I think they were speakers, drive a VU-meter LED bar I think directly from the port pins, without transistors, and also drive IC's , that was the time I learned about multiplexers and expanding the number of output pins. Also input sensors like LDR and buttons. I Loved that kind of easy and straight forward communication.
Today I dont know c++ or pascal anymore, but I am very good in c# and still use VS2010 because its very cool interface and very user friendly overall.
So I want you, to help me first of all, to find the hardware, the port I suppose or something more than a printer port, something more advanced and having more in/out's. The more the better. I want the best you can find for the moment. Best ideas or best adaptations, why not. As long as it's easy and stable to install and use.
And then, the software drivers and possible problems will appear along the way. I can debug a large majority of problems, I grow up debugging computer problems, so I have a 5'th sense for them. Im more concerned about the hardware part and the integration with my win7 that I still run today and my VisualStudio2010 for my c#. I know I still run old software but they are extremely stable and they don't f me up.
Thank you and I'm really curious what you will find for me.
 

pc1966

Esteemed
Arms
Reaction score
8,624
What are you trying to do with it?

Easiest and most universal these days is USB, but it is far from simple/easy to program at a low level. However, most common interfaces come with some sort of driver to avoid that pain, and in some cases it appears as RS232 via an FTDI interface chip.
 
OP
_q12x_
Reaction score
117
Thank you mister @pc1966 i already discus this problem to death yesterday on another forum and the conclusion was to use an I2C chip. Its a new thing for me so I will shoot 2 rabbits with 1 shot - learning a new method to address multiple I/O's and secondly, making my device. Now I wait for the components to arrive from china via aliexpress. Everything will be hooked up on my arduino uno that I already have near me and is working ok, I made a test yesterday to be sure.
And you are right, usb is the way at least for using arduino, I plan to expand from arduino if possible and program it using my trusty environment in C#. I hope I can do it... its a challenge task.
Thanks for your answer !
 
OP
_q12x_
Reaction score
117
Just to brag with my current progress so far...hehehehehe
I finished 4 of them at this point. Notice how well they fit inside one A4 page; as a perspective size overall. Im very proud so far.
I worked like a slave for them. With many-many breaks and come backs. I also tested everything, every wire and every led assemble immediately after I soldered. Precaution never killed anyone.
Very cool so far, right?
What is the best signal interface for PC ? IMG_20220729_230051 - EletriciansForums.net
 

timhoward

-
Esteemed
Arms
Reaction score
4,783
OP
_q12x_
Reaction score
117
...Some of the Teensy boards (very similar to Arduino) have a large number of IO pins.
Im actually interested into the smallest SIZE W/H arduino board that can do the same thing as 'Arduino Uno' that I currently have. This smaller board will stay all the time connected to these boards I made. That's the idea.
Your Teensy board looks very tiny, close to what I want. But your reason showing it to me was because it already has a large number of IO pins on it. How many? One MCP chip has 16xIO pins on it.
 

timhoward

-
Esteemed
Arms
Reaction score
4,783
Im actually interested into the smallest SIZE W/H arduino board that can do the same thing as 'Arduino Uno' that I currently have. This smaller board will stay all the time connected to these boards I made. That's the idea.
Your Teensy board looks very tiny, close to what I want. But your reason showing it to me was because it already has a large number of IO pins on it. How many? One MCP chip has 16xIO pins on it.
I've used the 3.2 model a lot, and that has 34 digital IO pins..
The latest model has 55 digital IO pins.
The other thing I like about Teensy's is that it's VERY simple to make them emulate USB devices such as MIDI, Serial, Keyboard etc and that can make interfacing very simple.

 
OP
_q12x_
Reaction score
117
I've used the 3.2 model a lot, and that has 34 digital IO pins..
The latest model has 55 digital IO pins.
  • You come VERY-VERY late with these things....This is very bad news for me, because I invested already a lot of money(from my economy perspective) in these MCP's chips alone and also a TON of work time and I only finished half of them. I have another half to finish the whole lot.
  • From another perspective, it is good you mention them to me, as late as it is, is always good to know what else is there. So in this sense, I thank you. But I am not happy, how late they got mentioned. Eh well.
  • By pure curiosity, how much it cost one with 55 IO? Also its complete name and how easy is to program through it? So far, with what I have already, these MCP chips, I am pretty happy how easy the code goes, but Im limited to arduino, which is fine I guess, but my very original thought was to link "somehow" to my C# that Im used to for decades.
 
OP
_q12x_
Reaction score
117
Heh, scratch that, i didnt look on time on the list of prices&specifications you give me already ! Sorry... but now I find it . Also I can see 58 IO's for Teensy 3.5 and 3.6.
At first impression, I see a slight inconvenience, that 3.3V, but that can be fixed back to 5V with an additional circuit (if becomes a problem). Very interesting devices !!! (A bit too late for me now, but still an eye to keep on them as well)
 
Last edited:

timhoward

-
Esteemed
Arms
Reaction score
4,783
I have to admit I didn't notice your post when it first appeared, and when I saw the update this week I thought the whole thread had been this week.
So, apologies for mentioning another approach at this stage, it was not intentional.
By the way I tend to buy things like this from the hobbytronics website.
I have previously used several MCP23017 chips connected to a micro-controller for a project.
(another way of doing it is with 74HC165 shift registers, but that is a lot more work, balanced by the fact the chips that are cheaper)

Purely for academic interest, the same arduino development environment is used to program Teensy boards.
I wish you well with your project and it's looking very good!
 
OP
_q12x_
Reaction score
117
Also... over 1h long movie, that is covering about 11h of hard work in one night to make a single board like this. If you are curious what it takes to be made, the patience, dedication and too numerous hidden skills, see it here. Also, you can skip parts of the video if something is too boring, because this is 1h long and is good to be smart about it. Thank you.
 
Last edited:
OP
_q12x_
Reaction score
117
Mister @timhoward , you are good.
I am VERY Curious how simple your code is for the Teensy 3.2 board. Put here an example for me, please. Something small and simple. Like a test code.
Here is my test code I used called "movingLight" in the video, using the MCP chip through Arduino:
This code is only for 2 boards, not 4.
#include <Adafruit_MCP23X17.h> //this include is using Adafruit-MCP23017-Arduino-Library version 2.1.0 (from 2022)
Adafruit_MCP23X17 mcp1; //Instantiate mcp1 object
Adafruit_MCP23X17 mcp2; //Instantiate mcp2 object

void setup()
{
Serial.begin(19200);
mcp1.begin_I2C(0x20);
mcp2.begin_I2C(0x21);

/* configuring ALL GPIO as output. */
for(int i = 0; i <= 15; i++)
{
mcp1.pinMode(i, OUTPUT);
mcp2.pinMode(i, OUTPUT);
mcp1.digitalWrite(i, LOW);
mcp2.digitalWrite(i, LOW);
}


int dly = 100;
void loop()
{
for(int i = 0; i <=15; i++)
{
mcp1.digitalWrite(i, HIGH);
delay(dly);
mcp1.digitalWrite(i, LOW);
delay(dly);
}

for(int i = 0; i <=15; i++)
{
mcp2.digitalWrite(i, HIGH);
delay(dly);
mcp2.digitalWrite(i, LOW);
delay(dly);
}

}
 
Last edited:

timhoward

-
Esteemed
Arms
Reaction score
4,783
Here's a quick copy and paste from a very old project
Code:
void setup() {
  Wire.begin();
  seti2cbyte(device,GPPUA,0xFF);  //enable pull-up resistors on port A
  seti2cbyte(device,GPPUB,0xFF);  //enable pull-up resistors on port B
}

byte geti2cbyte(byte address, byte ptr) {
  Wire.beginTransmission(address);
  Wire.write(ptr);
  Wire.endTransmission();
  Wire.requestFrom(address, 1); // request one byte of data from MCP20317
  byte inputs=Wire.read();
  return inputs;
}

void seti2cbyte(byte address, byte ptr, byte value) {
  Wire.beginTransmission(address);
  Wire.write(ptr); // set MCP23017 memory pointer to GPPUA address
  Wire.write(value); // enable pull up resistors
  Wire.endTransmission();
}

void loop() {

  byte port_a = geti2cbyte(device,GPIOA); //get status of pins 1-8
  byte port_b = geti2cbyte(device,GPIOB); //get status of pins 21-28

//do something....

}
 
OP
_q12x_
Reaction score
117
mister @timhoward in the comments of your code I see its for MCP23017
Is this really for your Teensy 3.2 board ? oooor... this teensy is using already an MCP23017 inside it????
ooor, you used the teensy with an MCP 23017 like in the second link example you give me? I think this last one may be it.
And also it appears that your code is made in C++ ? Not in arduino.
 
Last edited:

timhoward

-
Esteemed
Arms
Reaction score
4,783
mister @timhoward in the comments of your code I see its for MCP20317
Is this really for your Teensy 3.2 board ? oooor... this teensy is using already an MCP20317 inside it????
And also it appears that your code is made in C++ ? Not in arduino.
Teensy connected to MCP20317 like this:

What is the best signal interface for PC ? 1659309640372 - EletriciansForums.net

I can't remember what I wrote it in, sorry. It was definitely written using the arduino development environment, with the Teensy board selected.
 
OP
_q12x_
Reaction score
117
Thank you very much for the code and the explanations... I like it !
This will be a "plan B" that I have to put my hands on it and try it, because practice is the best teacher for me.
Very intriguing board and very new (for me ) !
Thank you !
I regret I didn't knew about your Teensy boards before buying the MCP's, but...its an experience I will never forget at least.
 
Last edited:
OP
_q12x_
Reaction score
117
mister @timhoward these Teensy boards, can be linked in series like my MCP's? One after another? or each has to be addressed through USB?
Can you put here a short pro and contra comparation between MCP and Teensy ? Talking from your experience of course, what you like/dislike on both. It will help me see more clearly through your experience. Thank you.
 

timhoward

-
Esteemed
Arms
Reaction score
4,783
I think there’s a fundamental misunderstanding. I believe you are using an Arduino to connect to your boards using I2C protocol.
I am using Teensy to do exactly the same.
Both Teensy and Arduino are very very similar in lots of ways including sharing the same IDE.
The reason I went for Teensy is that you can make it present itself to a PC as a midi device or a keyboard. It also had more IO pins. This suited my application perfectly. My code can send MIDI messages to the PC (or can emulate key presses).

Unless you were starting completely again without MCPs relying entirely on IO pins that were on the microcontroller I can’t see any reason to swap now.
Sorry if this line of conversation has been a pointless distraction, I had thought it was a more recent post and thought the Teensy technology might help.
 
OP
_q12x_
Reaction score
117
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.
 

SparkyChick

Staff member
Mod
Esteemed
Supporter
Reaction score
7,726
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.
 
OP
_q12x_
Reaction score
117
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 !
 

marconi

-
Mentor
Esteemed
Arms
Reaction score
3,678
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.
 
OP
_q12x_
Reaction score
117
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:

marconi

-
Mentor
Esteemed
Arms
Reaction score
3,678

SparkyChick

Staff member
Mod
Esteemed
Supporter
Reaction score
7,726
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.
 

timhoward

-
Esteemed
Arms
Reaction score
4,783
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…..
 
OP
_q12x_
Reaction score
117
--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:
OP
_q12x_
Reaction score
117
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 ....
 
OP
_q12x_
Reaction score
117
- 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
 
OP
_q12x_
Reaction score
117
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.
 

marconi

-
Mentor
Esteemed
Arms
Reaction score
3,678
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:
OP
_q12x_
Reaction score
117
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.
 

marconi

-
Mentor
Esteemed
Arms
Reaction score
3,678
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:
OP
_q12x_
Reaction score
117
  • 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
 
OP
_q12x_
Reaction score
117
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:
OP
_q12x_
Reaction score
117
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?
 
OP
_q12x_
Reaction score
117
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.
 
OP
_q12x_
Reaction score
117
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

Similar Threads

I've just finished an installation on a large outhouse around 50 meters from the main property, but I'm having issues with unusually high Zs...
Replies
7
Views
750
Hi there, I'm currently working on a project where I'd like to slowly fade the brightness of a series of high brightness RGBW LEDs. Basically...
Replies
3
Views
320
Materials to be used 1、STONE STWI101WT-01 2、FTP thermal printer head 3、Raspberry Pi pico 4、Coin-operated machine Function The control...
Replies
1
Views
488
Sorry if these questions are dumb, but I thought I'd ask you guys as I'm brand new to this field. I was watching this video from John Ward and had...
Replies
2
Views
198
  • Locked
Currently I have a spur from the ring main, but I'm planning on adding more sockets. I can't add a 13 amp fuse because I expect to be using more...
Replies
34
Views
2K

New Posts (Please Reply)

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.
Top