hello everybody

I have one problem with MRL and servos

I did everything correctly to move and control my servo with MRL but it is not possible , the Arduino is connected correcly and it is working just the servo didn`t move.

also I used this link and i recieved answer the same:   https://www.youtube.com/watch?v=AJasOtkCbro

any one had the same problem???????

beetlejuice

8 years 9 months ago

Hello Nadia,

Are you sure your servo is wired correctly ?

The better thing for help us to help you is to send a no-worky . Do the same thing you did, try to move the servo, and send a no-worky .

Here is how to do :

No-Worky !

If you have used MRL, you have found parts that don't work.  These are "No-Worky" parts!  In order to help you or make a better MRL, it is often necessary to send a log file to our Crack-Dev Team.
This can be done by pressing  Help -> About -> Help, it "no-worky"!

Its helpful if you make a post on myrobotlab.org (Create Content -> Blog) which describes the issue you are having.  With this information we will do our best to assist you.

 

Hi Nadia,

 Many servos require more power than is available via a normal USB port.  How do you have the servo connected?  power and ground should be connected to an external 5V (or more depending on the servo spec) power supply.  The ground on the power supply needs to be connected to the ground on the arduino board.  And finally, the control pin of the servo should be connected to one of the digital PWM enabled pins on the arduino.  (pin 8 for example)

  Not sure if that is the issue.  As beetlejuice mentions in the previous comment, feel free to send a "no worky" so we can take a look at the error messages in the log files.

Good luck!

  -Kevin

GroG

8 years 9 months ago

Welcome Nadia !

When you reload the Arduino with a Arduino example Servo swing sketch, does it move ?

Its a good strategy to divide your problem and conquer it ... for example .. is it a hardware or software problem ?   If you change the software to a different Arduino sketch and it still does not work its probably a hardware problem.  Possibly too little power, wrong wiring, etc...

If it does work - then it might be a software problem and a no worky would help ! 

 

I checked the servo with others software and it is working perfectly with the same boared 

and it has problem with MRL

I will try to send no-worky now

nadia

8 years 9 months ago

the main problem is when i connect servo to the arduino board ,

the moment that i connect power to servo , MRL get disconnect from arduino

kwatters

8 years 9 months ago

In reply to by nadia

Hi Nadia,
  you're no-worky  (myrobotlab.log) file shows that the port is in use.  This likely happens because there's another process holding onto the com port.  When you shut down MyRobotLab, it's possible that the java process might not exit.  So, you should probably go into task manager and kill and "java" processes that might be hanging around.  (Or maybe the arduino IDE is open and connected to the com port.)

Also,  I noticed in the myrobotlab.log file that you're using the 32bit version of java, but you have a 64bit operating system.  This is known to cause a lot of problems.  You should install the 64bit version of Java, and after you have 64bit java installed, you should re-download & install all the services in myrobotlab.


-----------------From the MyRobotLab Log file ----------------------

26003 [python.interpreter.3] ERROR class org.myrobotlab.logging.Logging  - ------
java.io.IOException: gnu.io.PortInUseException: Unknown Application
	at org.myrobotlab.serial.PortRXTX.open(PortRXTX.java:164)
	at org.myrobotlab.service.Serial.connectPort(Serial.java:382)
	at org.myrobotlab.service.Serial.connect(Serial.java:335)
	at org.myrobotlab.service.Serial.connect(Serial.java:277)
	at org.myrobotlab.service.Arduino.connect(Arduino.java:350)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
	at org.python.core.PyObject.__call__(PyObject.java:404)
	at org.python.core.PyObject.__call__(PyObject.java:408)
	at org.python.core.PyMethod.__call__(PyMethod.java:124)
	at org.python.pycode._pyx3.f$0(<string>:27)
	at org.python.pycode._pyx3.call_function(<string>)
	at org.python.core.PyTableCode.call(PyTableCode.java:165)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1261)
	at org.python.core.Py.exec(Py.java:1305)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
	at org.myrobotlab.service.Python$PIThread.run(Python.java:149)
Caused by: gnu.io.PortInUseException: Unknown Application
	at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:474)
	at org.myrobotlab.serial.PortRXTX.open(PortRXTX.java:153)
	... 21 more
------

nadia

8 years 9 months ago

I did all you said and now i`m working with java 64

but i still have the same problem

when i use 3.3V pin , i don`t get any error from MRL but the power is not enough to move servo 

but when i connect it to 5V under MRL it writes " error in writebyte" and it is disconnected

and when i test servo with the same board with Arduino Software , it is working good

 

kwatters

8 years 9 months ago

In reply to by nadia

You can not power a servo off of the arduino.  you need a separate power supply.

you should not be connecting the servo to the 5V pin on the arduino.  The servo needs it's own power.

likely what is happening :  The arduino power supply is not strong enough to power most servo motors.  You are getting the "error in writebyte" because the arduino is "browning out"  and going off line because it doesn't have enough current to drive both the arduino and the motor at the same time.

If you don't have a power supply handy, you could always just use a few batteries and power the servo off those..

 

I didn`t  undrestan you .

you mean , i can`t use the 5V when i connect one servo and use MRL????????

because when i connect the servo to 5V and program it with arduino software , it works good

why it is not working the same with MRL?????

 

nadia

8 years 9 months ago

hello guys

i used power source and my servo moved , the problem was that 

now i`m going to try right hand with several servos

thank you