Jump to content

Arduino EOS Helios basic Tutorial


Recommended Posts

EOS and Helios Tutorial

 

Update

I have only tested Arduino UNO AND Duemilanove boards with EOSV1. MEGAS will NOT work. Leonardos most likely will not work. Others...your on your own.

I believe that after testing an Arduino Duemilanove that all the 168/328 based boards should work fine as all the internals are the same.

 

Yesterday I noticed that Gadroc released the latest EOS libs and Helios to support them. I played around with it yesterday and noticed that the learning curve can be a bit steep for the uninitiated so I figured I would right a quick tutorial on how to get an Arduino Uno up and running with EOS and configured in Helios as the Electrical Control Panel for the A-10.

 

This tutorial will walk through all the steps required to get it up and controlling your A-10.

 

Requirements

  • Latest version of Helios
  • Latest EOSV1 Libraries
  • Arduino Uno and Arduino IDE. MEGAs will not work due to UARTS and EOS using low level serial control) ALL other boards are UNTESTED and expected to have issues
  • Minimum 1 toggle switch wired to pin2 and ground on your arduino.
  • Recomended 7 toggle switches each wired between pin [2,3,4,5,6,7,8] and ground on your arduino

 

Initial Setup

This Tutorial assumes you already have your arduino software setup and know how to download sketches to it. Basic Helios knowledge is assumed as there are better sources than me for the intricacies of setting it up. The attached sketch is verbosely documented which should allow you to understand whats going on.

 

This example assumes you have a clean export.lua in DCS with no extras installed there.

 

PLEASE do not deviate from this tutorial until after you have completed it and verified everything works.

 

  1. Ensure you have the latest Helios Installed
  2. Install the EOS libraries according to the included read me
  3. Download my attached sketch for the Arduino

 

Installing the Arduino Sketch

 

Clearing the EEPROM

Since EOS uses EEPROM to store config data its a good idea to make sure all the EEPROM space is in a known state.

  1. Open The arduino IDE
  2. go to File>Examples>EEPROM>eeprom_clear
  3. Upload and run this sketch on your arduino

 

Install the EOS_Digital_Input_Example sketch

  1. Open the Example sketch in your IDE
  2. Upload the sketch into your Arduino

You can close the Arduino IDE now as we are finished with it

 

HELIOS SETUP

There are 3 main steps here

  1. Configure DCS Interface
  2. Configure EOS Interface
  3. Bind our board inputs to the A-10

 

Add DCS Interface

  1. Open Helios Profile Editor
  2. Go to Profile > Add Interface
  3. Select DCS A10C and click Add
  4. You can leave the defaults
  5. Under A-10 Setup Ensure it says "Your DCS A-10C configuration is up to date. If not click "Setup DCS A-10C" button

 

Add EOS Interface

  1. Repeat the steps above, only this time select EOS Bus
  2. Under Properties ensure Bus Type is set to Serial Bus Master
  3. Select the Com Port for your Arduino

The TX/RX lights should start flashing on your arduino.

After a few seconds you should see "T01Board" listed under EOS Devices

 

Configure the Board

  1. Click the Board listed under EOS Devices
  2. Set the Address to 2 (It appears 1 causes problems)
  3. Change the Name to ELEC PWR. NOTE the name is limited to 8 characters
  4. tab or click out of the Name box

Notice that the address and name have been updated under the EOS Devices. This has been saved to the EEPROM on the Arduino and it will remember these settings on next boot

 

  1. To the Right of the Properties Tab click the Digital Inputs Tab
  2. You should see 7 digital inputs named Digital Input 0-7
  3. Toggle each switch to ensure that the "button" turns from dark red to light red when on
  4. Rename the Inputs according to the attached pic

 

 

 

Now is a good time to save your Profile.

 

Setup the bindings in Helios

Here we will map our switches to actual DCS bindings

  1. Under Bindings select Output Tab
  2. Expand the ELEC PWR carrot and notice that all the switch actions have our names
  3. Expand the Interfaces Tab under Actions
  4. Expand DCS A10C and expand the Electrical group
  5. We will start from the top and start adding the binds
  6. Under Actions drag "set APU Generator" over the Binding "APU GEN PWR ON"
  7. Under Properties Value you will notice red text that says "Action Value Warning - Value canno be empty
  8. ensure value source is set to static value
  9. Action value contains the valid values we can use. Since this is the on position set it to 1 by typing 1 in the box
  10. Repeat the steps for APU GEN PWR OFF except this time set the action value to 2 for Off/Reset
  11. Repeat the steps above for all switches.

NOTE the Inverter has 3 action values.

 

Save your profile once you have all the bindings configured

 

Running and Testing your profile

on my dev rig I run dcs windowed on a second monitor as its easier for troubleshooting.

  1. BE SURE YOU CLOSE PROFILE EDITOR BEFORE YOU START. otherwise when you attempt to launch the profile the com port will be locked by it and the profile will crash
  2. Launch Helios Control Center and select your Profile then click start.
  3. you should see your TX/RX lights flashing on your arduino
  4. Launch DCS and load an A-10 mission
  5. toggle your switches and you should see them working in the sim

 

