Omega 2 and Arduino dock.



  • @Venet
    Unfortunately I have never seen - in reality - the version 1 Arduino Dock yet.
    The Onion's schematic seems to be correct, except the representation of the reset button (SW2 RESET BTN).

    So - according to that schematic - if you want to use Arduino Dock v1 with Omega2 you should

    • isolate pin_2 of Omega2 labeled 11 (ie. GPIO_11 / BOOTSTRAP_4) from its socket's pin
    • connect pin_2 of Omega's socket labeled VDD25 (ie. 2.5 V supply) to 3.3 V

    (The "barbaric" solution: cut PCB trace(s) of socket's pin_2 and tie all VDD25 labeled points to 3.3 V with wires.)

    I think this is the minimal mandatory modification.
    Is this resolvable? Can you do this?


    On version 1 dock Omega and the ATmega MCU can communicate via a serial connection and / or via I2C only.
    So Arduino can not access Omega's GPIO pins directly.



  • Task 2
    connect pin_2 of Omega's socket labeled VDD25 (ie. 2.5 V supply) to 3.3 V

    is unnecessary. Omega2's own Net_Power pin (2.5V) pin internally is open-circuit.

    This pin's original purpose is to supply DC bias for Ethernet magnetics (transformer) center tap.
    For MT7688, it's not needed.

    ccs_hello



  • @ccs-hello
    You are talking about Omega's pin 25 (NET_POW) on the right hand side.
    I am talking about Omega's pin 2 (VDD25) on the left hand side.
    In my previous post I only tried to write the very first steps about "How to use the first version of Arduino Dock with Omega2".
    See also this schematic please. 😉



  • re: Arduino Dock v1 with Omega2

    Sorry for that Net_Power confusion. My bad.

    Omega2's left-side pin 2 is its GPIO11 (I/O),
    so the Omega1 dock's pin 2 (which is expecting to receive the 2.5V output from Omega1) will have to be re-routed.

    Omega2 module does not supply 2.5V output.

    ccs_hello



  • @Venet
    I hope I'm not too late. For now, do nothing.
    First of all let's talk about the necessary and possible modifications.
    This v1 Dock with Omega2 project is a lot of work... :thinking: it may not be worth it.
    Electronic circuits DIY and soldering practice are needed.


    You have a version 1 Arduino Dock. Please let me know:

    • What is the SMD marking code of the power supply IC?
    • The MCU is an ATMEGA328P AU isn't it?


  • @Kostiantyn-Tarasenko said in Omega 2 and Arduino dock.:

    Even better, Blynk server runs smooth on Omega2 with socat - blynk widgets on the phone could access adruino pins.

    Hi, how to install socat - blynk widgets on omega2+?

    thanks



  • Hi,
    I've been struggling for more than a week to get my Arduino Dock 2 working. I followed all the instructions and other tips but have no luck. The Arduino IDE connects to the Omega 2, but gives an error when the loading of the hex is supposed to start. I get the same error when loading with terminal.

    Sketch uses 5092 bytes (15%) of program storage space. Maximum is 32256 bytes.
    Global variables use 199 bytes (9%) of dynamic memory, leaving 1849 bytes for local variables. Maximum is 2048 bytes.

    Flashing application '/tmp/sketch.hex' ...

    ERROR, flash NOT successful
    Flash complete!
    avrdude: AVR device not responding
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    The Omega 2+ has Ω-ware: 0.1.10 b160 and using avrdude_6.1-1
    Staring to wonder if it's not easier to use a 3.3v Pic18 or Arduino on a separate board, but the Uno and Omega on the same board seems like a really neat and compact solution. Is it some versioning issue maybe? Please help me! Like I said it has been over a week. I'm not new to microcontrollers or linux.



  • @Wer-Ner
    Omega2+ 0.1.10-b160 with Arduino Dock 2

    Onion Omega2 Documentation Flashing the Arduino Dock

    We did all of our testing using Version 1.8.0

    So I downloaded arduino-1.8.0-linux32.tar.xz and installed onto my Ubuntu 16.10 (32-bit) box and followed the above docu.

    I'm not an Arduino expert but it seems it is working well.



  • @György-Farkas
    Thank you. I have just removed Arduino 1.8.1 and installed 1.8.0 (and did the other steps), and I am still getting the same error. Did you load any bootloader to your Arduino Dock 2? I tried with both methods using the Expansion Dock, which also failed, but I read afterwards that it is not necessary with the Dock 2.

    avrdude: AVR device not responding
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.



  • Please help me. I still cannot get the Arduino Dock 2 to flash a sketch. Have tried everything I could read and think of and still getting the same error:

    avrdude: AVR device not responding
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.



  • @Wer-Ner
    Sorry, I did not try to flash any bootloaders to that Dock.
    I try to support my friend's [O2+ with Arduino Dock 2] project. Unfortunately I can "play" with that Dock on the weekends only. I uploaded several sketches from the 'Examples' directory of the Arduino IDE v1.8.0 - as I wrote - without any problems.

    Which bootloader do you want to use? I'd like to try to load it with O2+ on the next Sunday.



  • are you positive that you followed the instruction that concern the arduino ide.? did you ssh into omega to opkg install arduino-dock-2? did you modify boards.txt? did you add ,
    uno.upload.via_ssh=true, to board.txt? did you select “Arduino/Guinuino Uno” for the Board, and your Omega-ABCD hostname as the Port: ? did you flash the sketch using,
    sh /usr/bin/arduino-dock flash <hex file>? those are the steps i took. did you flash any bootloaders?



  • @Douglas-Kryder
    Thank you for your reply. Yes I'm positive, but the problem is not with the IDE. I tried to copy the hex file to the Omega2+ and load it using the terminal and am getting the same error. Also, if i read 0x08 from the ATmega I get 0xFF. I did not successfully load any bootloaders but tried to. I tried with the I2C and ICSP methods using the Expansion Dock 2, which both failed because the device (ATmega) could not be detected. I later read that loading the bootloader is actually not needed for the Arduino Dock 2. Starting to wonder if this one is defective maybe?



  • @György-Farkas
    Thank you for the reply. I tried to load the bootloader as discussed in "Arduino Dock Initial Setup"
    https://wiki.onion.io/Tutorials/Arduino-Dock/Initial-Setup



  • @Wer-Ner said in Omega 2 and Arduino dock.:

    @Douglas-Kryder
    Thank you for your reply. Yes I'm positive, but the problem is not with the IDE. I tried to copy the hex file to the Omega2+ and load it using the terminal and am getting the same error. Also, if i read 0x08 from the ATmega I get 0xFF. I did not successfully load any bootloaders but tried to. I tried with the I2C and ICSP methods using the Expansion Dock 2, which both failed because the device (ATmega) could not be detected. I later read that loading the bootloader is actually not needed for the Arduino Dock 2. Starting to wonder if this one is defective maybe?

    yes. but, you have to set up the ide properly in order to have clean sketches and a proper setup of the hardware. you could be getting that error because you failed to do the proper setup steps which include using the ide. if your sketch is wrong because of bad setup , the flash will not finish successfully. hence errors.



  • @Wer-Ner said in Omega 2 and Arduino dock.:

    I tried to load the bootloader as discussed in "Arduino Dock Initial Setup"
    https://wiki.onion.io/Tutorials/Arduino-Dock/Initial-Setup

    That tutorial is related to Omega (ie the previous version) and the first version of the Arduino Dock.
    Use it carefully!
    The ATMEGA328 chip is 5V powered on the Arduino Dock 2 so it may damage your Omega2 if you follow the advices of that tutorial

    I hope you did not install the arduino-dock package instead of the arduino-dock-2.



  • @Douglas-Kryder
    Thank you. I did follow those steps to the T. The IDE picks up the Omega on the network etc. Is there a specific step that will cause that error?



  • @György-Farkas
    Yes I realized that the tutorial was for the previous version of the Omega after I tried it, so I hope I didn't damage anything. I did install arduino-dock at first but then removed it and installed arduino-dock 2. However, the omega is working fine. Having said that, maybe following the tutorial damaged the I2C bus? But does it not have a level converter on that bus (and other pins) ?
    EDIT: The OLed expansion still works on the omega. This means that the I2C is working right? If I try to read the OLed (0x3c), I get 0x03, so I assume that the "read" also works.



  • @Wer-Ner
    Yes, there is a TI TXS0108 "8-Bit Bi-directional, Level-Shifting, Voltage Translator for Open-Drain and Push-Pull Applications" chip on the board.

    Exp.header Omega Arduino ICSP header
    3.3V logic 3.3V logic 5V logic 5V logic
    pin 22 I2C SCL SCL
    pin 24 I2C SDA SDA
            |            |          |             
    

    pin 13 | UART1 TX1 | RX |
    pin 11 | UART1 RX1 | TX |
    | | |
    | GPIO_15 | SCK | SCK pin 3
    | GPIO_17 | MISO | MISO pin 1
    | GPIO_16 | MOSI | MOSI pin 4
    | | |
    | GPIO_19 | /RESET * | RST pin 5
    | | | +5V pin 2
    | | | GND pin 6

    • Omega's GPIO_19 is inverted with an NPN transistor
      providing an (open collector) active LOW RESET for Arduino.


  • @György-Farkas
    Ok, thank you so much. But I am confidant that the omega is working. The I2C port seems to be working as well. I think I should take the Arduino Dock 2 back for a refund. It might have been brought back by someone else who maybe blew it and those guys just put it back on the shelf. They are known for doing that. It is also not the first blown (and previously returned) component I bought from them. Is there anything I can check on the Arduino dock 2 side, to see if it is actually working. What happens is:

    1. blue led solid on
    2. when I load sketch through IDE it compiles, and the moment it wants to start loading it on the Atmega chip, the blue led goes off for a split second and comes back on, after which I get the error message, stating the the chip could not be detected.
      Can I read the I2C port of the arduino dock? I read address 0x08 but always get 0xff in return. The chip is either "empty" or not working at all. I'm trying to figure out if I should take it back since it's going to be a mission to get it swopped for a new one.

    EDIT: The issue definitely is on the I2C between the Omega and Arduino dock.
    If I read the value of the blue led with:

    i2cget -y 0 0x08

    I get:

    0xff

    and I should be getting 0x01 or 0x00
    If I send a command to toggle the blue led (i2cset -y 0 0x08 0x00), the command executes with no errors but nothing changes on the Arduino dock.
    Am I not missing a library or something on the Omega side?



Looks like your connection to Community was lost, please wait while we try to reconnect.