Feedback Voltage not being read by A3

My goal is to control voltage 0-24v using an NPN then send the output through a voltage divider and read it back to the sketch as 0-5v
I can get the voltage to display correctly using a volt meter in Tinkercad, but the serial monitor only displays 1023.

Why the NPN transistor. Is that used as a switch to ground.
So when the transistor switch is "open" there is no ground, and all coloured wires could potentially have 24volt on them.
Leo..

The NPN is being used because Tinkercad does not have the motor/voltage regulator that I got from Amazon. Do you have any suggestions? Please.

Then don't use Tinkercad. Not using the right parts will only lead to confusion.
Try pencil and paper. Don't forget to label the parts.
I assume not many of us like logging into a site before we can see a project (i don't).

What motor, what voltage regulator (web links please).
Are you really using an Uno R3, or is that also not what you have.
Where is your code, and what do you want it to do.
Leo..

1 Like

I did a little more studying and found that a PWM input may not read a PWM output very well.
I also learned that my posts need to be much better
Once I put the actual parts on a board and wire it up I will take a picture and post the code.
Thank you, PoundSand

Please also draw a schematic, and post that.

Please read 'How to get the best out of this forum' for further tips

eg, 'Posting code and common code problems' on how to properly post your sketch

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.