I’m using an MCP4162 single-channel digital rheostat with this library: GitHub - dreamcat4/Mcp4261: Arduino library for the Microchip MCP4261
I’m simulating the controller of a slot car race track. It’s a really simple controller, the plug has 2 contacts and inside the controller we find a linear potentiometer (10kohm). At 10kohm the car doesn’t move and at 0ohm the car goes at max speed.
It seemed straight forward enough to introduce a digital potentiometer/rheostat to replace the slot car controller. I chose the MCP4162 (10kohm).
What I did was put together the breadboard as seen in the image below. I used a pot-meter input to drive the output resistance of the MCP4162. When measuring with a digital multimeter it appeared to work well, getting stable and constant resistance readings when not changing the input pot’s value.
I then attached 2 wires to the outputs which were connected to the slot car system (effectively replacing the controller, correct?).
The observed behavior of the race track was an erratic, oscillating amount of input to the slot car race track. I’d say ~0.5Hz oscillation. Not 0 to max, I’d say ~0 to ~25% input (2.5kohm?). I don’t have an oscilloscope so I can’t get really good readings so I’m kind of guessing. The digital multimeter doesn’t display things very well… it seems things are changing too rapidly for the digital multimeter to be useful.
I thought I might see the oscillation more clearly if I would introduce an LED to the schematic. Oddly, the oscillation was not visible anymore. However, the slot car needed a lot more input to get going, the car started moving when the potmeter was almost fully open. The image below show the wiring.
I’m not sure what’s going on here. Can the MCP4162 not act as an ‘isolated’ resistance? Is it necessary to have common ground? Eh… is it even needed to have common ground? The MCP4162 is simply a variable resistor, is it not? I don’t understand the oscillation but also not why the added LED changed that behavior.
Any insights are welcome!