This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ST1000 embedded TinyPilot - Projectlog & Questions
#2
Non isolated connection is not advisable due to electrical perturbations and potential grounds offset ; galvanic isolation is to be considered between arduino and pi. Sean is quite clear about that and it is with good reasons ; please do not cut corners.


Several solutions can be considered upon your needs :
  - isolated USB : insert a USB isolator (USB isolator from ADAFRUIT for example) between the arduino and the pi; the arduino can be powered by the isolator (you can disconnect Vin on the arduino). Simple but might be overkill (and expensive) though as the arduino/pi communication is serial at 38400 bauds. 
  - pair of opto-couplers between pi serial (GPIO pins 8 & 10) and the arduino serial (D0 & D1)
  - in case of a long distance (several meters) between the arduino and the pi (OK, it is not your case), consider using RS485 that provides industry grade communication. Isolation can be achieved for example through a MAXIM1480 and little set of side components. Being half-duplex, this solution requires TX driver control that can be either hardware (an oscillator such as a 555 adjusted to serial speed) or arduino and pi GPIO control. The later is easily implemented. Sean's code is fully compatible with the approach.

Considering the system integration described, a pair of opto-couplers would certainly be adequate and can take care of level conversion (3.3V-5V). Simple and not very expensive. Opto couplers implementation can be derived from the many break-out example given (Sparkfun, Adafruit, ...) and references. Stable and robust communication can be provided through darlington opto such as 2731 w/o the need for extra transistors and resistors that otherwise appears in some designs ; they are more expensive though.

Important note: the arduino Nano implements the D0 & D1 hardware serial to the on-board FT232RL through 1K line resistors (similar to Uno), you can then  use serial TTL  on D0 & D1 at the condition to not use the USB at the same time...

Regarding the schematics:
  - Please, consider inserting a fuse between the battery and your circuit
  - Not sure to understand how is connected the 12/5V power supply ; would expected it to be connected to V+ and V- ; is it a step down converter or something based on linear circuitry ?
  - Not sure to understand how the motor controller is connected to the battery, would expect Vin to be connected to battery +
  - Not sure to understand how the current shunt is implemented ; would expect it to be between V1- and motor controller GND (Sean's code is setting the arduino 328p A/D converters to 1.1V internal ref)
  - Battery potential resistor divider (560ohm & 1k) should be between battery V+ and V- with 560ohm on V- side
  - Rudder sensor does not appear ; it is not fundamental but might be worth to consider as it is taken into account in Sean's code
  - Unused arduino digital and analog input pins should be grounded
  - Your design does not show a clutch command (unless you are considering using the third unused channel of a reprogrammed ESC which is Sean's approach) ; should you need one you may want to to drive it through a digital pin followed by a MOSFET (IRLB8721 N-channel hexfet for example) with its companion resistors arduino-Gate (100ohm) and Gate-Source (10k) ; can drive several amps w/o dissipator
  - It might a good idea to insert a current limitation resistor in serie with you PilotEngaged LED ; LED require few mA, a 1K will do and will protect your arduino digital output (20mA continuous max per digital output).

Have fun,

Regards,

Damien Sailing
Reply


Messages In This Thread
RE: ST1000 embedded TinyPilot - Projectlog & Questions - by damien - 2019-03-17, 12:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)