Author Topic: DIY MCU controlled decade resistance box  (Read 9679 times)

0 Members and 1 Guest are viewing this topic.

Offline m.m.mTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ir
  • EE MSc Student and Hobbyist
DIY MCU controlled decade resistance box
« on: September 30, 2013, 03:09:03 pm »
hi everybody, I thought it would be awesome if we can make a decade resistance box using microcontrollers, it could be controlled over usb, and also a simple keyboard connected to it, I don't ask for the software, but my question is about how can I make the switches between the resistors? should I use relays? is there any way for making it using op amps? sorry if I posted it in wrong category.  :-//
25 y/o Electronics Lover
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: ca
    • VE7XEN Blog
Re: DIY MCU controlled decade resistance box
« Reply #1 on: October 02, 2013, 05:07:18 am »
Relays are the only sensible way I can think of. Analog switches will have too much resistance on the low ranges. If you did use analog switches you might be able to estimate the total resistance of the switches and compensate for it, but it will substantially reduce your accuracy and tempco on the low ranges.

Resistance boxes are supposed to be passive. You could probably design something that's not a resistance box but behaves like a controlled resistance, but it would have many additional limitations on bandwidth, input voltage, would need a power supply of its own, and could also oscillate with whatever circuit is on the input.
73 de VE7XEN
He/Him
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5055
  • Country: ro
  • .
Re: DIY MCU controlled decade resistance box
« Reply #2 on: October 02, 2013, 02:34:23 pm »
Might be cheaper to use a sort of stepper motor and some rotary mechanism like on multimeters perhaps....
 

Offline alanb

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: gb
Re: DIY MCU controlled decade resistance box
« Reply #3 on: October 02, 2013, 06:20:12 pm »
Have you considered using binary steps rather than decimal, it will require significantly less resistors and switches. You can convert from the decimal / dedcade values to binary in your microcontroller software.

 

Offline jbe

  • Contributor
  • Posts: 11
  • Country: de
Re: DIY MCU controlled decade resistance box
« Reply #4 on: October 07, 2013, 09:54:01 am »
I'm currently working on the design of a passive audio pre"amplifier", which is basically a configurable voltage-divider.

I've built one very promising prototype so far. The divider-design is somewhat similar to this very nice project http://www.vaneijndhoven.net/jos/relaixed2/ (all the documentation including schematics are online)

The one i build is a 8-stage logarithmic divider, configured by relais. I used an uln2803 as driver, controlled by a simple 74hc595 8bit shift register. In my next design iteration i consider moving away from the shift-resister, to either a small mcu or an i2c gpio-chip.

If you are interested i could post some schematics and/or layouts of my prototype.

Hope this helps.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: DIY MCU controlled decade resistance box
« Reply #5 on: October 07, 2013, 11:11:14 am »
Not sure how you could implement it via opamps.

If it is all DC, you may be able to implement it via mosfets.

Otherwise, relays controlled by mcus + lcd + rotary encoders would be the way to go.
================================
https://dannyelectronics.wordpress.com/
 

Offline andtfoot

  • Supporter
  • ****
  • Posts: 352
  • Country: au
Re: DIY MCU controlled decade resistance box
« Reply #6 on: October 07, 2013, 11:21:13 am »
I wonder how viable it would be to use motorised pot(s), maybe with some kind or measuring circuit hanging off the second pole for self calibration.
Something like this:
http://au.mouser.com/ProductDetail/Bourns/PRM162-K420K-103B1/?qs=sGAEpiMZZMtC25l1F4XBUzdugALayiIk5Z3Iirm62DU%3d
 

Offline m.m.mTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ir
  • EE MSc Student and Hobbyist
