Maker Pro
Maker Pro

input 4 bit analog to USB output?

Hi,

I have a circuit board with a chipset that has an output of 0V or 5V on 4 separate wires. I need to get the 4 wires signals (0 or 5V) into a PC so I can use software to monitor the ON/OFF signals.

I would like to wire it to a USB input to the PC but have no idea how to do this? Can this be done? Is there a analog to digital converter needed? Any help would be appreciated.

I found this http://www.pjrc.com/store/teensy.html could this be my solution?

thanks,
Shadowdog.
 
Last edited:
Easiest way is with a parallel port, but that is old school... Short of that you need to handle the USB stack, it's not horribly hard but not something you are going to whip up if you don't have any background...

The easiest way to go about this is to exploit the HID USB protocol as it won't require any additional drivers on the computer to work...

But, you still need to make the HID USB interface, there are lots of examples to be found in a Google search or you can seek out one of the many over the counter already built options like this for example...

http://www.u-hid.com/home/index.php

Do note that is just one example that popped in a Google search, there are a lot of other options out there, just Google up 'USB HID input' and start reading...
 
shadowdog,

From what I can tell, I don't think the teensy does what you are asking for. It could be programmed to do it, but this is up to you. The gpio board that I linked is already programmed to do what you are asking for.

bob
 
From what I can tell, I don't think the teensy does what you are asking for. It could be programmed to do it, but this is up to you. The gpio board that I linked is already programmed to do what you are asking for.

This is correct, the Teensy is just an AVR developer board with a USB bootloader... I do believe there is a USB HID example program available though that could be used as a base starting point to do what you want... But, as Bob said it would require you programming it to do so, it's not going to do what you want out of the box...

FYI the Teensy is a fun little board to play with, a lower cost way to get into a little mirco development board that has a lot of punch to it...
 
Yes, it looks like about the cheapest way you could start ARM development without soldering!

Bob
 
Yes, it looks like about the cheapest way you could start ARM development without soldering!

Yeah the new ARM version looks interesting... I have several of the previous AVR Teensy versions, and like them for quick AVR stuff since I primarily deal with PICs, it's nice to have a quick prototyping platform without the need for a complete switch over from PIC to AVR...

I'll have to get grab a few of those ARM ones to play with they look fun...
 
Thanks a ton for the info... I am a programmer so I think the Teensy is going to be great for more complex projects, however, I think you are both correct the GPIO looks to be the right board for reading simple analog signals.

Phew, I almost bought the Teensy but will get the GPIO for now...

-Shadowdog.
 
Just now getting into some hardware applications with a friend so its great to know there are guys out there that are willing to offer their experience and help :)

It is fun... I have an RF xmitter/receiver on its way so am looking forward to playing around. May need some more help so stay close guys...

-Shadowdog
 
Sry the signal is actually a 0 or 5V signal... Guess that would that be considered a Digital Serial signal or both?

Like I said, I'm just a simple programmer with an interest in connecting software with hardware... Feel free to school me...
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
To expand on what CC said, digital is a very broad term. What a logic 0 and Logic 1 are is dependent on the logic family. Regardless of the logic family they will all have one thing in common, n1 voltage is considered a logic 0 while n2 voltage is considered a logic 1. A Serial port (RS232) is, of course, a digital logic port but its logic states are defined as -15V = logic 0 and +15V = logic 1.

So to summarize digital can be defined as any two defined voltages, while anything in between is considered an undefined state. I could build my own digital circuit and use 25V as logic 0 and 150V as logic 1. Though it fits no industry recognized logic family it's still digital.

Did you know that the old rotary dial phones were digital? Yes, we tend to think of digital as modern and analog as old school but the touch tone dial system defied this logic. Yes, that is a pun. :p

Chris
 
Excellent explanation Chris...
I appreciate your patience :) You broke it down in language I understand.
Glad there are experienced guys out there that are willing to take a few mins to teach us newbs a thing or two...

regards,
Shadowdog.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Happy to help. My wife says I like to hear myself. I guess EP is an extension of that.

Chris
 
Top