Home made gauges : Interfacing tutorial

Поділитися
Вставка
  • Опубліковано 29 сер 2017
  • (Sorry for my English …)
    After the last video concerning my home-made gauges, I've had many requests for tutorials and code sharing. Unfortunately, my code is related with other parts of my cockpit (lua scripts, sioc …) and it would be quite complicated to extract only Arduino related parts.
    So, I’ve decided to make this short video with some very basic examples of wiring and programming which could be used for a flaps indicator gauge.
    Arduino libraries used in this tutorial are AccelStepper (for stepper motor control), Wire (for I2C communication between two cards) and OACSP (link FS or P3D with Arduino).
    Sketches, libraries links and components references are available here :
    laap.atc.free.fr/download/YT_H...
    I hope this will help everyone who try to interface Arduino boards with FS or P3D.
    Thanks to all for your mails and your comments :-)
  • Наука та технологія

КОМЕНТАРІ • 45

  • @caherna
    @caherna 6 років тому +2

    Thank you so much Frederic!
    Your explanation is clear & complete. I've used to program in C# (mixing SimConnect + FSUIPC) as interface between FSX and Arduino, but after this I'm considering to switch to Command Gateway (LUA).
    Thumbs up, my friend!

  • @capt_Iceman
    @capt_Iceman 6 років тому +2

    I am really impressed with your videos. Good job and thanks for sharing!!! Inspiring work indeed! I was looking to build an HSI as there is none. Need to dig more into it...

    • @Frederic_320
      @Frederic_320  6 років тому +1

      Thank you :-) I'd be interested in your experiments for HSI if you work on it because I've no idea on how to realize the mechanical parts ... Hope to read you if you succeed, good luck !

  • @shameemevans4413
    @shameemevans4413 3 роки тому

    Super stuff....We need an XPlane tutorial on this....

  • @konturgestalter
    @konturgestalter 6 років тому +2

    pleeeaaaase continue these fantastic videos

    • @Frederic_320
      @Frederic_320  6 років тому

      I'll try :-) Thanks for your enthusiastic comment !

  • @Chris-xh4hw
    @Chris-xh4hw 6 років тому

    Well done ,explained very well

  • @charlysix
    @charlysix 3 роки тому

    Quel talent ! 👏🏻
    La qualité des vidéos et surtout le soin apporté à la construction et la programmation ! Top 👌🏻
    Je débute en arduino et suis tout heureux quand j’arrive à interfacer des afficheurs 7 segments et des encodeurs avec mobiflight.... Très loin encore de coder moi-même la communication FSUIPC en Lua ! Mais je crois ne pas pouvoir y échapper pour la calibration du point zéro des steppers...
    Merci pour le partage des idées et bonne continuation.

    • @Frederic_320
      @Frederic_320  3 роки тому +1

      Bonjour ami francophone et merci pour ton message ! Content que tu puisses trouver dans cette vidéo quelques pistes, même si aujourd'hui je ne procède plus exactement à fait de la même manière côté LUA. Mobiflight est une super interface d'après ce que j'ai entendu, mais effectivement certaines manips un peu spécifiques semblent poser quelques problèmes. En tous cas je te souhaite toute la réussite possible dans tes interfaces, n'hésite pas à prendre contact par mail si besoin, bon courage et à bientôt peut-être !

  • @SeamusMcNeil
    @SeamusMcNeil 7 років тому

    Fantastic ;) Been so wanting this video - Thanks so much

    • @Frederic_320
      @Frederic_320  7 років тому +1

      Thanks for your comment, happy to know it helps :-)

  • @UlrichSaukel
    @UlrichSaukel 6 років тому +1

    Elles sont au top tes vidéos. Cela m' aide beaucoup! Merci

    • @Frederic_320
      @Frederic_320  6 років тому

      Ah, enfin un ami français ! Merci, content que les vidéos te plaisent :-)

    • @UlrichSaukel
      @UlrichSaukel 6 років тому +1

      Oh Le nul! excuses moi, non elle m'aide beaucoup!! ahaha ... C'est moi qui n'ai pas relu!! j'ai ecris de mon téléphone avec l'auto correction!! lol elles sont TRES UTILES!! J''ai regardé toute ta série et elles m'aident sérieusement à comprendre, j;aime surtout ic2 avec les 2 nanos ça c'est excellent. Je suis en train de faire un cockpit de TBM850 sur Prepar3D , je fais morceaux par morceaux.

    • @Frederic_320
      @Frederic_320  6 років тому +2

      Pas de problème, mon côté autosatisfaction m'avait fait penser que c'était peut-être une erreur ;-) Je suis rassuré !
      Bon courage pour ton TBM, les turboprops ce n'est pas trop mon domaine mais un ami qui fait un simu de B200 m'a bien obligé à mettre le pied à l'étrier ! D'où les gauges ...
      Si besoin n'hésite pas, je suis très loin d'être un pro mais si je peux partager quelques petites connaissances, ce sera avec plaisir. Bonne continuation à toi !
      Frédéric
      PS : les cartes qui communiquent par I2C, j'adore aussi :-)

  • @jpkdds
    @jpkdds 6 років тому

    Easy to read and understand as a beginner. Thanks!

  • @alexboon
    @alexboon 5 років тому

    Thanks!!!!

  • @hobbyelectronics6630
    @hobbyelectronics6630 6 років тому

    That A320 cockpit look incredible. Could you do a video on how that works and interfaces ?

    • @Frederic_320
      @Frederic_320  6 років тому +1

      Thanks you. The first part (glareshield, MIP and pedestal) was interfaced using opencockpits cards and was programmed in Sioc. Overhead is Arduino based : one master connected to P3D via USB + one Arduino for each panel. Slaves are communicating with master using I2C protocol. Master reads and writes FSUIPC offsets with OACSP library and command gateway (Open Airbus Cockpit Serial Protocol). 2 PC are required : one for P3D and a second one with 5 screens : PFD+ND x2, SD+E/WD and MCDU x2. I'm using Jeehell FMGS for Airbus systems.

  • @hashimiqbal6822
    @hashimiqbal6822 5 років тому

    could soneone help me please. If i wanted to make a simple heading bug what would I connect with what and how would I do the coding. Is it a must or is their a way I can skip it

  • @jasonshaw8094
    @jasonshaw8094 6 років тому

    great vids by the way...and your english is fine... i wanted to ask if you could supply a full set of colour 2d printed paper dial face-plates please with dimentions/measurements, i have a lack of software skills and tiny budget, please help

    • @jasonshaw8094
      @jasonshaw8094 6 років тому

      forgot to say, i need cessna 172

    • @Frederic_320
      @Frederic_320  6 років тому +2

      Hi Jason,
      I can't provide the C172 gauges because I didn't designed them. But if it can helps, here are the prints for the B200 shown in the video : laap.atc.free.fr/download/YT_Gauges_Prints.pdf
      They are scaled 1:1, just print them at 100% for dimensions. Crosses are 60x60mm spaced, just to check ...
      Thanks for your comment, and good luck for your C172 !

  • @FlightSim2703
    @FlightSim2703 5 років тому +2

    Awesome video, but which simulator? And how is the connection to software? Please provide video #2 thanks 👍

    • @Frederic_320
      @Frederic_320  5 років тому +1

      Hi Brian, the simulator is Prepar3D. Sorry but I don't understand your question about the connection to software, please could you be a little more specific ? Nice Cessna you have !

    • @FlightSim2703
      @FlightSim2703 5 років тому +1

      Is the arduino connected per UDP ? Is any codes or script loaded to simulator software? If yes please what is the path, thanks very much. Regards

    • @Frederic_320
      @Frederic_320  5 років тому +2

      The "Master" arduino is connected to PC via USB, "Slaves" communicates with master using I2C protocol.
      There is a script loaded in P3D (a lua script : the OACSP gateway) which makes the link between P3D (registered FSUIPC required) and Arduino. That's what I'm showing here :
      ua-cam.com/video/WNm6UHQKQuI/v-deo.html
      I briefly explain how P3D communicates with Arduinos in the first video, don't know if you've seen it :
      ua-cam.com/video/0ZGsVqkuqw0/v-deo.html
      There's nothing else than what I show in these 2 vids.
      You can also try another approach (more user friendly) to make Arduinos communicate with P3D. Perhaps you know MobiFlight software ?
      www.mobiflight.com/en/index.html
      Hope this will help, and good luck with your Cessna !

    • @gkkes
      @gkkes 4 роки тому

      @@Frederic_320 For xplane11 users see SimVin. Thanks for all the great tips Frederic

  • @jetraid
    @jetraid 7 років тому

    Excelent explanation. Very cool project. I have a doubt about real airplane gauges... some gauges move faster than others, I don't know who is the fastest (maybe vertical speed?), but can the stepper motor you use archieve the maximun velocity needed for the fastest gauge?

    • @Frederic_320
      @Frederic_320  7 років тому +2

      Hi Javier. You're right, the stepper I've used is very limited and the speed in the video is nearly the maximum one. For most of gauges it's ok, but for a RPM one or a V/S, it should not be enough. More powerfull steppers will have a higher speed, but are too large to fit in a gauge. I've seen some videos for converting this little unipolar stepper to a bipolar one (www.jangeox.be/2013/10/stepper-motor-28byj-48_25.html). I didn't tried yet, it seems to increase torque but what about the speed ?... So it's a possible upgrade (need to change the driver too). Another solution would be to change teeth wheels inside for a lower reduction ratio as I don't need a high precision. I would also be interested in testing a CD or DVD player motor, they are very small and seem to have a fast rotation : ua-cam.com/video/cwwYBgH-w8A/v-deo.html
      For slower gauges, no problem, speed can be reduced and acceleration parameter can be used for smoother moves.
      Thanks for your comment, if you have any suggestion you're welcome !

    • @jetraid
      @jetraid 7 років тому

      I thought about the CDROM motors too, I have to test it.

    • @Frederic_320
      @Frederic_320  7 років тому +3

      Just tested the CDROM stepper with a L298N, it seems to work very fine :-) I'm going to try with a 8825 driver which is very small. After that, I'll have some tests with 7mm micro steppers : fr.aliexpress.com/wholesale?SearchText=7mm+stepper+4+phases
      Never had to work with this kind of motor, but the price make it perfect for experiments !

    • @jetraid
      @jetraid 7 років тому

      I see the aliexpress page, no info about angle/step

    • @Frederic_320
      @Frederic_320  7 років тому +1

      Probably 18°, will need to work with 1/8 or 1/16 step resolution.
      Tried the drv8825 but it's not a good idea for the CD stepper as its range for motor voltage is 8-45V (stepper seems to be 5V). It works with 12V and a very low current limit, but I think it's not the appropriate driver. Would need a drv8834 instead (range is 2.5-10.8V) but I don't have that model at home.

  • @hornos27hotmailcom
    @hornos27hotmailcom 4 роки тому

    Congratulations, good video and very instructive, it seems very easy but it is not, do you also work with XPLANE11?
    felicidades, buen video y muy instructivo, parece muy facil pero no lo es, usted tambien trabaja con XPLANE11 ??
    Félicitations, bonne vidéo et très instructive, cela semble très facile mais ce n'est pas le cas, travaillez-vous également avec XPLANE11?

    • @Frederic_320
      @Frederic_320  4 роки тому

      Thank you :-) Sorry, I'm not working with XPlane, only with FsX and P3D. I don't use the OACSP gateway anymore as it's easy (perhaps it's not ?!...) to interface directly with FSUIPC LUA interpreter. If I can help, feel free to write me by mail.
      Regards,
      Frederic

    • @hornos27hotmailcom
      @hornos27hotmailcom 4 роки тому

      @@Frederic_320 thanks you.

  • @RoamingAdhocrat
    @RoamingAdhocrat 6 років тому

    Great video! I think most of your code comments are redundant though. If you write `foo += 5;` you don't need to add `// add 5 to foo` ;)

    • @RoamingAdhocrat
      @RoamingAdhocrat 6 років тому

      But comments explaining that 2048 is the number of steps per revolution are _very_ relevant.

    • @RoamingAdhocrat
      @RoamingAdhocrat 6 років тому

      Continuing my unsolicited code-review, why not map the FSUIPC output from 0..16538 to the step position on the primary Arduino?

    • @Frederic_320
      @Frederic_320  6 років тому

      Thank you for your comment, I agree :-) I just did that for some users who possibly see an Arduino sketch for the first time. foo+=5 is perhaps not understandable for a beginner who makes its first attempt with Arduino. But you're right, "gauge.setSpeed(500)" don't really need to be commented !
      Concerning my code, in that simple case, it would be better to map FSUIPC output on the primary arduino as you suggested. I'm used to send raw data to slaves (I decided that "standard" for my whole A320 panels) because in my mind, master sends a data and slave treat it. When I have many slaves, it's more simple for me to treat values on each slave than making long code and calculations on master. But it's only a personal choice ... and I'm very far from being a good programmer ! Perhaps code would be more optimized making more calculation on master and sending less data via I2C, I don't really know.

  • @SOUZAELS
    @SOUZAELS 6 років тому

    amazing...there is a software, i dont know if you see yeat, but for me is amazing....MOBIFLIGHT....take a look and enjoy.

    • @Frederic_320
      @Frederic_320  6 років тому +1

      Yes, I've had some (successful) tests with Mobiflight but finally I've decided to program by myself, easier to link with other parts managed using sioc or lua scripts. Thanks for your comment (nice altimeter you have !)