|
Post by ljozsa on Aug 27, 2017 13:04:54 GMT -8
Hi, I recently bought Quad Power Management board and attempted to test it using [1]. The program should turn on and off load switches. I attempted to test it by connecting the board to the Raspberry Pi using I2C pins SDA, SCL, GND, VDDM on JP2, put 5V between VIN0 and GND on LoadSwitch0 and from VOUT0 and GND I fed another RPi - these were connected to RPi GPIO. I expected that RPi will turn on and off accordingly but nothing happened. On top of that - shouldn't be that status of on/off of particular load switch indicated by LED's on the board? Only LED that was "ON" all the time was the power LED but no other. I also tried to short SJ1 pins and power up the board as this should cause the power switch to be in "ON" state upon QPM power on. But I'm still getting the same result - 0V between VOUT and GND. Tried to apply 5V to LoadSwitch1 but still no luck. The question is - is the board faulty? Or I'm doing something wrong? Thanks, Ladislav [1] github.com/switchdoclabs/SDL_Pi_QPM
|
|
|
Post by SDL on Aug 28, 2017 13:36:17 GMT -8
First of all, disconnect all the loads from the QPM board and run the test program to given with the driver to verify the functionality of the board.
I would say, given the LEDs, that you have hooked up the I2C somehow incorrectly or don't have the software running correctly.
Run "i2cdetect -y 1" and see if you even detect the board.
BP
|
|
|
Post by ljozsa on Aug 30, 2017 12:22:51 GMT -8
Hmmm, still no luck. :-(
root@raspberrypi:~/SDL_Pi_QPM# python SDL_Pi_QPM_Test.py
Test SDL_Pi_QPM Version 1.0 - SwitchDoc Labs
Sample uses 0x21 I2C Address Cycles through all the four loadswitches Program Started at:2017-08-30 20:15:42
----------------- ('------>>>> Initial GPIO Value =', 127) ---------------- Turn on LSW0 Turn on LSW1 Turn on LSW2 Turn on LSW3 ---------------- Turn on LSW0 ^CTraceback (most recent call last): File "SDL_Pi_QPM_Test.py", line 59, in <module> time.sleep(3) KeyboardInterrupt root@raspberrypi:~/SDL_Pi_QPM# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
All loads are disconnected, the board itself is detected, the program is running. When I disconnect SDA and SCL and have only power applied then the program crashes. So some communication is with the board is happening but it seems that it doesn't accept power-on commands for the load switches. Any other ideas? I can try to do some measurements with multimeter if tell me what should I test.
|
|
|
Post by SDL on Aug 30, 2017 12:51:36 GMT -8
Yes, the program will crash if you disconnect SDA and SCL. You are talking to the board.
What are the individual LEDs doing when you run the program? With the loads disconnected.
BP
|
|
|
Post by ljozsa on Aug 31, 2017 0:37:56 GMT -8
They're off.
|
|
|
Post by SDL on Aug 31, 2017 10:45:23 GMT -8
Hmm. OK. I think you have a bad QPM board. We just got a new batch in, so here is the RMA. We will send you a new one and will test this one to see what is going on.
SwitchDoc Labs RMA #083117-01 909 S Lake Shelley Lane Spokane Valley, WA 99037
BP
|
|
|
Post by ljozsa on Oct 28, 2017 13:51:46 GMT -8
Hi,
I have finally received the replacement QPM board but the behavior is still the same. :-( This time I didn't connect any loads at all, connected only I2C cables and used Arduino Uno to do the tests. Serial console looks fine, Arduino finds the QPM, however individual LEDs are still off during the test loop. This cannot be coincidence that two boards behave exactly the same... Wasn't there some change in components addressing or something?
Have you got a chance to test the board I sent you back?
Many thanks, Ladislav
|
|
|
Post by SDL on Oct 28, 2017 14:01:58 GMT -8
Ladislav,
The odds of both board being bad are astronomical. I will go find your board (we don't process RMAs generally as they are received - we have an RMA party occasionally).
Post the i2cdetect -y 1 results with this new board.
Or if you are using Arduino, then download the i2c scanner program from Arduino.
BP
|
|
|
Post by ljozsa on Oct 29, 2017 0:51:48 GMT -8
I have uncommented part of the QPM test code that does I2C detection, the output is:
-------------------------- SDL_Arduino_QPM_Test Version 1.1 I2C device found at address 0x21 done
------>>>> Initial GPIO Value =81 ---------------- Turn on LSW0 Turn on LSW1 Turn on LSW2 Turn on LSW3
So, the device is found at default 0x21 address. However if you want, I can connect the board to RPi and run i2cdetect -y 1 there. However, it doesn't seem that I2C comms between Arduino/RPi vs QPM is the problem. For me its seems like the load switches weren't properly addressed by the chip that sits between I2C and load switches themselves. Just my 2c.
Ladislav
|
|
|
Post by ljozsa on Nov 3, 2017 8:43:43 GMT -8
Hi,
did you find the board I sent you?
Many thanks, Ladislav
|
|
|
Post by SDL on Nov 3, 2017 9:45:42 GMT -8
Ladislav,
Found it! You hadn't written the RMA # on the package so we missed it. Double reason was that was the weekend we moved the office and it was under some older RMA packages.
Your board works fine. Here is what you need to do to enable the LEDs.
Put a jumper from JP4/1 (VCC1) to JP3/1 (VDDM) and JP4/2 (VCC2) to JP3/2 (VDDM).
It looks like the buffer changed it's behavior slightly in the last production run and VCC1/2 doesn't like to float anymore.
Now your LEDs will work. Your switches were working already.
Hope that helps!
BP
|
|
|
Post by ljozsa on Nov 8, 2017 11:58:55 GMT -8
Thanks, it works for me!! :-)
|
|
|
Post by lbendlin on Jan 25, 2019 13:22:04 GMT -8
I just received my QPM and it exhibits exactly the same behavior. By the way, "your switches were working already" is incorrect. The switches only work after providing power to JP4/1.
You may want to update the documentation to mention that at least JP4/1 needs to get some power - either from JP3 (which means the I2C host needs to be alive) or from another 5V source (for example the SunControl board)
|
|
|
Post by SDL on Jan 27, 2019 16:14:25 GMT -8
Very true. We will update the documentation.
BP
|
|