HokieGeek / power-supply-voltage-selector

My tabletop voltage source
0 stars 0 forks source link

Consider a digital pot #6

Open HokieGeek opened 8 years ago

HokieGeek commented 8 years ago

I already have an MCP41010: http://ww1.microchip.com/downloads/en/DeviceDoc/11195c.pdf

HokieGeek commented 8 years ago

Use Bus Pirate to drive the SPI for testing the rheostat mode.

Writing SPI library for the attiny so that it can talk to the pot.

HokieGeek commented 8 years ago

The command byte will always be 0b00010001

HokieGeek commented 8 years ago

Bus Pirate command to set it to mid resistance (5k, I guess) should be: [0x11 0x80]

HokieGeek commented 8 years ago

Any point considering shutdown mode (0b00100001)?

I can only think that I would use it when I select 'Adjustable' but is there a point in that?

HokieGeek commented 8 years ago

http://maxembedded.com/2013/11/the-spi-of-the-avr/#Code

HokieGeek commented 8 years ago

Atmel's AVR and SPI doc: http://www.atmel.com/images/doc2585.pdf

HokieGeek commented 8 years ago

This works...

http://henrysbench.capnfatz.com/henrys-bench/mcp41010-digital-potentiometer-arduino-user-manual/

HokieGeek commented 8 years ago

Interesting

SPI.transfer16(val16)

https://www.arduino.cc/en/Reference/SPITransfer

HokieGeek commented 8 years ago

I should probably determine if I can even do what I want to do. From the regulator's datasheet:

VOUT = VREF x { 1 + R1/R2 } – |IFB| R1

http://www.daycounter.com/Calculators/Voltage-Regulator-Resistor-Divider-Calculator.phtml

Given Each step of the pot is 39.0625 Ohm

R1 = 1 kOhm Vref = 1.23 v

Vout R2 (kOhm) Data byte
3.3 1.68 43
5 3.0 76
9 6.32 161
12 8.76 224
HokieGeek commented 8 years ago

Figure out how well the shutdown mode for this works