2018-09-11, 08:12 PM
the arduino is 5v ,, pi is 3.3v take that into consideration before connecting the two together..
using pi gpio outputs / pins arduino
|
2018-09-11, 08:12 PM
the arduino is 5v ,, pi is 3.3v take that into consideration before connecting the two together..
2018-09-11, 08:34 PM
(2018-09-11, 08:12 PM)jim321 Wrote: the arduino is 5v ,, pi is 3.3v take that into consideration before connecting the two together.. Yep. I changed from trying to use only Raspberry to use the Arduino as motorcontroller, like Sean, thats why i also changed the topic a bit. It has a couple of advantages as allready discussed a couple of times... So i'm not connecting them together (other than via the normal USB, which obviously works fine).
2018-09-13, 04:16 PM
sorry for the delay.
Yes, pulling pin 6 on the arduino low should enable h-bridge mode. Then pins 2,3,9,10 should work to drive the 4 mosfets in a bridge. Otherwise, pin 9 should output rc pwm. So you might want to test pin 9 on your scope, and move in both directions. There are some other issues as well. If the controller detects over temperature on either the motor or controller it will not drive. You should see this flag in the control program. If you do not have temperature sensors, you should connect the pins A2 and A3 to vcc (not ground) to give it the lowest possible temperature reading so it won't fault. I should modify the code to detect if there are no temp sensors automatically so you dont need to do this in the future, but have not yet. For now easiest to just wire to vcc, or hack the TakeTemp function and return 0 or something. For 10 cents I use a NTC thermistor. You may also connect A4 to gnd or vcc to disable rudder feedback. It may float out of range normally but it's better to set it. If you do not have voltage input, you might also have problems with the latest code. The controller shuts down below 6v or above 18v unless it detects it is a 24v capable controller (pin 12 grounded) You can also hack the TakeTemp and TakeVolts functions to hard code readings rather than return what is measured to avoid changing the hardware. Disabling all this detection could potentially damage things. You need a way to detect end of travel, either current sense, end of travel switches, or rudder feedback. Preferably you have more than one of these. Be sure not to connect pin 7 or 8 to ground. These are end of travel stop switches and will disable movement as well.
2018-09-14, 04:46 PM
HI Sean,
Thanks for coming back back on this. I'm builded a lab for testing. I have the temperature readings as well the voltage and current metering in place. It all works fine and the result is promising. It gives the correct temperature, current and voltage in OpenPlotter Autopilot control. The ruddersense also works, if i ground them the display gives them as fault. So far, so good. I'm still left with a smal problem: reverse works, fwd not. If i pull the compass to the right it goes in reverse and gives the right signalling etc. If idle and/or pulled left it says FWD_FAULT. (So that's not caused by the ruddersense) Any idea? (or is this because i don't have a compass installed yet -> is there a way to trick this?)
2018-09-15, 08:50 AM
(2018-09-14, 04:46 PM)nvelthuijsen Wrote: HI Sean, Do you use a ruddersensor in your setup? In that case have a look at min and max rudder position settings in client menu. One side positive and the other negative.
2018-09-15, 02:26 PM
(2018-09-14, 04:46 PM)nvelthuijsen Wrote: I'm still left with a smal problem: reverse works, fwd not. If i pull the compass to the right it goes in reverse and gives the right signalling etc. If idle and/or pulled left it says FWD_FAULT. (So that's not caused by the ruddersense) FWD_FAULT, REV_FAULT - means overcurrent is exceeded Check max current FWD_FAULTPIN, REV_FAULTPIN - end of travel switch prevents travel in that direction MIN_RUDDER, MAX_RUDDER - rudder feedback prevents travel It looks like you are hitting overcurrent. What is the max_current set to? You might set the max_slew_speed to a low value (10 or less) to prevent current spikes at startup. Try plotting the servo.current using the scope. It will react to max_current faster than it can plot it though.
2018-09-16, 09:43 PM
(2018-09-15, 02:26 PM)seandepagnier Wrote:(2018-09-14, 04:46 PM)nvelthuijsen Wrote: I'm still left with a smal problem: reverse works, fwd not. If i pull the compass to the right it goes in reverse and gives the right signalling etc. If idle and/or pulled left it says FWD_FAULT. (So that's not caused by the ruddersense) I made a test setup on a breadboard. Current is fixed 4.33A, Voltage fixed 10V. Reverse works ok, no warnings. In idle and when trying forward servo.flag says sync fwd_fault. Fwd does not work..... I feel I am nearly there..... ideas?
2018-09-16, 10:36 PM
what do you mean current is fixed? voltage is fixed? How are they fixed?
If over current is detected, it allows twice the max current in the other direction to correct it. This is because many tiller pilots get stuck at the end and otherwise would trigger a current fault to move back again. If you see FWD_FAULT, it means that overcurrent was detected moving forward. What is servo.max_current set to?
2018-09-17, 02:32 PM
(This post was last modified: 2018-09-17, 06:32 PM by nvelthuijsen.)
(2018-09-16, 10:36 PM)seandepagnier Wrote: what do you mean current is fixed? voltage is fixed? How are they fixed? For testing purposes i created a voltage-measurement on ADC pin 0 and current-measurement on ADC pin 1. That gives the readings as mentioned and works fine. servo.max_current is set to 20. The Arduino UNO lacks ADC pin 6.... (so no rudder sense, might be the problem).... i ordered a couple of nano's instead. I wil post the results. I included some pictures of the setup. https://drive.google.com/drive/folders/1...sp=sharing
2018-09-19, 07:48 AM
Update: Nano instead of UNO fixed the last issues. In my shared folder is the setup.
|
« Next Oldest | Next Newest »
|