OpenMarine
How to test servo / arduino separately - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: How to test servo / arduino separately (/showthread.php?tid=1885)



How to test servo / arduino separately - ironman - 2019-07-14

I have an arduino hooked up to a tinypilot and I'm getting telemetry readings. I'm planning to make an h-bridge so I hooked up digital pin 6 of the nano to ground. To see some virtual action, I tied some leds to digital pins 2, 3, 9 and 10. I'm trying to get this mock-up spinning, first trying the << and >> buttons in the autopilot ui, but the leds stay off. Then I try to set servo.command, but no cigar either. I don't have an imu yet.

So, in the context of a tinypilot image, how can I test the servo / arduino subsystem?

Thx,

-


RE: How to test servo / arduino separately - ironman - 2019-07-14

Persistence pays off! I reflashed the nano with DISABLE_VOLTAGE_SENSE and now my leds are working when I press << and >>. So now I can start building the h-bridge.

#define DISABLE_VOLTAGE_SENSE // if no voltage sense

I did not like 12V on my breadboard so had uncoupled the voltage sense wire. But it makes all the sense in the world to disable the motor when the voltage is too low or too high.


RE: How to test servo / arduino separately - seandepagnier - 2019-07-15

What is the problem with 12v on the board? The usual divider is 10k and 560 ohm which takes more than 90 volts before it would overvolt the adc. Maybe an issue with a breadboard if the lower resistor becomes disconnected?


RE: How to test servo / arduino separately - ironman - 2019-07-15

(2019-07-15, 02:47 PM)seandepagnier Wrote: What is the problem with 12v on the board?   The usual divider is 10k and 560 ohm which takes more than 90 volts before it would overvolt the adc.  Maybe an issue with a breadboard if the lower resistor becomes disconnected?

Oh sorry for being unclear. The voltage divider is in place and tested allright. In the permanent setup i will have the 12V lead properly connected; I just don't want to run the risk of the 12V jumper wire to fly off the breadboard and hit the arduino in the wrong spot. It's a matter of risk management during the prototyping phase.

I just dropped a construction light on my openplotter raspberry pi when I wanted to make a movie to share the process of building the pypilot. It killed the pi and and forced me to buy another osenc chart licence because that was tied to the hardware. I made a vow not to kill any more electronics unnecessarily ;-)

Cheers,

-


RE: How to test servo / arduino separately - Sailoog - 2019-07-18

ironman, we recommend to use the o-charts USB dongle to link your charts to it forever and do not waste money due to this issues.