DIY Arduino GND problem

Hi, I designed and machined Arduino simple board (just bringing Atmega pins to sides based on pin map of Arduino and burnt boot loader) and put components and tested by uploading blink sketch and connecting an LED.

As this worked I put Arduino to command my L293 driver pcb already made and tested. It worked with a pair of D13 and PWM9 for one channel, but the other channel with D8 and PWM10 failed.

I made various tests to find out why. Everything appeared working as expected except one thing: after loading my D13 with LOW, and measuring it with GND, I get nearly 0v (if exactly: 0.02v).

When I load D8 and some other Ds with LOW, I don't get that correct, but a big voltage every where as 0.27v. I changed my Atmega chip from 168 to 328 and got even 0.30v (don't mean 328 must give more, just that I don't get the right voltage).

Also, on some pins I get exactly 5.01v when loaded HIGH and on others like 4.90v. Before I thought that must not make any problem, but it happens that my L293 works only with those pins giving exact voltage :(

It is my first Arduino board and it means I still didn't finish a DIY Arduino I aimed for.

Could you please suggest why that different GND voltage happens, and guide with any solution?

The data sheet for the chip says that a low output can be anything up to 0.9V and a logic high can be anything over 4.2V. So I don't think you have to worry about that as a reason why your system won't work.

Thank you Mike!

If my L293 board you helped to finish works on both channels ok with one set of my Arduino pins as said above, and with the other set stops working, and that is exactly where that 0.27v difference is, how can I over come it please, any idea?

You need to find out if the change in voltage is a:- 1) Coincidence 2) The cause of the problem 3) A symptom of the real problem.

My money is on 1 or 3. If I were wiring this up I would swap the signals over and see if the problem followed the signals or stayed in the same place. I think you have a PCB but did you use sockets on the chips? If so you could bend one out of the way when you insert it and so it will not go in the socket. Then you can tag wires onto it and investigate the problem.

Mike I'm now setting up to make photos and post so you could see my first DIY Arduino ever! :D

Yes I used the socket and I did everything possible to not to fall in trivial errors, I tested every path with signal trace of my multimeter so it sound to my ears :D

These formulation nice and new to me: 1) Coincidence 2) The cause of the problem 3) A symptom of the real problem.

I doubt I understand the 1)Coincidence, could you explain a little please?

Boards:

DIY Arduino: http://i44.tinypic.com/24dpyqx.jpg

L293B: http://i43.tinypic.com/4r5oon.jpg http://i43.tinypic.com/1zf3gat.jpg

I am going to machine a separate board for Hex inverter.

These all are first test, after test I machine all on a single board for this edge detecting Arduino robot.

Right now I will exclude the Hex inverter and use those pins that didn't work and will report.

Any comment highly appreciated!

Those look very good, well done.

I doubt I understand the 1)Coincidence, could you explain a little please?

I mean that the signals are naturally of a slightly different voltage and those connected to the working part of the circuit happen to be the higher ones. But there is no causal link.

Grumpy_Mike: Those look very good, well done.

I doubt I understand the 1)Coincidence, could you explain a little please?

I mean that the signals are naturally of a slightly different voltage and those connected to the working part of the circuit happen to be the higher ones. But there is no causal link.

Thank you very much Mike I hope I'll do better someday,

You forgive me please I still can't understand, This is clear to me: "...that the signals are naturally of a slightly different voltage..."

Can't get its relation to this: "...and those connected to the working part of the circuit happen to be the higher ones. But there is no causal link."

(I read 5 times, may be again for not native English).

But there is no causal link.

It is just by random chance that you think you see a pattern. There is no cause / effect taking place. This means if you swapped over the wires , then it would be the low ones that stayed low and the high ones stay high and the working side and none working side would stay the same.

How about that?

ironbot: I made various tests to find out why. Everything appeared working as expected except one thing: after loading my D13 with LOW, and measuring it with GND, I get nearly 0v (if exactly: 0.02v).

When I load D8 and some other Ds with LOW, I don't get that correct, but a big voltage every where as 0.27v. I changed my Atmega chip from 168 to 328 and got even 0.30v (don't mean 328 must give more, just that I don't get the right voltage).

If the logic low level on D8 is as high as 0.27v or 0.30v, and you are certain that you have the output driven low (not PWM'd), then it suggests that the pin is having to sink a lot more current than the miniscule amount sourced by the L293. Suspect a short between D8 (and anything it is connected to) is connected to and somewhere else.

I would swap the connections from D8/D13 to the L293 board over as Mike suggested, to see which board the problem is on. Or disconnect the wire from D8 to the L293 board and measure the LOW voltage on D8 again.

Gentlemen I differentiated down, did a new experiment and carefully (as much as I can) documented it to learn something new from you:

  1. This is my first Arduino DIY and L293 boards, and first in life cnc machined pcbs: http://i44.tinypic.com/25gqpso.png
  2. I tested every single pin on L293, no flaw found and for this I made them as simple as possible, first step being enough complex for me.

  3. I, connected the Enable to +5 of Arduino, through breadboard(all addressed pins, as seen on pic above)

  4. ,got the ground from GND on Arduino to breadboard

  5. ,connected A and B to the breadboard GND

  6. ,as a test, disconnected A, motor on the right side went CW, did it B with connecting A back, got CCW.

  7. ,uploaded this simple sketch:

void setup()
{}

void loop()
{
  digitalWrite(8, LOW);//0.06v
  digitalWrite(6, LOW);//0.06v
  digitalWrite(3, LOW);//0.06v
  digitalWrite(12, LOW);//0.06v
  digitalWrite(13, LOW);//0.01v
  delay(5000);
}
  1. ,disconnected both A and B, the motor stayed in the stopped state
  2. ,connected A, to the GND of Arduino board, obviously motor began turning
  3. ,connected A to each of pins above, all LOW, but only with pin 13 motor started turning
  4. ,swapped A with B, tried 8 and 9 with B having A on the air, same result
  5. ,connected A to breadboard +5 coming from Arduino, repeated 8,9 and 10, exactly same results
  6. ,swapped L293 chip from socket, put a brand new one, same results!

My Conclusion: L293 says: I'm damn exact as Mathematics is! Feed me true GND if you want your robot to work!

...and then the magic happened...

I accidentally found out, that when I connect my servo motor signal pin( HITEC, HS-422) of the robot to any of the pins which didn't work as low before, then repeating experiment, the motor works as expected!

What Gurus suggest to get rid of this first step killing problem please? Will I solve this with pull-down resistors? :D (I will also make a new post to forum putting these two boards so Gurus kindly tell me the do / don't, so I make the next board better, Cheer Arduino!)

In that code you haven’t set the pin mode to output so all the
digitalWrite(8, LOW);//0.06v
instructions do is to disable the pull down resistor on those lines that are inputs.

Actually as I tried to explain, I connected wires to breadboard, fed with +5 and GND as needed, then got out the pin that must go to the LOW and by hand, touched those terminals from above, on the screws. That way I tested that if I get GND from pin 13, it works, from others, won't.

I found the solution: I extracted my Hex inverter from breadboard and soldered it to a board together with resistors for each of Enable and A, and B and the other side of each resistor to common GND.

Everything now works fine, it seems they are really needed, when it works with them and won't, without!

Anyway I still can't understand why such a small signal can make the difference!

Thank you for your best support, those nice suggestions put me to new experiments and I really appreciate it.