Gotchas..Issues

  • backlight intensity will crash hellios...WORKAROUND dont use your mouse to slide the bar use keyboard only
  • no way to remove a board from the interfaces.
  • if you change your board address or name outside of helios (e.g on another profile) you will have to hack the hpf file to get it to work again
  • if you change the name of an analog input your profile will become corrupted. Even hacking the hpf file will not fix it

EOS_Digital_Input_Example.zip

eeprom_clear.thumb.png.cf215fadac464266c0cadae25d308076.png

255812098_Helios-A10Interface.thumb.png.2d572cf1e34c48428272684cf51cb0ad.png

357692054_Helios-EOSInterface.thumb.png.09dd24299e15238b574100e666a613ff.png

843296116_inputsnamed.thumb.png.c9e137f5388631601dea626786201dbc.png

69791479_readytobind.thumb.png.9ebc4437f2dafad88cbd4fb516398a10.png

691513303_apuonbound.thumb.png.e34f44f12ed75ccd4379e38a2dfa9f4b.png

1822063188_bindingscomplete.thumb.png.61db880820e8af5b7c322a5353b95437.png


Edited by whartsell
Verified Duemilanove works
  • Like 4
Link to comment
Share on other sites

I use backlight intensity, it should not crash Helios. I think it's an intermittent problem where Helios tries to send a command to the bus when the bus is busy. I've hit it periodically and need to put the right defensive action there.

 

Good catch on the ability to remove a device from the bus in Helios. I'll add that asap.

 

Also any recommendation on how to detect updated addresses? Since there is not one manufacturer there is not really the concept of a serial number. Can prompt on matching name / input counts with different addresses after a scan.

Link to comment
Share on other sites

I use back light intensity, it should not crash Helios. I think it's an intermittent problem where Helios tries to send a command to the bus when the bus is busy. I've hit it periodically and need to put the right defensive action there.

 

Good catch on the ability to remove a device from the bus in Helios. I'll add that asap.

 

Also any recommendation on how to detect updated addresses? Since there is not one manufacturer there is not really the concept of a serial number. Can prompt on matching name / input counts with different addresses after a scan.

 

In my (short) experience every time i touch the back light brightness bar it will crash.

 

Ill have to think about it in terms of the boards. I like the matching idea as then you don't loose all your bindings. As it stands right now profiles are not easily shared as you have no idea what their board name or address will be. May also want to match on firmware as its the only immutable parameter in the Info command.

Link to comment
Share on other sites

I was just going to post asking about this! THANK YOU! :worthy::thumbup:

 

EDIT: I vote to make this a sticky.

I only respond to that little mechanical voice that says "Terrain! Terrain! Pull Up! Pull Up!"

 

Who can say what is impossible, for the dream of yesterday is the hope of today and the reality of tomorrow.

-Robert Goddard

 

"A hybrid. A car for enthusiasts of armpit hair and brown rice." -Jeremy Clarkson

 

"I swear by my pretty floral bonet, I will end you." -Mal from Firefly

Link to comment
Share on other sites

I have also gotten an example SAS panel sketch created if anybody is interested. I figured it was a nice next step as it includes analog inputs,digital inputs and a LED output so it tests all the basics.

 

I wont do a full tutorial but the sketch is well documented.

If anybody is interested lemme know

Link to comment
Share on other sites

I use backlight intensity, it should not crash Helios. I think it's an intermittent problem where Helios tries to send a command to the bus when the bus is busy. I've hit it periodically and need to put the right defensive action there.

 

Good catch on the ability to remove a device from the bus in Helios. I'll add that asap.

 

Also any recommendation on how to detect updated addresses? Since there is not one manufacturer there is not really the concept of a serial number. Can prompt on matching name / input counts with different addresses after a scan.

 

I did some checking on this and it will only crash if you attempt to click and drag the slider. If you just click on a position on the bar or use the keyboard to scroll it will work just fine

Link to comment
Share on other sites

I have also gotten an example SAS panel sketch created if anybody is interested. I figured it was a nice next step as it includes analog inputs,digital inputs and a LED output so it tests all the basics.

 

I wont do a full tutorial but the sketch is well documented.

If anybody is interested lemme know

 

Thanks for the excellent tutorial Whartsell, please could I have a copy of your SAS panel sketch?

Link to comment
Share on other sites

 

I wont do a full tutorial but the sketch is well documented.

If anybody is interested lemme know

 

Will be very interesting to see.

Did you take on releasing the magnetic switches or are you using plain ones?

 

And yes, many many thanks for the tutorial. To bad I'm not in position to try these things yet


Edited by agrasyuk

Anton.

 

My pit build thread .

Simple and cheap UFC project

Link to comment
Share on other sites

EOS SAS Script

 

Please be sure you walk through my tutorial before you try to run this sketch. It will save allot of time for everybody as there are fundamental concepts in the tutorial that i assume you know if you are trying this sketch

 

 

