Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Fedor
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Fedor

    @Fedor

    0
    Reputation
    6
    Posts
    153
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Fedor Follow

    Best posts made by Fedor

    This user hasn't posted anything yet.

    Latest posts made by Fedor

    • RE: [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      @yveaux
      I tried to use SoftWire in sketch without any libs and missed repeated start.

      posted in Hardware
      Fedor
      Fedor
    • RE: [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      OK I finally managed it
      The sensor requires i2c repeated start
      But both Roger Clarks and official STM core for Blue Pill TwoWire libs don't support it.
      Wire.endTransmission( bool stop ) where stop is just a stub and not processed
      but SoftWire handles it
      so just few changed to any lib (SparkFun/Adafruit/etc) like:

      #ifdef ARDUINO_ARCH_STM32F1
      #include "SoftWire.h"
      #else
      #include "Wire.h"
      #endif

      and
      SoftWire SWire(PA1,PA2,SOFT_STANDARD);
      #define Wire SWire

      solves the problem
      I hope this is useful to someone

      posted in Hardware
      Fedor
      Fedor
    • RE: [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      @yveaux said in Blue pill (stm32f1) + VEML6075 UV sensor:

      Can this be a problem?

      I'm not sure if you can really trust the readings of this 'oscilloscope'.

      I agree 🙂

      You can try slowing down the i2c clock to make it visible.

      100Khz is already minimum in blue pill Wire 😞

      The 10k pullup is rather high IMO for a 3v3 system, I'd rather try 4k7 or even lower. But you >say you already tried lowering the pullups.

      but 10k works well in arduino 3.3v, arduino 5v with level converter to 3.3v. 10k BMP280 works with stm32 😞
      I ordered esp8266, it looks like someone is using VEML6075 with it

      posted in Hardware
      Fedor
      Fedor
    • RE: [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      @yveaux
      surprisingly but the sensor detected during i2c scan with correct address 0x10
      I tried to explore dataflow using dso138 but this device is very simple, trigger works even at 50 us, clock looks like sine wave, but I see that some "1" on SDA are less that 3.3 volts, about 2 volts. Can this be a problem? However BMP280 sensor has the same but works well.
      I tried 3.3v arduino and it works too. Resistance between sensor boards SCL/SDA and VIN is 10K just like BMP280

      posted in Hardware
      Fedor
      Fedor
    • RE: [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      @Yveaux
      I tried adafruit, sparkfun, schizobovine, Kris Winer libraries
      Then I tried to work without library - the sensor is very simple, just several i2c commands

      uint8_t msb = 0;
      uint8_t lsb = 0;

      Wire.beginTransmission( (uint8_t)VEML6075_ADDR);
      Wire.write((uint8_t)reg);
      Wire.endTransmission(false);

      Wire.requestFrom((uint8_t)VEML6075_ADDR, (byte)2);
      lsb = Wire.read();
      msb = Wire.read();

      To get device ID
      But nothing works

      posted in Hardware
      Fedor
      Fedor
    • [SOLVED] Blue pill (stm32f1) + VEML6075 UV sensor

      Hi

      Has anyone forced this pair to work?
      My VEML6075 board works well with Arduino but not with Blue pill.
      I tried both TwoWire and SoftWire, changing i2c freq, lowering pull up value (board has 10k resistors) etc
      Other sensors (like bosch weather sensors) works well.

      posted in Hardware
      Fedor
      Fedor