I am not yet sure if this is possible, but I was wondering if I can remove the USB cable and go for a more solid connection between the pi and the arduino.
So, my question is, will the motor.ino and pypilot still work when connecting them both through txd / rxd pins? Or does it only work with USB.
I've tried it before, and have set the serial port accordingly in op, but it didn't work then. Tried looking for documentation and see that UART is mentioned, but usually I see that most people use the USB connection.
Looking for some confirmation of some working examples without USB.
Thanks in advance.
(2020-04-25, 11:08 AM)jamos.tan@gmail.com Wrote: [ -> ]I am not yet sure if this is possible, but I was wondering if I can remove the USB cable and go for a more solid connection between the pi and the arduino.
So, my question is, will the motor.ino and pypilot still work when connecting them both through txd / rxd pins? Or does it only work with USB.
I've tried it before, and have set the serial port accordingly in op, but it didn't work then. Tried looking for documentation and see that UART is mentioned, but usually I see that most people use the USB connection.
Looking for some confirmation of some working examples without USB.
Thanks in advance.
I have Tynipilot runnig without usb .... an arduino mini pro ... rx tx and common ground to the pi zero.
RX of the Pi goes direct to TX of te arduino and vice versa.
Take care that this only is ok if your arduino mini pro is 3.3 v if you use the 5v o e you might need an power diverter like explained from IRONMAN further down
Greetings
Andreas
Thanks! That pcb looks great btw.
(2020-04-25, 11:08 AM)jamos.tan@gmail.com Wrote: [ -> ]Looking for some confirmation of some working examples without USB.
If you don't care about isolation you can simply tie the Pi's TxD output to the arduino's RxD, and tie the arduino's TxD to the pi's Rxd
with a simple voltage divider. Remember the pi i/o is 3.3 Volts and the arduino's i/o is 5 volts based. I have this and it works - so far.
Great work!
I did try a few isolation parts and settled on cpc5001 because it worked well and the other parts I tried did not work. I did try a few rf modulated but the higher data rates are also not needed. Now that my quantities are higher, paying $2.50 for each cpc5001 is a lot and I'm going to try other parts (cost 30 cents for each direction) and also use much less power. The si8621 if it works is a great choice, but it also uses 2-3 milliamps correct?
(2020-05-05, 05:53 PM)seandepagnier Wrote: [ -> ]The si8621 if it works is a great choice, but it also uses 2-3 milliamps correct?
Yeah. My reading of the CPC5001 and Si8621 say they both draw between 2-5mA, with the Si8621 using somewhat less.
I have this board for isolation:
https://www.sparkfun.com/products/9118
I've connected it, and tested the input and outputs, and properly converts the 3v 5v range.
Only thing is, Pypilot does not talk to it and does not report the Sync status.
So, I've checked the baudrate of the opto board and it is maximum 9600.
So in the motor.ino sketch there is a line "Serial.begin" which has the value 38400.
Should I decrease the motor.ino baudrate to 9600?
I've also tested changing the txd rxd wires.
(2020-10-05, 12:31 PM)jamos.tan@gmail.com Wrote: [ -> ]I have this board for isolation: https://www.sparkfun.com/products/9118
So, I've checked the baudrate of the opto board and it is maximum 9600.
I think optoisolator chips like that are ok for isolation of control signals, but too slow for communications. As mentioned above, I've used the Si8621 with no problems.