Here is the sas sketch.

Pinouts:

A0 analog (yaw trim)

A1 - A5 Digital inputs

2-3 - Digital inputs

4 Take Off Trim Anunciator

5 PWM output for backlight

12 RS-485 TX (if you are using a bus controller)

 

WARNING: due to a bug in helios. DO NOT change the name of the analog input in Helios. It will corrupt your profile.

 

NOTE: binding the analog to the yaw trim see the attached screenshot for config

If the trim works backwards you have two options.

1. swap the pots ground/power wires

2. change the lua from return (TriggerValue-512)/512 to return (TriggerValue-512)/-512

yaw-trim.png.4bb153e07df97825a49466c7664cc84a.png

EOS_SASExample.zip

Link to comment
Share on other sites

128 digital input sketch for EOS

 

I have created and am testing a sketch that supports a 128 input matrix on an arduino. It does require two 74hc164 chips (about 2 bucks each locally or .50 online).

 

This sketch is intended for people (like) me who dont want to have to add hardware for each "dumb" panel that doesn warrant it (e.g elec power panel).

 

I am using a Pokeys in my pit now that uses a matrix so in my case it was a drop in replacement for the pokeys.

 

After i finished testing it I will create a new thread and post the sketch,lib, and schematic for it along with instructions.

 

if you dont know what an input (switch) matrix is...you can find some info here

Link to comment
Share on other sites

Actually the EOS Panel Board is pretty cheap per panel... I think the PCBs will end up being $3 each and you don't have to fully populate all the chips. I'll double check but total BOM for the full Panel Board was <$30 at low volume. You almost get up to that price when you add up cost for cables and connectors to home run that many switches.

Link to comment
Share on other sites

Actually the EOS Panel Board is pretty cheap per panel... I think the PCBs will end up being $3 each and you don't have to fully populate all the chips. I'll double check but total BOM for the full Panel Board was <$30 at low volume. You almost get up to that price when you add up cost for cables and connectors to home run that many switches.

 

When i started I was using pokeys which were way too pricey to use in each panel. Now that EOS is out ill most likely start using pcbs in each panel.

 

One question...how did you plan on handling the intercom panel? has like 8 or nine analog inputs and the arduino only has 6. Are you going to multiplex using something like a 4051?

If so I have started on that sketch here but haven't finished it.

Link to comment
Share on other sites

I'm really confused about this post. it says that The Arduino Uno and leonardo won't work with EOS and helios, then it says it will work. I want to buy an arduino for dcs:a10c but i don't know which one to get since this post seems to say none of them actually work ?

Link to comment
Share on other sites

I'm really confused about this post. it says that The Arduino Uno and leonardo won't work with EOS and helios, then it says it will work. I want to buy an arduino for dcs:a10c but i don't know which one to get since this post seems to say none of them actually work ?

 

It says the UNO will work. Nowhere does it say the Leonardo will work.

If you buy an UNO you are safe.

Link to comment
Share on other sites

  • 1 month later...

How to use multiple EOS boards with a Single USB interface

 

How do you use multiple Arduino boards without using a lot of USB ports? Looks like there is some way to chain them together?

 

You can link them together using the EOS interface board sketch on a Arduino Leonardo board with some supporting hardware. The interface board has a RS-485 transceiver that allows it to talk to multiple EOS boards. It communicates to Helios via serial over USB.

 

The interface sketch will only work on a Leonardo board due to the Leonardo having two UARTS

 

Schematic

below is a simple schematic of how to hook up a RS-485 transceiver to the Leonardo

Your transceiver may have different names for the pins but the pinout should be the same

 

RS-485.png

 

 

Obviously all your EOS boards will need this hardware if you want to use RS-485.

In The EOS Sketches you will see something like

 EosBus.begin(2, 250000); 

This means that digital pin 2 is your TX Enable pin for RS-485. It is also called Device Enable. Notice that it matches the diagram above. If you define a different pin here you just need to make sure that you wire that up to 2/3 on the RS-485 chip

 

 

Helios

when you start Helios and add your EOS interface it defaults to Bus Controller. Change this to Bus Interface

After you define your port the controller will start looking for boards connected. You should only connect One board at a time as it will have a default address.

If you don't have any EOS boards hooked up to the controller you will not see anything.

Once a board has been detected change the address add your next board,rinse repeat till all your boards are hooked up and assigned.

 

From here on out the Helios UI is just like the tutorial.

Link to comment
Share on other sites

dear whartsell,

this is a very good thing you are doing for us here.

 

however you need to understand most of us do not electronics engineer be!

therefore, could you add basic photos and/or diagrams in step by step (as in the idiots guide to...)

that is the only way we will even begin to understand your work let alone use it.

most people (just a general statement) have not done this before and are thus experimenting.

 

do not give us too much credibility, we are not as clever as you and we need a lot of help!

furthermore, we will not have the same/exact configuration as you do (for example: i dont use helios and i build a harrier pit but i follow your advice anyway).

 

bye for now

grainny

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...