CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Long ADC distance...
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 6:59 am     Reply with quote

As Mr. T says R@R op-amp is a must.

Had a quick look at Microchips op-amp page, MCP6001 series would work fine. About 40 cents each, SMT of course.. add 2nd order filter on the input and RC on the output to make it stable. I'd make a PCB for it, small cable connection to sensor. That way if a sensor fails, easy to replace it.

As for the PIC, while 28 pinners would work(10 ADC,6 LCD,..) Add up what you need, then add 5 more. I still like 40 pinners as I hate to run out of pins! As well, project like this tend to 'grow'.

Jay
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 9:17 am     Reply with quote

MCP6001 is quite a bit cheaper than my go-to R-R op amp family of choice, the TLV237x (x = 1, 2 or 4), but the GBW product on the MCP6001 is only 1MHz. However, the TLV's are available in DIP packages while the microchip offering isn't.
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 9:36 am     Reply with quote

Wow someone still makes DIP Opamps ! hen again I rememeber the Teledyne-Philbrick OP-AMPs that were the about 3x4x2 INCHES.
I still prefer DIPs AND sockets as some things do go 'poof' in the real World,especially during Tstorms with lightning !

Selection of devices these days should be a simple 'drag/drop/choose/selection' process in some 'ap'. I only suggested th MCP as it was first in the list of hundreds....

It's best to fab up 2 or 3 sample units and test in the real World as work benches are always nice and warm and dry.....

Jay
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 2:38 pm     Reply with quote

1-Wire Network...

I have seen the light!

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 5:40 pm     Reply with quote

Just to be sure we are on the same page...

You are asking for op-amps because impedance will be high?



I checked in my junk box, I have a bunch of LM358 in DIP8 pkg. See anything wrong using the LM358?

Thanks guys!
_________________
Regards,
Laurent

-----------
Here's my first visual theme for the CCS C Compiler. Enjoy!
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Mar 03, 2017 7:29 pm     Reply with quote

What you need is a 'rail-to-rail' op amp, configured as a vlotage follower (X1 gain). The LM358, if memory is still good, only swings about 1.5 volts below VDD. So if powered from +5, the output of the LM358 can't go higher than 3.5, even if the input is say 4 volts.
With a rail-to-rail (R2R) op amp, you'll get 4.230 volts out for 4.230 volts in

If the input can never exceed say 3.5, then yes the LM358 should be OK.

however, just to add confusion, be sure the input can go R2R as well...some op amps might not like getting close to +5 ( supply voltage).

bench test, always bench test...use a heat gun and cold spray to 'mimick' the temperatures Mother Nature wil be for your project.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sat Mar 04, 2017 1:44 am     Reply with quote

and (of course), you don't want voltage gain. So no 'R1' in the circuit above...

I still have one circuit in production that uses a TO99 cased amplifier. However the manufacturer still makes the part, and it is only available in this package. It is a bit special a 'hyper' high input impedance instrumentation amplifier. It's being fed of a source that is over 10^9 ohm impedance. PTFE substrate board...
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Sat Mar 04, 2017 8:10 am     Reply with quote

Alright got it! Smile

Thanks for the help.

Have a nice week-end guys!
_________________
Regards,
Laurent

-----------
Here's my first visual theme for the CCS C Compiler. Enjoy!
starfire151



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PostPosted: Sun Mar 05, 2017 11:14 am     Reply with quote

Hi -

I just saw this thread and thought I'd chime in with my $0.02 worth...

Have you looked at the Tindie I2C soil moisture sensor (www.tindie.com)? It is also a capacitive soil moisture sensor and is fairly well water-resistant, although I added some protection to the edges of the PCB. It is a bit more expensive than your analog output sensor, though, at about $13 each. The advantage is you could daisy-chain the sensors. I've used this sensor in a couple of projects and it works pretty well.

Maxim makes the MAX3816A 2-wire extender for extension up to 60 meters at 100kbps, also.

Just FYI...
Smile
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sun Mar 05, 2017 12:51 pm     Reply with quote

The other big advantage this has, is the timings used to actually measure the capacitance are crystal based instead of analog. Long term should be a lot more stable.
ELCouz



Joined: 18 Jul 2007
Posts: 427
Location: Montreal,Quebec

View user's profile Send private message

PostPosted: Sun Mar 05, 2017 5:03 pm     Reply with quote

starfire151 wrote:
Hi -

I just saw this thread and thought I'd chime in with my $0.02 worth...

Have you looked at the Tindie I2C soil moisture sensor (www.tindie.com)? It is also a capacitive soil moisture sensor and is fairly well water-resistant, although I added some protection to the edges of the PCB. It is a bit more expensive than your analog output sensor, though, at about $13 each. The advantage is you could daisy-chain the sensors. I've used this sensor in a couple of projects and it works pretty well.

Maxim makes the MAX3816A 2-wire extender for extension up to 60 meters at 100kbps, also.

Just FYI...
Smile


Indeed a good looking product, I've seen it before.

Thanks for reminding me, I'll test the analog one first then i'll know where to purchase the rest ;)

Looks fairly easy to implement...

Now if it would had done isolation that would even been better!


_________________
Regards,
Laurent

-----------
Here's my first visual theme for the CCS C Compiler. Enjoy!
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Mar 05, 2017 5:44 pm     Reply with quote

Methinks the KISS methodology will work just fine for you outdoors as distance really isn't an issue. XLR cables ARE robust, application is good.
The second you go 'digital network' you open a huge 'can of worms'. All of them, except 1, have serious failure modes and it seems today's engineers just keep adding chips and code to try to get around problems.
As long as you're not in a hurry and know the difference between voltage and current, you can easily go 15 miles on a single conductor.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Mon Mar 06, 2017 1:46 am     Reply with quote

and (of course), you can reject a lot of noise with careful selection of filtering on the ADC reading. Spikes in particular can be removed with 'Olympic' averaging.

Remember also though to add protection on the ADC inputs. Don't rely on the chip's own protection. Have something like an MOV on the input, followed by a filter capacitor, and then diode clamps to the supply rails. For your low frequency application, you don't have to worry about the diode recovery time. Remember also that the energy has to go somewhere, so there has to be sufficient smoothing on the supply to cope.
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 06, 2017 8:27 am     Reply with quote

Mr. T is right about protection, MOVs and caps and such. I even used NE-2s ( neon lamps) as well. Gee, do they even MAKE NE-2s anymore? I must be a dinosaur....feeling old today.

Jay
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Mon Mar 06, 2017 9:02 am     Reply with quote

My "standard" protection scheme is this:
- series R, usually ~100R.
- cap to GND. 0.1uF makes this LPF cutoff freq ~ 16kHz. Tailor this C and the series R to hit whatever frequency you want/need.
- Bidirectional TVS (transient voltage suppressor) to GND (in parallel with the cap).
- "sacrificial" op-amp, usually configured to a be simple voltage follower. My line of reasoning is that if something fries, I'd like it to be an op-amp and not my processor.
- any additional analog filtering you require can follow (if necessary)
- finally the signal is input to the A/D.

This protection network depends very strongly on the ability of whatever you're reading to drive this network. As such, the system as a whole has to be considered. Sometimes an extra series PTC resettable fuse needs to be added to the input if there is the possibility of a cable fault shorting a "high" voltage supply line to your analog input. The nice thing about a PTC resettable fuse is that they'll automatically open when there's a fault. The only thing that needs to be done to reset it is just cycle the power.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group