Pages: 1 [2] 3 4 5   Go Down
Author Topic: "The Brick" - All In One - Arduino Platform Compatible  (Read 12217 times)
0 Members and 1 Guest are viewing this topic.
NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK 2am now and I think I have done it.

Board now has 2x ADS1115 16bit ADC's now smiley

Inputs come via 2x 4 channel op amps with a divide by 2 setup. In theory, from what I know at this point in time, it should be possible to put in +/-10V, +/-5V, 0-10V and 0-5V now.

Will do more reading tomorrow.

Cheers
James
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK 2am now and I think I have done it.

Board now has 2x ADS1115 16bit ADC's now smiley

Inputs come via 2x 4 channel op amps with a divide by 2 setup. In theory, from what I know at this point in time, it should be possible to put in +/-10V, +/-5V, 0-10V and 0-5V now.

Will do more reading tomorrow.

Cheers
James

Be careful in your understanding the +/- ability of the ADC chip. One may not apply a negative (in relationship to ground) voltage to any pin of the device. Electrical input voltage must be limited to ground to +5vdc (or whatever Vcc you power the chip with). The +/- part is if you use the differential input mode. In differential mode, if you wire +voltage (top of range vdc) to the + input and a ground to the - input you will obtain the maximum possible positive digital value. If you wire ground to the + input and a +voltage (top of range vdc) to the - input, you will obtain the maximum possible digital value. Think of the input pins in differential mode as non-inverting and inverting, just like a op-amp that is using single polarity power supply. If for this chip running in differential mode, you wired say +2.5vdc to both + and - input pins the digital results would be 0, no matter what the gain scale selected (even +/- .256 volts), because +2.5 - +2.5 = 0. That make sense?

 As far as setting up op-amps with negative gain to increase voltage measurement ranges, that seems a rather complex design criteria. Most designs just have the user use a simple external two resistor voltage divider resistors if they need increase the measurement range of the ADC function. I would just leave the max electrical measurement range as it is for the chip, 0-5 vdc inputs.
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Retrolefty

Thanks for that - however I am not 100% sure I understand.

From the datasheet it states (my interpretation), if in single mode, GND is used as the negative reference, so if you apply 5V to the input, then its the difference between GND and 5V that gets calculated.
If in differential mode, you are saying you can still only use the GND to 5V range, so how is that any different than single mode? Why would you apply GND externally yourself when you can have the chip do it for you?

Sorry just woke up and head still isnt functioning right.

One of the criteria I have is to allow 0-10V Analog, which is industry standard, so there is no negotiation on this. The negative two were only to satisfy the request/question on the first page of this topic. So its a nice to have in that respect, but 0-5V and 0-10V are required.

I will get a coffee, have some breakfast and have a read of the datasheet again.
If you can provide any more info that would be great.

Thanks
James
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I have clicked.

So the -ve scale output is purely for if the -ve input is higher than the +ve input, so 5V vs GND, rather than GND vs 5V.
And differential is so you can do 1V to 4V for instance, and still get full scale...

Ok so this isnt capable of +/- inputs still, so I can remove some of the complexity i added by changing opamps, adding a -ve supply for the op amp, etc etc.

I have used the MAX127 before which takes 0-5, +/-5, 0-10, +/-10 etc and is software selectable etc, however not cheap at all.
Obviously what that does is not so simple to reproduce.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I have clicked.

So the -ve scale output is purely for if the -ve input is higher than the +ve input, so 5V vs GND, rather than GND vs 5V.
And differential is so you can do 1V to 4V for instance, and still get full scale...

I think you got it. The ADS1115 is a 16 bit ADC only if run in the differential mode and has a 2s complement integer output conversion (same format as a arduino integer), so full range voltage to + input and ground to - input, converts to a 32,767 value, and ground to + input and full range voltage to + input returns a-32,768 value. Equal voltages applied to both + & - input pins returns a 0 value conversion. When run in single ended input mode it becomes a 15 bit ADC with 32,767 returned with full range voltage on the + input and 0 if at ground voltage.

 The true value of having and using the differential input mode is when wiring directly to a Wheatstone bridge type sensor (common for strain gauges and even thermistors) where the bridge's north connection is wired to +5vdc, it's south terminal to ground and the output taken from the east and west terminals directly to the diff input pins. At balance both measurement points will be at 2.5vdc and the ADC will return a value of zero counts and no matter which direction the bridge becomes unbalanced as the sensor(s) in the legs change resistance, will return either a positive or negative integer conversion value. That coupled with a full gain range allowing +/- .256 volts DC and one can see that it's a very sensitive measurement, as step resolution will be on the order of 8 uv if I did my math right ! That kind of resolution performance normally requires quite expensive instrumentation op-amps and very careful wiring layout.



