CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Electronics > General Electronics Discussion


General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 05-26-2010, 07:21 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?
Analog +-10v to 0-5v conversion

Hi, as the title suggests I would like to take a +-10v analog signal and convert it to a 0-5volt output to feed into a micro.

I would like to have the output linear so that with 0v input gives 2.5v out.

I imagine an op-amp would be the best option and I have been doing some research but have to admit I know very little about them. If anybody has a schematic to achieve this and is willing to share I would be very grateful.

Cheers.

Russell.
Reply With Quote

  #2   Ban this user!
Old 05-26-2010, 08:25 AM
 
Join Date: Jan 2006
Location: USA
Posts: 1,764
keebler303 is on a distinguished road

Op amps will indeed work.

You first want an amplifier with a gain of 1/4. The output of that amplifier will be +/- 2.5V. Then you will use and op amp adder to add 2.5V to the signal so you will get 0-5v out. Then you probably want to run that through another op amp as a buffer so you have some meaningful current available.

Matt

Edit:

Non-inverting amplifier: http://www.electronics-tutorials.ws/opamp/opamp_3.html

Summing amplifier (adder): http://www.electronics-tutorials.ws/opamp/opamp_4.html

More: http://www.eecs.tufts.edu/~dsculley/...s/opamps5.html
Reply With Quote

  #3   Ban this user!
Old 05-27-2010, 03:20 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

Hi Matt, thanks for the reply.

I think I am getting the hang of it...

So if I were to choose an op amp, would the LM348M - Quad 741 Op-Amp - SMD be suitable ?

From the datasheet it looks like the voltage range is OK, and I can use three of the op amps in the same package, is there anything I have missed ? The third stage you mention may not be necessary as the micro shouldn't draw a lot of current to do the ADC, but I guess since it is there I may as well use it.

While I am at it, would it be bad to use the fourth unused op amp in that package for the current sense side of things ? I am thinking this could also be fed into the micro to monitor current.

This is all for a servo power stage as you probably have guessed already.

Cheers.

Russell.
Reply With Quote

  #4   Ban this user!
Old 05-27-2010, 08:18 AM
 
Join Date: May 2010
Location: Germany
Posts: 1
Ingenieur is on a distinguished road

Originally Posted by epineh View Post
Hi, as the title suggests I would like to take a +-10v analog signal and convert it to a 0-5volt output to feed into a micro.

I would like to have the output linear so that with 0v input gives 2.5v out.

I imagine an op-amp would be the best option and I have been doing some research but have to admit I know very little about them. If anybody has a schematic to achieve this and is willing to share I would be very grateful.

Cheers.

Russell.
Hi, Russell,

as keebler303 described, you will need 2...3 OpAmps.

You can make it with only one:

Netlist:
R1 (50 kOhms) : OpAmpOut --- OpAmp(-)
R2 (50 kOhms) : OpAmp(+) --- GND
R3 (100 kOhms) : OpAmp(-) --- GND
R4 (200 kOhms) : Ref(+10V) --- OpAmp(+)
R5 (200 kOhms) : Signal(+-10V) --- OpAmp(+)

Every single OpAmp should do the job.
Supply Voltage : ( add min. 2V to Output-Range ) e.g. -2V/+7V or better -2V/ +10V so you can take +10V for Ref too.

Check if your ADC can handle (faulty) negative input voltage.

Cheers

Erhard
Reply With Quote

  #5   Ban this user!
Old 05-27-2010, 11:29 AM
 
Join Date: Jan 2006
Location: USA
Posts: 1,764
keebler303 is on a distinguished road

Russell

I think most any op amp will work for this circuit. If you are looking for high bandwidth, there may be better options. I think as long as the bandwidth of the op amp is above your A/D rate, you should be fine. You may want to incorporate some trimpots in your design so you can correct for errors caused by resistor tolerances.

Matt
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 05-29-2010, 06:54 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

Cheers guys, I will take that all that onboard, I do think that a better quality op amp is called for in this application, time for more research.

Russell.
Reply With Quote

  #7   Ban this user!
Old 05-29-2010, 07:07 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

Actually I just had a thought, all I am really after is something I can use to drive a H bridge, I could use an analog to PWM conversion and skip the micro altogether, basically what I am after is a class D amplifier, that may be a quicker way to go, I was going to use the deadtime built into the micro I was using but I could just use IR2184 or equivalent with built in deadtime.

Russell.
Reply With Quote

  #8   Ban this user!
Old 05-31-2010, 09:58 PM
 
Join Date: Jan 2006
Location: USA
Posts: 1,764
keebler303 is on a distinguished road

Russell

I'm not sure if chips exist to directly convert +/- 10 to PWM. I would think there would be but not sure. Digikey has over 400 "class d" amplifiers but I'm not sure if a chip for audio applications would be usable for this. It might be worth looking at a couple datasheets. The old school way to convert voltage to duty cycle is to compare the analog signal to a triangle wave.

The frequency of the triangle wave sets the frequency of the PWM. The higher the analog voltage, the longer the triangle wave voltage is under the analog voltage and the longer the duty cycle of the PWM. You can achieve all of this with a few more op amps.

http://www.play-hookey.com/analog/tr...generator.html

Matt
Reply With Quote

  #9   Ban this user!
Old 05-31-2010, 10:02 PM
 
Join Date: Jan 2006
Location: USA
Posts: 1,764
keebler303 is on a distinguished road

These should be helpful:

http://homepages.which.net/~paul.hil...enerators.html

http://www.simplecircuitdiagram.com/...-using-op-amp/

Matt
Reply With Quote

  #10   Ban this user!
Old 05-31-2010, 10:21 PM
 
Join Date: Dec 2008
Location: canada
Posts: 226
Pandinus is on a distinguished road

Just thought I'd mention OP-Amps in general are not "IDEAL" as in they wont go to the rails... If you want the output to go 0V to 5V the -V supply must be less than 0V and the +V supply more than 5V .. by as much as 2 volts for Some OP-AMPs...
but seeing as you want to convert +/- 10V you will most likely be using a +/- 12V supply for the circuit....

To convert a Hypertherm plasma torch output from -7 to 0 volts, to a +V up and down signal (Torch height control) I used an old PC power supply as it has a low current -12V and ample +12V for the rest of the circuits and relays in my control box...
Reply With Quote

Sponsored Links
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Analog controll options zoeper Mach Software (ArtSoft software) 3 10-24-2009 09:36 AM
Need Help!- No Spindle 0-10v analog adam12000 Milltronics 0 07-12-2008 04:35 PM
analog +/-10V signal gen visky Want To Buy...Need help! 4 04-30-2008 09:40 PM
PWM to analog Drew Machines running Mach Software 7 10-09-2007 10:40 PM
Getting analog signal from pc roni21702 Computers and Networking 1 06-15-2006 01:34 PM




All times are GMT -5. The time now is 06:44 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361