I have attached my revised Arduino/Funduino board schematic. I have a number of servos attached to the Funduino as per the diagram, I use a 5vdc power supply and the servos are activated by the various switches putting (or removing) 5vdc on the switch pin.
As a result of a previous discussion here, I have overhauled all the wiring and ensured that all connections are tight, secure and correct voltages being supplied. All was well when I powered up the first time, now with no changes at all powering up on subsequent occasions results in servos activating and turning to the maximum possible position and staying there.
This has been observed even with out the ATMega328P chip being mounted.
I am at a loss to determine why and I don't even know where to start with investigating, some help would be appreciated
Not knowing ANYTHING about your project but the information you provide, we prefer to simply have EVERYTHING.
You don't know what causes the problem, so you don't know what's relevant or not. Neither do I without actually having the information.
In your case it sounds like the first step is to try and figure out what is supposed to happen to those servos when they're powered up with their signal line floating.
I am still unclear as to what more I can provide, the schematic is complete showing the wiring from the original 12vdc via a 5vdc regulator to power the board and to provide the signal power to activate the servo. The servo drives a model railway semaphore signal.
As you can see there is a 10k resisitor on the servo line which (I am told) prevents the signal line from floating and was recommended to prevent power up 'kicks'. There is a similar 10k on the line to the switch pin to keep it grounded when no input is present. Both of these items were added at the suggestion of advisors on this forum and the code was similarly checked and suggestions made by forum members.
The signal line diode prevents spurious residual voltages from affecting the LEDs which was happening before the diode was added.
What diagnostics can I perform and supply to you that would help?
Please bear in mind I'm not an electronics expert by any means
What do the servo's do if you power them up, not connected to the arduino and without the 10k resistor? Also, verify which servo wire is +V and which is signal, your diagram shows the resistor in the red wire, which I would take to be the +v line.
rynd2it:
So the 10k resistor is connecting the +v and the Signal
I wonder what a servo will (or is supposed to) make of a semi-permanent high on the signal, that is a veeeeeerrrrryyyyy long positioning pulse until the controller takes over and makes it go high and low as it should?
meltDown:
I wonder what a servo will (or is supposed to) make of a semi-permanent high on the signal, that is a veeeeeerrrrryyyyy long positioning pulse until the controller takes over and makes it go high and low as it should?
I was told it was to prevent the servo moving until a valid signal was received - are you saying that's not the case? I hope not as all those 10k resisitors are now soldered into the wires and I'd hate to have to undo all 16 of them.
rynd2it:
How would I find out what is and is not required? There are no electrical specs on the servo that I can find
As mentioned, try it out and see.
Take a servo with no resistor and apply power. What does it do?
Take a servo with a resistor from the signal line to v+ and apply power. What does it do?
Take a servo with a resistor from the signal line to ground and apply power. What does it do?
vinceherman:
As mentioned, try it out and see.
Take a servo with no resistor and apply power. What does it do?
Take a servo with a resistor from the signal line to v+ and apply power. What does it do?
Take a servo with a resistor from the signal line to ground and apply power. What does it do?
That I can do, I was looking for some input in possible signal readings, current draw etc
Active signal: connect your scope; you will see regular 1500-2500 µs high level pulses, most of the time the signal level is low.
Current draw: connect your multimeter in current mode, see what it gives. Should be near zero for the signal line; significant current for the power lines (see data sheet for what to expect).
wvmarle:
Active signal: connect your scope; you will see regular 1500-2500 µs high level pulses, most of the time the signal level is low.
Current draw: connect your multimeter in current mode, see what it gives. Should be near zero for the signal line; significant current for the power lines (see data sheet for what to expect).
First off, the servo with no resistors turns on power-up to what appears to be an initial position - this varies with individual servos (or at least appears to)
Adding the 10k resistor between Gnd and Signal has no effect
Adding the 10k resistor between +V and Gnd prevents the initial movement on power up
All of the above carried out on my test rig with one servo.
However, on the actual model railway where one board has 7 servos the results are different, some servos move on power-up others don't. In an attempt to discover why I set up a new test rig with a new Funduino board, no resistors and a simple 12vdc power supply - here is what i saw.
With no chip (ATMega328p) in the board I placed a meter between Gnd and Signal and all Digital Pins numbers 3 - 12 had no reading = 0
With my programmed chip plugged in (see above for the code) no servos connected and no resistors, I saw this
Digital Pin No. Signal
3 0
4 5v
5 5v
6 0
7 0
8 0
9 0
10 5v
Clearly, something is going on where pins 4 & 5 are high at all times and this appears to be causing my servos to turn on power-up and jam against their stops.
To further test this I plugged a servo into pin 5 and energised it and it moved according to the program but I observed that the 'L' light on the ATMega (next to the PWR light) came on - but not on any other pin.
I am now very confused and would appreciate any insight that you guys can provide
Many thanks
David
p.s. I did not design or even wire the original set-up, I inherited it so my knowledge of why things were done in a certain way is limited. I am simply trying to get it to work