Re: DIY MCU controlled decade resistance box
« Reply #7 on: October 11, 2013, 01:36:03 pm »
Have you considered using binary steps rather than decimal, it will require significantly less resistors and switches. You can convert from the decimal / dedcade values to binary in your microcontroller software.
you mean the first resistor 1k, second 2k, third 4k, etc for example? just like dave explained it on a previous video? It also needs a kind of switch or relay to short the resistors by parallel. I guess using this way costs less than using stepper motors and rotary switches and is more accurate.
25 y/o Electronics Lover
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: DIY MCU controlled decade resistance box
« Reply #8 on: October 13, 2013, 11:15:45 pm »
Why not take a look at some load generators or dummy loads.
In short these are some kind of controlled power resistors.

And you can use some high-side n-mosfets for your purpose.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: DIY MCU controlled decade resistance box
« Reply #9 on: October 14, 2013, 12:24:02 am »
Quote
Why not take a look at some load generators or dummy loads.

Their behaviors in a circuit, particularly ac circuit, can be quite difficult to describe / predict.
================================
https://dannyelectronics.wordpress.com/
 

Offline geraldjhg

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ar
Re: DIY MCU controlled decade resistance box
« Reply #10 on: October 14, 2013, 03:55:22 pm »
hi
u could use relays and resistor values power of 2 based
it would be fun but slow

try a digital potentiometers from intersil
in digikey
G E R A L D
 

Offline m.m.mTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ir
  • EE MSc Student and Hobbyist
Re: DIY MCU controlled decade resistance box
« Reply #11 on: October 25, 2013, 10:42:08 am »
thanks a lot, but I don't like potentiometers (they're not accurate, and need cleaning, and can't handle much current, etc) and I don't have access to digikey, mouser, etc in my region  :palm: I just found a transistor optocoupler in my junk box  :) I didn't know what a optocoupler is before today, now I have a brief knowledge about it after reading this, can I use these in this application? thanks a lot.
25 y/o Electronics Lover
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2259
  • Country: ca
Re: DIY MCU controlled decade resistance box
« Reply #12 on: October 25, 2013, 02:00:35 pm »
I would also use a binary arrangement as already suggested. Decade is useful when using manual switches. We "think" in decimal numbers, so making the switches that way is logical. But when you add a microcontroller between you and the resistors, then there is no longer any need to use a decade arrangement. Now you can use a power-of-two arrangement (like a R2R DAC, google it and study it) and have the micro convert between the decimal number that was input by the user, and the binary arrangement of the switches. You will end up with fewer resistors and switch poles this way.

You could use relays for the switches, or power MOSFETs. Either one will have roughly a few tens of milliohms of resistance when On. Solid State relays are also an option, but probably more expensive. Mechanical relays work well if you don't need extremely fast switching times or a lifetime or millions of switch cycles.

Nobody has addressed your requirement for the device to be controlled over USB. I personally think that the easiest way to do this would be to use a small cheap USB-to-serial (TTL level) converter which can be had for less than $2 on eBay, etc. Connect that to the UART of the microcontroller. Receiving and sending bytes from the UART is at least an order of magnitude easier than USB, both in terms of effort, code size, and code speed. Let the USB-serial converter do that work, that's what it's made for. Then you just need to come up with a simple command protocol, and send those commands as strings to the device over the serial port.
 

Offline rudika79

  • Regular Contributor
  • *
  • Posts: 68
  • Country: gb
Re: DIY MCU controlled decade resistance box
« Reply #13 on: November 01, 2013, 06:38:28 pm »
Hi,

Here is one quick sketch how I will implement MCU controlled resistor decade box with relays. The schematic showing just one decade.
You can see one picture off resistor network on Vishay web site http://www.vishaypg.com/foil-resistors/case-studies/study/Meatest_1/

Rudolf
 

Offline N TYPE

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: DIY MCU controlled decade resistance box
« Reply #14 on: November 04, 2013, 11:50:48 am »
Guilding . The . Lily .
 

Offline casinada

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: us
Re: DIY MCU controlled decade resistance box
« Reply #15 on: November 06, 2013, 07:13:32 am »
Watch Dave's Last video of the Fluke 5450 Rasistance calibrator. You can also look at the schematics. Plenty of resistors and relays :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf