Pots PCB Design For Nano Shematic Check

I am designing a PCB for 8 potentiometers to be connected to an Arduino Nano's Analog pins A0-A7, or any analog input on any microcontroller. Using easyEDA

In addition there are 3 optional sensor inputs ( J1, J2, J3, for cdS photocells).
Greatly appreciated if anyone could offer advice/opinions or find any boo-boos in the schematic before I get them made.

Sincere thanks,
TonyAme

First comment… ensure +V is the same as your processor / Ain spec !

What are the Pots supposed to do :thinking:

No time here now, please draw out one cct. with the pot and CDS cells

Thank you. This would be just a general purpose PCB where the pots are just general purpose analog inputs for any microcontroller, but in my case the Nano. I have found myself many times using a protoboard for a bunch of pots, simple wiring but takes a lot of time.

I'm using it specifically for a digital synth library called Mozzi:

Any time you're using analogRead(), where the center of pot pin (wiper) of the pot goes into the analog input of the arduino, and one side of pot to +5 and the other to (-), (the pot wired as a voltage divider).
arduino-potentiometer

Same with using a CdS photoresistor as seen here:

So, finally trying to make my own pot-board, I thought I'd add a couple of connectors for photoresistors.

Thanks again,
TonyAme

Firstly, photoresistors are not three terminal devices.
The photoresistor and potentiometer will each affect the behaviour of the other.
So eg if the wiper of pot R8 is at the 0V end or the 5V end sensor 1 will do nothing.

C1 - C8 reduce the effect of a noisy wiper so they arent really "optional"

If you are making a general purpose board , then it’s worth adding a couple of push buttons and some LEDs on a couple of outputs for use on other projects .

Why not fit a socket so you can mount the nano on it too, preferably a zif one

One I did for the 4809 , added a rs232 chip and5v regulator too

1 Like

Thanks. The way I wire the photoresistors (before adding them to the board), they do have 3 wires/connectors. They would work in conjunction (add to) the analogReading of the pots, or if you omit the pot, just analogRead() the photocell alone.

Here is how I've been wiring my CdS photoresistors:

And here is a pic of the pot board I keep making on a protoboard;

Thank you for the help,
TonyAme

Here is an updated version of the schematic. Added volume pots R14, R15. PWM pins from the Nano come in through U1 (pins 8, 6 &4).

Pin 8 goes into a low pass RC filter to a filtering cap C11 (100uf), then to volume pot R14, then output to LPF (low pass filter output) which is just 2 pin pads for connecting a header.

Pins 6&4 of U1 combine and go into another low pass RC filter, then to C12 (100uf), to volume pot, and them same output as with pin 8 above.

*My main concern is that there are no basic circuit boo-boos, especially with the power connections +V & Gnd on the schematic. The audio stuff is not a concern... unless someone can see any problems with that too!

Sincere thanks to anyone who can check this over, very much appreciated.

Hammy, thank you. Yes, I have a couple of boards like that for the Adafruit Metro Mini and the Nano, both made last winter with a lot of help from this forum, and I believe from you as well.

The pot board is something I've needed to make for awhile, wiring a lot of pot on a protoboard get monotonous.

Your board really looks great. Thanks again.

I see - so on your schematic pins 2 & 3 are connected together.
That means the pots have a 1k (10k on the new schematic) between the wiper and ground.
You havent shown the values of the pot resistances, so we cant know what effect that will have.

However if eg R7 wiper is at +5V the photoresistor (sensor 2) will have nothing except its own resistance to limit current.

Hi,
In post #8 diagram, instead of just having connectors, actually include the sensors.
Then you will save a thousand words trying to describe your project.

This will make the functionality of the schematic a lot better.

A proper troubleshooting schematic includes ALL peripherals, and not just connectors.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

1 Like

Gottcha, that makes sense. Thanks for the help.
TonyAme

The potentiometers are 10k linear.
Right, pins 2,3 are connected, so if used together (pot + photoresistor) the pot's wiper would have a 10k resistor between wiper and gnd.

I'm starting to think I should separate the pots and the photoresistors, easy to do and reduces complexity. Thanks for the help on that.

Will go over and get back. Sincere thanks!
TonyAme

1 Like

Updated Pot + Photoresistor Board.
(Outlined the power input circuit, does it all look OK there?)

*Separated the photoresistors from pots, & photoresistors wired so that there is a 10k resistor between +5V and the Arduino analog pin, instead of one leg of photoresistor going straight to +5V.

*Potentiometers are 10K linear.

Looks good except for missing values for R9 R13 R14 R15.
and depending on your supply maybe a 100uF or so across C14

Using 2 PWM outputs to make an audio signal was new to me so I did some googling.
This site

led me to
https://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/
and thence to

There are good reasons to use a buffer - as explained there - so as you intend to use audio and it wont add much complexity I'd suggest you put those components on your board.

Yes, using the 2 pwm pins together as a "HiFi" audio option for the Mozzi digital synth library. I will look into the buffer circuit, thank you.

Here are the PCB of the Arduino Nano, and the PCB of the updated Potentiometer/photoresistor/audio filter board:


You left out the kitchen sink

R9 and R11 are too small.

Connecting 5v to collector pin 8 of the 6N138 will cause a short to GND when the opto turns ON !
:scream:


Draw your schematics so they follow normal conventions.

2023-09-04_12-47-21

Gotcha, thanks for looking it over. Will check the optoisolator.

You should really keep the audio, logic and sense grounds seperate up to a star point at the supply.
As explained here