ArduinoNANO and MCP4725 DAC : I need 0,8V to 3,5V output using a potetiometer

So a friend of mine has an arduino NANO and MCP4725 DAC and he wants
to have output from them from 0.8V to 3.5V depending the potetiometer !
Any help or a project ?
We tried : Arduino 0-5v in to 0-5v out Throttle Interface | Endless Sphere

but didn't work for us!

Any advice would be really helpfull!

In the link below, click on datasheets.
You will find both a spec sheet and a tutorial sheet.

https://www.digikey.com.au/catalog/en/partgroup/mcp4725-breakout-board/49473?utm_adgroup=General&utm_source=google&utm_medium=cpc&utm_campaign=Dynamic%20Search_Product&utm_term=&productid=&gclid=EAIaIQobChMIys21sovu6AIV1Y-PCh28twm8EAAYASAAEgKiBPD_BwE

Thank's for your reply I will check it out!
If anyone else can suggest anything it would be really appreciated!
I think I actually need an arduino based power supply 0.8-3.8V that this voltage is beeing controled from
a 1.2KΩ (measured) potetiometer!

( it's for an electric bike project and this voltage 0.8V-3,5V is need to control the speed)

sv9ryg:
but didn't work for us!

That does not mean anything. Did it not compile, did you not get the expected output of 0.8V .. 3.5V. or something else?

Show the code that you tried; the one from the link seems to go to 5V. I'm sure that there are people here that will be able to help.

You could just use the potentiometer and some fixed resistors.

Let's say you have a source of 5V. You want the low end of the pot at 0.8V and the high end of the pot at 3.5V.

Let's start with the fixed resistor between the low end and Ground to make the low end 0.8V. Since 0.8/3.5 is 23% then the remaining 77% is the 1200 Ohm pot. Divide 1200 by 77% to get 1558 Ohms across both resistors. Subtract the 1200 Ohms of the pot to get a 358 Ohm fixed resistor. Let's call it 360 Ohms since that is available in 5% tolerance.

Now the resistor between the high end and +5V: 3.5V is 70% of 5V so (1200+360) is 70% of the whole. Divide 1560 by 70% to get 2229. Subtract 1560 to get 669. Let's call it 680 since that is available in 5% tolerance.

So now we have our circuit: Ground -- 360 Ohm -- Pot -- 680 Ohm -- +5V

Thank's for your replies! I will try them out!
We actually need the 0,8V-3,5V output from the arduino controlled by the potetiometer
because we want to modify some concepts in the code because right now the bike use this voltage 0,8V-3,5V
and the accelartion is dangerous in some points. That's the problem.
Let's say that also a 0,8V-3,5V input in the arduino tha will be consider in the code it will give another ouptut
in the same range .

check the image to see what he is trying to accomplish!

Dualtron_mapper_Principle.JPG

In the code of the link that you provided, you'll need to change the voltOutIntLUT[] array to match your curve.

If you can find a formula, that will make it easier. Either implement the formula or calculate the array values based on the formula.

A basic formula might be based on a logarithmic or a power of the input; math is not my strong point :frowning: