• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. mglowinski
    3. Posts
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 27
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by mglowinski

    • RE: Disturbed communication on I2C bus

      It is a problem related to power-supply.
      It was some voltage peaks while connecting anything to the same circuit as power-supply.
      I've a better one (Phoenix Contact) and it's working stable now.

      Topic closed.

      posted in Official API - Evok
      M
      mglowinski
    • RE: UniPi1.1 and I2C voltage levels

      @Giancarlo-Bazzi did you manage to set 3.3V as I2C voltage level?

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • Set 3.3V as I2C voltage level

      Is there a way to set 3.3VDC as I2C voltage level on UniPi 1.1?
      I can see that there is some I2C configuration header, but I can't find any information about it.

      PS. I've seen https://forum.unipi.technology/topic/467/unipi1-1-and-i2c-voltage-levels, but it is quite old and there is no answer.

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • RE: Disturbed communication on I2C bus

      I found the source of the problem, but I don't know how to solve it. The problem is caused by connecting an electrical device (resistor like a light bulb) to the circuit that supplies power to the UniPi. I tried to replace the power supply, but the same thing happens.

      Video:
      https://www.youtube.com/watch?v=p-k9daYUK58

      Do you have any tip how to solve that issue?

      posted in Official API - Evok
      M
      mglowinski
    • RE: Disturbed communication on I2C bus

      Here is exact topology of I2C network:
      I2C network.png

      According to documentation:
      BH1750 has 10kΩ pull-up resistors (pinout or electrical scheme)
      ICM20948 has 10kΩ pull-up resistors (pinout or electrical scheme)
      LiDAR has internal 3kΩ (here is information), but documentation recommends to connect additional external 4.7kΩ (i did NOT connect that).

      I checked the impact of BH1750 sensors and I2C speed on the I2C bus communication quality.
      Here are results: https://we.tl/t-bBP0UiNtLZ

      I noticed that every time the LiDAR stops responding there is a small peak on the I2C data bus.
      Example disturbance 2 closer.png
      or
      Example disturbance.png

      Here is screen of successful read from LiDAR, noice and LiDAR does not ACK frame anymore:
      400kHz no BH1750 communication when LiDAR stop responding closer look.png

      This error occurs both with and without the BH1750 sensors connected. At lower speeds it occurs much less frequently, but it also occurs.

      posted in Official API - Evok
      M
      mglowinski
    • Disturbed communication on I2C bus

      Hi,
      I would like to ask about problem related to I2C communication on UniPi 1.1.

      To be more precise, from time to time my application written in python crashes with the error OSError error: [Errno 121] Remote I/O, which indicates that the device is not connected to the I2C bus. It' not true, since for most of the time it's working just fine.

      I've noticed that UniPi is using I2C for controlling peripheral devices e.g relays.
      Might it be that I'm trying to get access to I2C bus from python application, while EVOK is executing some other command via I2C?

      posted in Official API - Evok
      M
      mglowinski
    • RE: Check date/time of last action on relays

      ok, thx:)

      posted in Official API - Evok
      M
      mglowinski
    • Check date/time of last action on relays

      Hi,
      I'm using EVOK API for controlling UniPi 1.1 relays.
      Is there a way to get to know recent action on particular relay?

      posted in Official API - Evok
      M
      mglowinski
    • RE: Recommended way of connecting I2C device

      ok, thx for feedback

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • Recommended way of connecting I2C device

      Hi,
      what is recommended way of connecting I2C device consuming up to 85mA to UniPi 1.1?

      Let's say I want to connect LiDAR Lite V3HP sensor to UniPi 1.1 over I2C Rj11 interface.

      Would you recommend to use +5V from RJ11?
      Direct connection.png

      Or rather use external power-supply?
      Indirect connection.png

      Thanks for answer in advance:)!

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • RE: I2C working, but disabled on Raspbian

      @Martin-Kudláček Do you maybe know how i can check current speed of I2C, which is set over device tree overlays?

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • I2C working, but disabled on Raspbian

      Hi,
      I've noticed that after installing EVOK, I2C is disabled on Raspbian, but still I can communicate with I2C devices.

      I2C disabled in RP4 settings:
      a0d361b2-071d-4c79-b8c6-82533d9e790e-image.png

      I2C devices:

      i2cdetect -y 1
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
      10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 
      20: 20 -- -- 23 -- -- -- -- -- -- -- -- -- -- -- -- 
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
      50: 50 -- -- -- -- -- -- 57 -- -- -- -- 5c -- -- -- 
      60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- UU 
      70: -- -- -- -- -- -- -- -- 
      

      I wonder how this is possible. Is there some electronic element, which is handing I2C communication on UniPi 1.1? If yes, what is default speed of it?

      posted in Unipi 1 - First Generation
      M
      mglowinski
    • RE: Recommended way of connecting analog sensor

      Thx for explanation!

      posted in Official API - Evok
      M
      mglowinski
    • RE: How to control relay extension board via EVOK?

      To make extension relay module (EMO-R8) working with EVOK below steps needs to be done:

      1. Open /etc/evok.conf file
      2. Uncomment relays assigned to EMO-R8:

      Each this line begins with a character ;
      This character must be removed for all lines related to the configuration for EMO-R8:

      ;
      ;Example of 8xRelay extension module addon (EMO-R8) on address 0x21
      ;
      
      [MCP_2]
      i2cbus = 1
      address = 0x21
      
      [RELAY_9]
      mcp = 2
      pin = 7
      
      [RELAY_10]
      mcp = 2
      pin = 6
      
      [RELAY_11]
      mcp = 2
      pin = 5
      
      [RELAY_12]
      mcp = 2
      pin = 4
      
      [RELAY_13]
      mcp = 2
      pin = 3
      
      [RELAY_14]
      mcp = 2
      pin = 2
      
      [RELAY_15]
      mcp = 2
      pin = 1
      
      [RELAY_16]
      mcp = 2
      pin = 0
      
      1. Save /etc/evok.conf file
      2. Restart evok
      posted in Official API - Evok
      M
      mglowinski
    • Recommended way of connecting analog sensor

      Hi,
      I've bought UniPi 1.1.

      I would like to connect URM09 distance sensor analog output to one of analog inputs on UniPi 1.1. Please, notice that sensor is single-ended analog sensor working on 5VDC.

      What is the recommended way of connecting the URM09's analog output to one of analog input on UniPi 1.1?
      I thought about connecting A1- to GND and A1+ to output of the sensor.
      But in that case I will not know what is the reference voltage and i need to properly calculate the voltage on analog input.

      Vref = (ADC * Vref) / 4294967296
      

      4294967296 is ADC resolution, i know it from analog input tutorial.

      posted in Official API - Evok
      M
      mglowinski
    • How to count impulses on digital input via EVOK API?

      Hi,
      I've installed EVOK API to manage peripherals easily.
      Is there a way to count impulses on digital inputs on UniPi 1.1 via EVOK API or any other way?
      Reason why i want to do that is to get measurements from HC-SR04 sensor.

      posted in Official API - Evok
      M
      mglowinski
    • How to control relay extension board via EVOK?

      Hi,
      I've bought UniPi 1.1 and extension board with relays.

      How i can control this extension board relays via EVOK API?

      posted in Official API - Evok
      M
      mglowinski
    • Is there a way to set relays to default state after RaspberryPi reboot?

      Is there a way to set UniPi 1.1's relays to default state after RaspberryPi reboot?
      I've noticed that, relay state is remembered and restored after RaspberryPi reboot.

      posted in Official API - Evok
      M
      mglowinski
    • RE: Reading and sending data using UART via EVOK API

      I made it work.
      I enabled Serial in RaspberryPi Setting and and used /dev/serial0 and it worked.

      Thx @martin_triska for help!

      posted in Official API - Evok
      M
      mglowinski