Project working on breadboard but on PCB not :/ What I did wrong in schematic

So I have simple PCB, there is some power section (I need 12V and 5V), and the rest mostly is just to filter noise and separate PWM output.

http://s21.postimg.org/my0a9s9g7/Clipboard03.jpg

I made this schematic from my breadboards, whole project is working without any issues, but on PCB I can't get it working.

I cut whole software just to few lines to test outputs and LCD but LCD is in half black and on bottom empty (I can get it to state where I can see something, after regulation there are 2 states, black boxes or empty boxes).

Also Output isn't working at all. I tried to set high/low with some delay so I can see if it's working and I checked with oscilloscope that nothing is showing on.

#include <LiquidCrystal.h>
LiquidCrystal lcd(4, 5, 6, 7, 8 ,9);
int BACK = 12;

void setup(){
 pinMode(BACK,OUTPUT);
 lcd.begin(16,2);
    
  lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("HIGH");
     
}


void loop(){


  
  
    
digitalWrite(BACK, HIGH);
lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("TEST1");
      delay(1500);
        lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("TEST2");
      delay(1500);
        lcd.clear();
      lcd.setCursor(1,0);
      lcd.print("TEST3");
      digitalWrite(BACK, LOW);
 delay(1500);
        lcd.clear();
      lcd.setCursor(1,0);
      lcd.print("TEST4");
delay(1500);

}

If I will just use this uC on breadboard I will get HIGH/LOW on pin 12, but when I will install it on PCB it won't change states, it is just flat line on oscilloscope.

I'm sure that I made an error on PCB, but I have no idea where as I just copied my test project from breadboards.
I'm milling PCB on professional 4axis CNC, preparing code with Eagle Gcode script, and I already tested several PCB's...

Here is PCB

http://s29.postimg.org/6amx8sk53/Clipboard02.jpg

Test it step by step.

Is the ground of the power supply connected to the ground of the Arduino ?

Can you measure the pcb, to see if there are no shortcuts ? You need a multimeter.
You need a multimeter anyway, to measure the GND and +5V of the Arduino.
The display could be damaged, start with the simple outputs.

There is no shortcuts. I don't using multimeter but digital oscilloscope.
LCD isn't damaged, already explained that everything is working on breadboard additionally I have around 100 of these LCD's.

Problem is with schematic as it isn't first board and as I explained PCB is cut on CNC which we're using to cut much more complex things.

PCB is exact copy of designed board, there is 5.1V on Arduino.

If you would check schematic you would see if GND is connected to power supply.

Please check schematic as there is a problem.

Hi, I suggest you get yourself a multimeter, this will help you identify components, measure them, and TRACE TRACKS on your PCB.
Especially if you are checking ground tracks.
Just because it is CNC cut does not mean you don't have cracked tracks.

You need to check each power and ground connection for a start, WITHOUT any components fitted.
There is no fast way to find the problem, only systematic testing of schematic verses PCB.
The PCB does not appear to be that complicated do a DMM check should not take long.

What level of electronics do you have and have you done any trouble shooting before, we are here to help an offer suggestions to your dilemma.

Tom...... :slight_smile:
(PS: What you are about to do, troubleshooting, is probably what a significant proportion of forum members do for a living and or fun.)

Your circuit shows R/~W connected to Enable on the LCD which certainly may cause a "race" problem and may be critical. It should go to ground.

I am curious as to what sort of keyboard you are using with connections to both 5V and ground.

The opto-coupler appears to be superfluous - you are not isolating the output circuit from your power supply, so it isn't really providing any "isolation".

Of course that I have multimeter, I have everything what I need to work with it (actually whole wall of equipment and components), I checked tracks for any shortcut to ground. So far I discovered that on schematic potentiometer is connected from both sides to +5V, wrong 10kOhm instead 1kOHm pin-base.

So far no luck with identifying problem with LCD. As far as I can see it is exact copy of what I have on breadboard and according to this schematic:

Optocoupler has to isolate output pins from transistor, so far it is working very nice and I'm happy with a noise which I got after I did that.

After I finish with this design, this will use normal 12V power supply so there is no way to provide real isolation of motors from power supply ,but like I said there is no noise at all after optocoupler were introduced (at least where I don't want to have noise).

In your first post you wrote the Output is not working at all. Did you mean the output to the display ? So the other Arduino outputs, for example to the optocoupler, are all working ? And the LCD is the only problem ?

Caltoa:
In your first post you wrote the Output is not working at all. Did you mean the output to the display ? So the other Arduino outputs, for example to the optocoupler, are all working ? And the LCD is the only problem ?

Extra output pin for tests as I have pretty big software in there,I had to make sure that it isn't that so I used just LCD and extra. LCD pins are working fine same with power supply and transistors.

I found few errors in schematic so I will try it Tomorrow.

Is this a double-sided PCB? If so, have you checked all your VIAs to ensure they are connected?

Ahem.

So where do you have the R/~W pin connected, on the breadboard and on the actual PCB?