🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • 0 Votes
    3 Posts
    2k Views
    R
    @ajb2k3 Thank you very much. Power booster sounds like a pretty good solution. I apologize that I am a beginner of this field, if possible, could you please inform me why removing resistors of ADC Unit corrects the current output? Since I also tried to remove several resistors in PaHub, however, the readings increased only a little bit..
  • GROVE2GROVE and 5V DC fan

    12
    0 Votes
    12 Posts
    7k Views
    ajb2k3A
    @teastain I wasn't aware of the non connection as I dont have the unit, thanks for pointing this out so this revision is based on my designs and feedback. I need to get some for the Stick projects I have here.
  • Core2 v1.1 KmeterISO

    5
    0 Votes
    5 Posts
    4k Views
    C
    I just wanted to give an update in the event someone comes across the same issue in the future: I was able to get the KMeterISO to work with the Core.2 unit and using the Arduino IDE by doing the following: I needed to download the M5Unit-KMeterISO library from GITHUB - https://github.com/m5stack/M5Unit-KMeterISO I used the included "demo" example that was part of the library download but I had to make a few changes: I added a line "#include <M5Core2.h>" to the beginning. Added "M5.begin();" in void setup(), and finally changed the i2c pins from 21 & 22 to 32 & 33 in the kmeter.begin line - "while (!kmeter.begin(&Wire, KMETER_DEFAULT_ADDR, 32, 33, 100000L)) {" Here is the complete modified demo example code: #include "M5UnitKmeterISO.h" #include <M5Core2.h> #define INTERVAL_TIME 500 M5UnitKmeterISO kmeter; uint8_t error_status = 0; long delay_time = 0; long map(long x, long in_min, long in_max, long out_min, long out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } void setup() { M5.begin(); Serial.begin(115200); while (!kmeter.begin(&Wire, KMETER_DEFAULT_ADDR, 32, 33, 100000L)) { Serial.println("Unit KmeterISO not found"); } delay_time = millis() + INTERVAL_TIME; } void loop() { if (millis() > delay_time) { error_status = kmeter.getReadyStatus(); if (error_status == 0) { Serial.printf("Celsius Temp: %.2fC\r\n", ((float)(kmeter.getCelsiusTempValue())) / 100); Serial.printf("Fahrenheit Temp: %.2fF\r\n", ((float)(kmeter.getFahrenheitTempValue())) / 100); Serial.printf( "Chip Celsius Temp: %.2fC\r\n", ((float)(kmeter.getInternalCelsiusTempValue())) / 100); Serial.printf( "Chip Fahrenheit Temp: %.2fF\r\n", ((float)(kmeter.getInternalFahrenheitTempValue())) / 100); } else { Serial.printf("Error: %d", kmeter.getReadyStatus()); } delay_time = millis() + INTERVAL_TIME; } }
  • M5DIN PowerOff when Vin is powered

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    N
    @teastain Hi teastain, thank you for your reply with this Informations. Sadly i thougt i need this H bridges, and bought them all. So now i use them with the possibility up to 10000 frequency. One Set of Vents would need 25000 frequency, but they work also with 10000. The others only need 2000-4000 frequency, and happy with the value it can deliver. And i have no idea how to use 5 set of Fan´s with the onboard PWM and different Values. The Hub-B can deliver PWM, but i cannot choose the frequency, so i not try to use this device, because lower frequencys at 2000-5000 with the 25000 frequency Fans produce very noisy Fan Sounds. But at 10000 it is ok to hear. On the End, i´m happy the Fans i have can be used with the M5stack H Bridge Units. The next i need to do is, how to use Servos, to Automatically set the height of the Lamp. But how i can Stop and Hold a Servo, also without a Power Source to hold the weight ? Are there some M5stack Units and Servos i can use with a weight of 2-3kg ? They should lift and securely stop lifting in a Range of 1 Meter. I looked up some RC Winds and a Servo Unit, but the Most of them have no rachet stopper, and for now i have no idea what devices i can use easily for this task.
  • How to know what sensors are plugged into which ports and pins?

    3
    0 Votes
    3 Posts
    2k Views
    konacurrentsK
    @ajb2k3 Thanks for reply. My question is what happens in the example stated when the M5Atom is using the ATOMIC PortABC Extension. In this case, there are 2 I2C ports. So if my button is plugged into the M5Atom, it uses one set of pins, but if plugged into the Extension, it's a different pin set (and plugged into the red one as you state.) I just did some testing and with an EPROM setting I can state which of the 2 plugs (and associated pins) to use. Next time it's powered on - the buttons work in the new plugin. Unfortunately the changes won't work unless POWER is cycled (rebooting isn't enough). Actually after changing the pins, rebooting will start looking at the different pin, and it won't work (without the POWER cycle.) So again, I was wondering what developers do with this plug-n-play vision without hardcoding all the devices and knowing where they are plugged in. I have the PBHub but haven't played with it yet (but I think it has a naming issue as well, eg. plug1 in slot1, etc). This dynamic configuration is where a JSON (or equivalent) configuration could be specified and stored in EPROM. Thanks.
  • Help with M5 Unit V2 on Linux

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • UnitV UART out to Raspberry Pi GPIO

    4
    0 Votes
    4 Posts
    8k Views
    P
    @kylebuttress I saw that you managed to get the UART connection working between the M5Stack UnitV2 and Raspberry Pi, and it's functioning well. Could you share the steps and settings you used to disable the serial console on the Raspberry Pi? Additionally, did you use any specific Python libraries or tools to read data from the UnitV via UART?
  • water droplet sensor

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • CARD Computer SD card can't format

    7
    0 Votes
    7 Posts
    8k Views
    C
    @ckcampbell248 Update...I think I solved my own problem. I believe the problem is with the Notepad app in the demo firmware. We tried several different SD cards that were known to be working in M5Launcher and they all failed on two Cardputers using the demo firmware. I installed Launcher on my device, and I am able to install .bin files from the SD card.
  • Glass2

    3
    0 Votes
    3 Posts
    3k Views
    T
    @robski Thanks I was looking on the GLASS2 page and there are no UIFLOW examples on there. I have come to the conclusion that GLASS2 is not fully implemented in UIFLOW2 as when I went back to UIFLOW1 there is a whole load of methods exposed on there. I may just have to learn a bit more about I2C and code via the Arduino IDE Tony
  • EXT-ENCODER (U161) proper use & tricky problem

    9
    0 Votes
    9 Posts
    7k Views
    J
    I need to connect an encoder to a Raspberry Pi and noted the M5Stack EXT-ENCODER (U161) appeared to offer exactly what I needed. However, initial testing identified a couple of issues. Two test rigs were used - both gave similar results. The first used a commercially available encoder rated at 1600 pulses / round (quadrature) and max rotation rate of 5000 rpm. For the first test, the encoder shaft was rotated by a motor driven friction wheel. The second encoder was a hobbyist unit pre-mounted on a small motor. In both cases the A/B encoder and power connections went to the M5Stack EXT-ENCODER which was further connected to the Raspberry Pi GPIO header as per specifications. No additional pull up/down resistors were added as my reading of the device spec was that these were provided internally by the EXT-ENCODER where required. The test was run multiple times each driving the motor at higher rotation rates via increased PWM values. Each run was over a period of 20 seconds with the EXT-ENCODER pulse value sampled over the I2C bus every 200ms. The difference between the latest and previous count value was recorded. The encoder values were computed as per the M5Stack documentation from the 4 bytes pulled from the I2C port 0x59 Register 0x10 The graph below plots the average change in pulse value for 200ms samples at each motor speed. [image: 1720620077401-m5stack_ext_encoder_characteristics-resized.png] As expected, the value returned by the EXT-ENCODER increases as the motor rotation rate rises. However it reaches a point where increased motor speed results in no further rise in the value returned by the EXT-ENCODER and instead starts to drop. Any further increases in motor speed result in the device reporting the same value repeatedly. I should add these rotation rates were fairly low. I’m wondering if this means the rate at which the encoders were generating pulses exceeded the EXT-ENCODER’s ability to ‘catch’ them. So my question is - what is the practical maximum pulse rate the EXT-ENCODER’s STM32F030 microcontroller can sustain and still reliably report it over the I2C bus? I’m using the SMBUS package for this. I’ve tried both increasing and decreasing the I2C bus speed on the Raspberry Pi but this made no difference. Another observation during these tests was that the EXT-ENCODER would very occasionally show an unexpected and sudden change in the encoder count value returned from the EXT-ENCODER. The EXT-ENCODER holds the pulse count as an unsigned 32bit integer and can be shown to accumulate counts up to the max value of 4294967295 before wrapping round back to zero (the converse happening for rotation in the opposite direction). However, these random flips of the returned count were obviously happening in the EXT-ENCODER as subsequent I2C calls continued to return values rising from the Two examples (below) - note that the erroneous value can be either higher or lower than a previously returned value with no change in motor rotation direction. Eg 1 Prev_val New_val 210624 211307 211307 211989 211989 212667 212667 180582 <<<<<<<<<<< 180582 181266 Eg 2 Prev_val New_val 32389 32506 32506 32622 32622 32736 32736 4294934607 <<<<<<<<<<< 4294934607 4294934720 4294934720 4294934837 Any observations welcome. john
  • MIC Unit in UIFlow?

    4
    0 Votes
    4 Posts
    7k Views
    MadeFLM
    I am bemused that this is still missing. I have the mic and PDM units I was hoping to use with the M5Dial, but they don't look available in UIFlow2, and one of them is listed in UIFlow1 but disabled.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • M5Station-485 I do not manage to use RS485

    2
    0 Votes
    2 Posts
    2k Views
    felmueF
    Hello @Jejmule maybe this example I wrote a while ago could be helpful? Thanks Felix
  • M5stack GPS, use Serial2 and Serial1

    3
    0 Votes
    3 Posts
    2k Views
    H
    @felmue said in M5stack GPS, use Serial2 and Serial1: Well, now i need to recheck what i have been doing. Your example works both on M5Stick (using ports 0 and 26) and M5Atom (ports 26 and 32). Thank you, i have some work to do, Ha Ha
  • CatM+GNSS, how much power from port C

    3
    0 Votes
    3 Posts
    2k Views
    H
    @felmue Thank you. Makes powering some mobile SIM7080 based projects a little easier. We will start some duration tests. Regards
  • M5Unit 8Servos - push button input

    6
    0 Votes
    6 Posts
    4k Views
    S
    I've managed to read button clicks from M5Unit 8Servos. Here is how i connected the button to the unit. [image: 1717258536984-img_1089.jpg] [image: 1717258536750-img_1090.jpg] I've managed to read button click from M5Unit 8Servos with this code. I'm using an M5Stack AtomS3 Lite. #include <Arduino.h> #include <M5Unified.h> #include <Wire.h> #include <M5_UNIT_8SERVO.h> #define SERVO_PIN 0 #define START_BUTTON_PIN 1 // put variables here: M5_UNIT_8SERVO unit_8servo; bool btnState; unsigned long btnClieckedMs; // put function declarations here: void setup() { M5.begin(); Serial.begin(115200); Serial.println("### Setup - start"); while (!unit_8servo.begin(&Wire, G2, G1, M5_UNIT_8SERVO_DEFAULT_ADDR)) { Serial.println("extio Connect Error"); delay(100); } //unit_8servo.setAllPinMode(SERVO_CTL_MODE); unit_8servo.setOnePinMode(SERVO_PIN, SERVO_CTL_MODE); unit_8servo.setOnePinMode(START_BUTTON_PIN, DIGITAL_INPUT_MODE); btnState = false; Serial.println("### Setup - end"); } void loop() { bool prevBtnState = btnState; // save last state for comparison btnState = unit_8servo.getDigitalInput(START_BUTTON_PIN); // read new state if(prevBtnState == false && btnState == true) { // if state has changed btnClieckedMs = millis(); // save millis } else if(prevBtnState == true && btnState == false) { // if state has changed again if(millis() - btnClieckedMs > 50) { // check how long it took from 'false' to 'true' (debounce) Serial.print("Button clicked "); // do some fancy things when button clicked Serial.println(btnClieckedMs); } } }
  • CAN + GPS Units in same application with uiflow 2.0.6

    2
    0 Votes
    2 Posts
    1k Views
    D
    Hi, I have find a way to use both of them in the same APP. CAN connected to Port C(UART1) and I used UART2 for GPS.