Ok so this isnt capable of +/- inputs still, so I can remove some of the complexity i added by changing opamps, adding a -ve supply for the op amp, etc etc.

Correct, no negative voltages relative to ground, or voltage above the Vcc allowed on any pin of the device.

I have used the MAX127 before which takes 0-5, +/-5, 0-10, +/-10 etc and is software selectable etc, however not cheap at all.
Obviously what that does is not so simple to reproduce.

Nice chip, somewhat large package size(lots of input channel pins  smiley-wink ). Only real feature missing is programmable internal op-amp gain stages for measuring low level signals without requiring external amplification. Also lack of differential input mode then lacks the automatic common mode noise rejection that differential input gains you. However that's not something that can't be added with an external instrumentation differential input op-amp with programmable gain settings(?).

 There seems to be just thousands of ADC chips out in the wild these days, so getting the features one needs and nothing extra, is just a matter of the time consuming task of checking all those datasheets.  smiley-wink I was just very impressed with how many features and high performance they packed inside such a tiny package for the ADS1115. The internal voltage comparator mode with a independent output pin would make a great interrupt generating voltage monitor function, think low battery monitor/alarm, with very little software overhead in the controller chip, just a short ISR routine to save variables to EEPROM and shutdown safely.

Lefty


« Last Edit: August 14, 2011, 08:34:01 pm by retrolefty » Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Retrolefty

Did you get a usable 16 bits from the chip? Any issues like special PCB layout etc?

______
Rob
« Last Edit: August 14, 2011, 08:50:54 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Retrolefty

Did you get a usable 16 bits from the chip? Any issues like special PCB layout etc?

______
Rob

It seems to be very stable. I was driving it with one of these voltage sources:

http://cgi.ebay.com/Dial-Volt-General-Resistance-Model-DAV-45D-/400154292477

I never seem to see more then a +/- 2 count variation in value on any value and range I tried. Didn't do any kind of temperature variation tracking, or noise measurements, hower a jumper short across the diff input pins gives a very stable 0 count with only a single count jump once every twenty measurements or so. Anyway, much better then the standard arduino analog input pins, but that is not claim to fame.  smiley-grin
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is an awesome looking voltage source!

Oh and thanks for the big reply above, that is very handy indeed smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That is an awesome looking voltage source!

Thanks, it was one of my better lucky Ebay snipes at a very nice price many years ago. Old surplus test equipment can be very inexpensive sometimes on Ebay, however one never really knows the true condition and accuracy of such old used test equipment, buying that way. So unless the price is really good, I generally ignore such listings these days. The thumb switches are kind of clunky and fingers can get sore after a while, but it does seem to still be accurate if used within it's rather high source impedance rating. It could probably benefit with a nice beefy unity gain op-amp output stage with lots of current drive. Makes for nice easy calibration procedures.

Lefty

Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello smiley

Just thought I would update this thread.

I have just placed an order for 5 prototypes to be built, 4 of which are spoken for by others and 1 by me - so that works out perfectly.

Fully checked, and hopefully it works as desired.

Updated picture - spot the differences? Wheres Wally?



Cheers
James
Logged

Newcastle, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 239
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome looking board.

A couple of quick questions:

1. What are the AtTiny84 used for?
2. Does it have headers to take a standard Arduino Shield?
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi TonyD,

There are 3 AtTiny84's. Each one is used for high speed counting. The reason I have seperate processors is high speed counting uses alot of processor resources once you start counting really fast pulses, and I didnt want to A) effect the result and B) bog down the main processor, which is potentially doing a ton of other things. So the AtTiny's just send the result to the main processor on request.

No it doesnt have headers to take a standard arduino - that was never the intension. This was not to plug on your shields and prototype etc, it was more for final products which used standard IO.

If you were really keen you *could* wire sheilds to the General IO pins, however that wasnt the intension.

Cheers
James
Logged

Newcastle, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 239
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

James

Thanks for the quick reply. Using the AtTiny84's for fast counters makes sense. How do they communicate with the main processor?
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi again

They talk to the main processor over SPI.

The board utilises both SPI and I2C for its various on board IC's.

Cheers
James
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

6 PCB's just arrived from PCB Cart for the prototypes smiley

Very happy with how they look.
Just waiting for 1 last part to arrive from Digikey that was out of stock, and then its off to the PCB assembler to get partially assembled (fine pitch IC's etc) and then I will finish off the assembly to save cost, and then time to test smiley

Here are a few snaps - sorry for the focus in some, lighting this time of day is poor + photography isnt a strength - haha.







James
Logged

Pages: 1 [2] 3 4 5   Go Up
Jump to: