What is the best signal interface for PC ? | Page 2 | on ElectriciansForums

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

_q12x_

DIY
Joined
Jan 22, 2021
Messages
587
Reaction score
268
Location
New York
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.
 
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:
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:

[ElectriciansForums.net] What is the best signal interface for PC ?


I can't remember what I wrote it in, sorry. It was definitely written using the arduino development environment, with the Teensy board selected.
 
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:
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.
 
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.
 
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.
[ElectriciansForums.net] What is the best signal interface for PC ?

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.
[ElectriciansForums.net] What is the best signal interface for PC ?

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:
[ElectriciansForums.net] What is the best signal interface for PC ?

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.
[ElectriciansForums.net] What is the best signal interface for PC ?

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...
[ElectriciansForums.net] What is the best signal interface for PC ?

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

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

News and Offers from Sponsors

  • Article
Join us at electronica 2024 in Munich! Since 1964, electronica has been the premier event for technology enthusiasts and industry professionals...
    • Like
Replies
0
Views
355
  • Sticky
  • Article
Good to know thanks, one can never have enough places to source parts from!
Replies
4
Views
908
  • Article
OFFICIAL SPONSORS These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then...
Replies
0
Views
1K

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

YOUR Unread Posts

This website was designed, optimised and is hosted by untold.media Operating under the name Untold Media since 2001.
Back
Top