DIY MCU controlled decade resistance box - Page 1
Forum section: electronics / general

author: m.m.m
author_rank: Regular Contributor
timestamp: September 30, 2013, 03:09:03 pm
content: 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.

author: ve7xen
author_rank: Super Contributor
timestamp: October 02, 2013, 05:07:18 am
content: 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.

author: mariush
author_rank: Super Contributor
timestamp: October 02, 2013, 02:34:23 pm
content: Might be cheaper to use a sort of stepper motor and some rotary mechanism like on multimeters perhaps....

author: alanb
author_rank: Frequent Contributor
timestamp: October 02, 2013, 06:20:12 pm
content: 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.

author: jbe
author_rank: Contributor
timestamp: October 07, 2013, 09:54:01 am
content: 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 projecthttp://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.

author: dannyf
author_rank: Super Contributor
timestamp: October 07, 2013, 11:11:14 am
content: 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.

author: andtfoot
author_rank: Unknown
timestamp: October 07, 2013, 11:21:13 am
content: 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

author: m.m.m
author_rank: Regular Contributor
timestamp: October 11, 2013, 01:36:03 pm
content: Quote from: alanb on October 02, 2013, 06:20:12 pmyou 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 13, 2013, 11:15:45 pm
content: 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.

author: dannyf
author_rank: Super Contributor
timestamp: October 14, 2013, 12:24:02 am
content: QuoteTheir behaviors in a circuit, particularly ac circuit, can be quite difficult to describe / predict.

author: geraldjhg
author_rank: Regular Contributor
timestamp: October 14, 2013, 03:55:22 pm
content: hiu could use relays and resistor values power of 2 basedit would be fun but slowtry a digital potentiometers from intersilin digikey

author: m.m.m
author_rank: Regular Contributor
timestamp: October 25, 2013, 10:42:08 am
content: 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 regionI just found a transistor optocoupler in my junk boxI didn't know what a optocoupler is before today, now I have a brief knowledge about it after readingthis, can I use these in this application? thanks a lot.

author: macboy
author_rank: Super Contributor
timestamp: October 25, 2013, 02:00:35 pm
content: 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.

author: rudika79
author_rank: Regular Contributor
timestamp: November 01, 2013, 06:38:28 pm
content: 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 sitehttp://www.vishaypg.com/foil-resistors/case-studies/study/Meatest_1/Rudolf

author: N TYPE
author_rank: Regular Contributor
timestamp: November 04, 2013, 11:50:48 am
content: Guilding . The . Lily .

author: casinada
author_rank: Frequent Contributor
timestamp: November 06, 2013, 07:13:32 am
content: Watch Dave's Last video of the Fluke 5450 Rasistance calibrator. You can also look at the schematics. Plenty of resistors and relays