Go Down

Topic: Can the voltage on a mega or uno be adjusted at 5v or 3.3v pin? (Read 339 times) previous topic - next topic

keyboardcowboy

My question is can you program a lower voltage to be produced from the 5v pin or 3.3v pin that is lower then what either pin supplies? I did google a few different things and didn't find anything that really related to my question.

https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/
Would analogReference work? INTERNAL4V3, and adjust the 4 and 3 to desired voltage?

Could it be supplied with a petentiometer to adjust desired voltage from min to max?

septillion

No, you can supply a little bit less on the 5V pin (assuming a 5V Arduino!) but beside that there is no control on those pins. They are just supply voltages.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Leveller

No, you'd need extra circuitry, just curious but why would you want to do that?
Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying.

UKHeliBob

Quote
can you program a lower voltage to be produced from the 5v pin or 3.3v pin that is lower then what either pin supplies?
What do you want to do with the lower voltage ?

Would a PWM output do whatever it is you want to do ?

More details please
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Leveller

Yes, PWM and a capacitor/resistor to change it from PWM to analog, but I don't think it produces much current 40ma? yeah I know its from indestructibles but https://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/
Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying.

keyboardcowboy

Would like to control voltage to a atomizer if possible, I do have many supplys avail capacitors resistors ic's many things for designing and building circuits for arduino(mega electronics kit from amazon)

septillion

40ma?
It's more like non at all ;)

Because once you load an RC filter it will mess with it. So fine for a high impedance input of something but the moment you try to really draw current from it you effectively just end up with a voltage divider.

Atomizer, that's the vapor heating thingy? If so, use PWM via a transistor.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Leveller

yes, heating things requires higher current, would that be a transistor to switch a higher current?
Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying.

GoForSmoke

You can draw 40mA from an Arduino pin but not continuously for long before the pin burns out.

Use the pin to switch a transistor on, the transistor must be able to conduct whatever current you need.

For small current (less than 500mA) you can get away using a BJT (bipolar junction transistor, the old type).
The newer FETs (field effect transistor) are better especially with more current/
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

keyboardcowboy

Yes, PWM and a capacitor/resistor to change it from PWM to analog, but I don't think it produces much current 40ma? yeah I know its from indestructibles but https://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/
I dont know if those ma matter for this, would like to supply between 3v to 4.8v I guess so far. Checking out that link right now.

https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/

Would that work, using a petentiometer to adjust voltage between 1 n 4.76?

I have a good selection of transistors, but according to the above link can just use a pent to adjust voltage. I have a LCD I can print what the voltage should be, So the pent gets wired to ground 5v and the pwm pin, while the pin a0-5 pins goes to what im applying voltage to correct?

GoForSmoke

1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

septillion

No, pot's also can't supply real currents (at least most, you can get high power ones).

Start by measuring the current ;) And no need to check the Instructables of Leveller for this application ;)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

GoForSmoke

A voltage divider with a pot as one leg... to adjust 5V or 3.3V to less V.

"thunk" goes the shoe
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Leveller

Voltage is not the issue, it's the current required, you need to find out how much it requires, before you start plugging stuff in.

edit: cause I can't post new

Measure the resistance of the atomiser and then use ohm's law to work out the current required at any voltage (i=v/r)
Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying.

keyboardcowboy

https://www.allaboutcircuits.com/tools/voltage-divider-calculator/

Outside pins of the pot go to ground and input voltage and middle should output the regulated volate according to that

Go Up