If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
How to Software Dumux the Serial Data of an ADC chip
4 posts
• Page 1 of 1
How to Software Dumux the Serial Data of an ADC chip
I've been scratching my head for the last couple of days on how to software demux the signal that is generated from an Analog Devices 8 Channel ADC chip. Your signals go into the chip, the chip then multiplexes these signals and this signal is then spat out through the I2C bus on a single data line, which is then sent down the serial line (in this case USB into my computer). In this case it's an arduino which I'm just using now as an experiment to get things up and running. I kinda hoped that Flowstone would have some sort of standard way to Demux this signal. It must be industry standard?? Perpahs it's device or company standard?
the thing is, I'm not sure I want to keep using the Analog devices chip as some other devices are looking better, such as one that has 8 channels of 24 bit and it's own USB interface which makes it look pretty sexy and easy to work with. Because all i have to do is then deal with the signal once it's inside my computer.
But, I can't find anything on how the signal is multiplexed by the chip in the first place. I do know that all multiplexed signals are sent with a carrier wave and that this wave must be removed/decoded. But how to exactly read the raw analog to digital conversions, I just don't know and can't seem to find much information on.
any guidance would be great. I suppose it would be great if there were a DLL that could decode this in Flowstone and then I could simply have 8 analog input channels inside Flowstone that I could direct however I wish without issue. If only things were that easy huh??
Grant
the thing is, I'm not sure I want to keep using the Analog devices chip as some other devices are looking better, such as one that has 8 channels of 24 bit and it's own USB interface which makes it look pretty sexy and easy to work with. Because all i have to do is then deal with the signal once it's inside my computer.
But, I can't find anything on how the signal is multiplexed by the chip in the first place. I do know that all multiplexed signals are sent with a carrier wave and that this wave must be removed/decoded. But how to exactly read the raw analog to digital conversions, I just don't know and can't seem to find much information on.
any guidance would be great. I suppose it would be great if there were a DLL that could decode this in Flowstone and then I could simply have 8 analog input channels inside Flowstone that I could direct however I wish without issue. If only things were that easy huh??
Grant
- granta1969
- Posts: 7
- Joined: Fri Sep 21, 2012 5:11 am
Re: How to Software Dumux the Serial Data of an ADC chip
Things are easy if you know how to ask the questions the right way or a way that someone can understand, which in itself is a task.
How i understand it is; You have an analogue sensor (i.e. potentiometer) it uses i2c bus to send data to the Arduino, your software/library interprets the readings, then your software sends the information out through the serial port (com) & you capture it with flowstone ?
If this is the case, the comport module in fs allows hex/ascii data as input or output. Arduino serial by default sends ASCII unless you have programmed it otherwise.
The comport module has a boolean input , true sets to HEX, false sets to ASCII.
Start with the Arduino serial example, hooking up a potentiometer directly to the adc input (ignore i2c).
From fs check to make sure the bitrate(baud) , parity, bytesz are the same on both sides.
Make sure the comport in fs is set to false for HEX data.
Use the Text module in fs to view comport output.
I2c, your code & hardware is specific to Arduino and really needs to be answered @ arduino.cc
I am working with i2c with the HID module but not the Comport module , which is perplexing enough
If this isn't the answer you desired, re-word the question, give more details (which sensor, which arduino, which library/code?)
How i understand it is; You have an analogue sensor (i.e. potentiometer) it uses i2c bus to send data to the Arduino, your software/library interprets the readings, then your software sends the information out through the serial port (com) & you capture it with flowstone ?
If this is the case, the comport module in fs allows hex/ascii data as input or output. Arduino serial by default sends ASCII unless you have programmed it otherwise.
The comport module has a boolean input , true sets to HEX, false sets to ASCII.
Start with the Arduino serial example, hooking up a potentiometer directly to the adc input (ignore i2c).
From fs check to make sure the bitrate(baud) , parity, bytesz are the same on both sides.
Make sure the comport in fs is set to false for HEX data.
Use the Text module in fs to view comport output.
I2c, your code & hardware is specific to Arduino and really needs to be answered @ arduino.cc
I am working with i2c with the HID module but not the Comport module , which is perplexing enough
If this isn't the answer you desired, re-word the question, give more details (which sensor, which arduino, which library/code?)
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
Albert Einstein
Albert Einstein
-
JB_AU - Posts: 171
- Joined: Tue May 21, 2013 11:01 pm
Re: How to Software Dumux the Serial Data of an ADC chip
Typically for an I2C ADC, the analogue values will be multiplexed, converted and the digital values stored in registers (local memory) on the chip itself. You would then get the data by sending I2C messages to the chip asking it to read the register values, and it sends you the data back - or sometimes this will happen automatically as soon as the readings are ready.
The whole chain of messages would probably look something like this...
- FlowStone -> USB -> Arduino: Command to take measurements.
- Arduino -> I2C -> ADC: Command to take measurements.
- ADC -> I2C -> Arduino: Notification that the measurements were successful.
- Arduino -> I2C -> ADC: Command to read a register containing one or more of the readings.
- ADC -> I2C -> Arduino: ADC sends back the register value.
- Arduino -> USB -> FlowStone: Send the reading to FlowStone.
The first step would be to do as JB_AU says - get your Arduino talking to FlowStone just using it own built-in digital and analogue I/O. Sure, the stock analogue inputs might not be the quality you are looking for, but you'll get a good solid foundation working. Trying to debug I2C problems if your Arduino USB comms aren't rock-solid will be almost impossible.
Once that's working, again look to the Arduino community for some good I2C examples, and get hold of the data sheets and application notes for your chosen chip - just choose something cheap that you can afford to mess up to start with, if you can get one I2C device working, it will be easy to adapt your code to any other.
If your Arduino has I2C support built in, you shouldn't need to de-modulate or 'bit-bang' anything - the shift registers and clocking should be right there in hardware. Just like the USB connection, the I2C will mostly just deal with whole bytes of data. The Arduino will be doing little more than "interfacing" the USB<->I2C - a very typical application that you will almost certainly find some open-source code for.
Once the data is inside FlowStone, the format of the bytes from most I2C devices is usually very easy to work with - most times, little more than a few multiplications and adds are all you need to reconstruct the original analogue readings.
The whole chain of messages would probably look something like this...
- FlowStone -> USB -> Arduino: Command to take measurements.
- Arduino -> I2C -> ADC: Command to take measurements.
- ADC -> I2C -> Arduino: Notification that the measurements were successful.
- Arduino -> I2C -> ADC: Command to read a register containing one or more of the readings.
- ADC -> I2C -> Arduino: ADC sends back the register value.
- Arduino -> USB -> FlowStone: Send the reading to FlowStone.
The first step would be to do as JB_AU says - get your Arduino talking to FlowStone just using it own built-in digital and analogue I/O. Sure, the stock analogue inputs might not be the quality you are looking for, but you'll get a good solid foundation working. Trying to debug I2C problems if your Arduino USB comms aren't rock-solid will be almost impossible.
Once that's working, again look to the Arduino community for some good I2C examples, and get hold of the data sheets and application notes for your chosen chip - just choose something cheap that you can afford to mess up to start with, if you can get one I2C device working, it will be easy to adapt your code to any other.
If your Arduino has I2C support built in, you shouldn't need to de-modulate or 'bit-bang' anything - the shift registers and clocking should be right there in hardware. Just like the USB connection, the I2C will mostly just deal with whole bytes of data. The Arduino will be doing little more than "interfacing" the USB<->I2C - a very typical application that you will almost certainly find some open-source code for.
Once the data is inside FlowStone, the format of the bytes from most I2C devices is usually very easy to work with - most times, little more than a few multiplications and adds are all you need to reconstruct the original analogue readings.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: How to Software Dumux the Serial Data of an ADC chip
http://www.dsprobotics.com/support/viewtopic.php?f=2&t=2663
I put this here because its a pre-made device that requires no programming, it's very simple to understand & use.
Which would be a better starting point than the Arduino.
I put this here because its a pre-made device that requires no programming, it's very simple to understand & use.
Which would be a better starting point than the Arduino.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
Albert Einstein
Albert Einstein
-
JB_AU - Posts: 171
- Joined: Tue May 21, 2013 11:01 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 59 guests