LED Selection not working as doccumented

General discussion about topics related to OpenMV.
marvin
Posts: 5
Joined: Thu Oct 04, 2018 4:02 am

LED Selection not working as doccumented

Postby marvin » Thu Oct 04, 2018 4:31 am

Just received my board and ran into a small problem with LED behavior.

The documentation shows.
red_led = pyb.LED(1)
green_led = pyb.LED(2)
blue_led = pyb.LED(3)
ir_leds = pyb.LED(4)

However when I run the following
import time, pyb
led = pyb.LED(2)
led.on()
time.sleep(1000)

It turns a RED led on not the GREEN one as documented.
pyb.LED(3) turns on the GREEN led not the BLUE
pyb.LED(1) does not turn on any LEDS
I'm not sure about pyb.LED(4) since it's IR and I can't see that.

I found the following youtube https://www.youtube.com/watch?v=vsnZzPE ... WxGTYQB24X (skip into 3:10)
This guy is using pyb.LED(3) and he gets the same result as me with a GREEN led not BLUE.

What's going on?
Is this a firmware bug?
I'm running OpenMV IDE 2.0.0
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: LED Selection not working as doccumented

Postby iabdalkader » Thu Oct 04, 2018 9:31 am

Hi, LEDs haven't changed for a while, did you buy the board from our store ? Also make sure you have the latest firmware (firmware 3.x.x)
marvin
Posts: 5
Joined: Thu Oct 04, 2018 4:02 am

Re: LED Selection not working as doccumented

Postby marvin » Thu Oct 04, 2018 9:43 am

Bought it via ebay. I assumed it was genuine, is there an easy way to check.
How do I check the FW level, couldn't find this in the IDE.

Thanks
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: LED Selection not working as doccumented

Postby iabdalkader » Thu Oct 04, 2018 9:57 am

marvin wrote:
Thu Oct 04, 2018 9:43 am
Bought it via ebay. I assumed it was genuine, is there an easy way to check.
How do I check the FW level, couldn't find this in the IDE.

Thanks
On the lower left corner you should see the firmware version after connecting.

We don't sell any boards on ebay or aliexpress, those are mostly clones and they probably replaced the LED with a different part. We have an "agreement" with some cloners and allow them to license the cams they make, however we can't control how they manf. the cams.

Edit: Actually some of our official distributors do sell on ebay and aliexpress, if you bought it from one of our distributors it should be genuine.
marvin
Posts: 5
Joined: Thu Oct 04, 2018 4:02 am

Re: LED Selection not working as doccumented

Postby marvin » Thu Oct 04, 2018 10:19 am

Firmware is 3.0.0
The ebay site is https://www.ebay.com.au/itm/OpenMV3-Cam ... 2749.l2649

Looks genuine, has your logo's all over it and says Built by MacroFab Made in the USA
It was shipped with an extremely high quality pink USB cable. In my experience cheap cloners use cheap cables.

It also has a table silk screened on the board which says LED1-4 are red,green,blue,IR. Which is the same as the documentation.
Still unusual that mine behaves the same as the guy on youtube, otherwise I would put this down to bad board.
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: LED Selection not working as doccumented

Postby kwagyeman » Thu Oct 04, 2018 10:29 am

Yeah, our silkscreen says made in MacroFab for an older board. Also, our boards aren't black. Um, so the LED we use has different configs which could have caused the pin swap. I.e. there are different variants of the LED with different colors for the same pin.

Anyway, if you buy another board the LED may change chanigng the color. Um, are you building a product? If not, just swap the pin numbers.
Nyamekye,
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: LED Selection not working as doccumented

Postby iabdalkader » Thu Oct 04, 2018 10:49 am

marvin wrote:
Thu Oct 04, 2018 10:19 am
Looks genuine, has your logo's all over it and says Built by MacroFab Made in the USA
Yes except for the solder mask color (we use red). Note we open-source all designs so anyone can make an exact replica. If the IDE says it's not registered it's definitely a clone and not licensed as well. If you can live with the swapped LEDs I think the cam should be fine, otherwise you should ask for a refund or report it to ebay.
marvin
Posts: 5
Joined: Thu Oct 04, 2018 4:02 am

Re: LED Selection not working as doccumented

Postby marvin » Thu Oct 04, 2018 11:27 am

Wow, I'll ask the supplier what's up.
Where do I find the registration status in the IDE? (I couldn't find it)

If it's simply they used the wrong LED I can live with that as it seems I really want a H7 having seen it's specs.
I can play with this until I get a H7

BTW I obtain a license key (The $15 thing) and it installed fine.
User avatar
iabdalkader
Posts: 918
Joined: Sun May 24, 2015 3:53 pm

Re: LED Selection not working as doccumented

Postby iabdalkader » Thu Oct 04, 2018 12:06 pm

marvin wrote:
Thu Oct 04, 2018 11:27 am
Wow, I'll ask the supplier what's up.
Where do I find the registration status in the IDE? (I couldn't find it)
BTW I obtain a license key (The $15 thing) and it installed fine.
That license key is the registration, the cloner should have registered the cams before selling them.
marvin
Posts: 5
Joined: Thu Oct 04, 2018 4:02 am

Re: LED Selection not working as doccumented

Postby marvin » Thu Oct 04, 2018 12:47 pm

FYI the iR leds work fine, only the blue doesn't.
I have written to the supplier and ask how i access the blue led :)

I think they put the wrong led on the board.
I have the circuit diagrams from github and will replace the led when i get motivated enough.

Wish me luck and thanks.
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: LED Selection not working as doccumented

Postby kwagyeman » Thu Oct 04, 2018 9:03 pm

Just swap the pin numbers you use to control the LEDs. The LEDs are 1, 2, and 3.
Nyamekye,
User avatar
kwiley
Posts: 107
Joined: Fri Dec 21, 2018 5:22 pm

Re: LED Selection not working as doccumented

Postby kwiley » Thu Jan 10, 2019 9:25 pm

I just received an M7 from Banggood and I'm having exactly the same problem. I think I have precisely the same product as the OP. I can see the IR leds illuminate, and red and green work (although they are tied to the wrong numbers in the code), and blue doesn't work at all.

BTW, mine has similar writing on the back (an LED name legend, a pin legend, the OpenMV logo, the openmv.io URL, a 10/15/2016 manufacture date) and "Made in USA, Build by MicroFab"

Sigh. I wonder if anything else about this board isn't going to work properly.).
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: LED Selection not working as doccumented

Postby kwagyeman » Thu Jan 10, 2019 11:05 pm

That's definitely a clone board if you bought it from Banggood.

Um, so, are you running the latest firmware? There was a swap a long time ago between the green and blue led pins that was fixed by a software update.
Nyamekye,
User avatar
kwiley
Posts: 107
Joined: Fri Dec 21, 2018 5:22 pm

Re: LED Selection not working as doccumented

Postby kwiley » Fri Jan 11, 2019 2:36 am

The first time I ran the IDE it immediately offered to update the firmware, so I presume it is fully updated now. How do I know which firmware the board currently has? I don't see anything relevant in the "intro" string when I open up a screen terminal to the MicroPython interpreter. It shows the MicroPython version (1.9.4) but not the board's firmware.

EDIT: I see that the bottom of the IDE displays a firmware version. It says "3.2.0 - [latest]", so that's gotta be the latest. :-D

So then, wouldn't you predict the LEDs to work properly with that software fix in place? I guess you're speculating that the third-party board is broken.

Thanks.
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: LED Selection not working as doccumented

Postby kwagyeman » Fri Jan 11, 2019 2:45 am

Well, our firmware definitely toggles the pins for all parts of the LED. The only thing I can guess is that the LED uses was the wrong type ending up with the anode/cathodes on the wrong pins. The LED we use is kinda tricky to get right. Our CM seems to find the right one however so we don't think about it too much.

If you run the led control example script that toggles through all states. If you don't see all the colors when that is running there's no way to produce what you want without changing the LED out. The one we use is here: https://www.digikey.com/product-detail/ ... ND/8828275. There's a bunch of variants of the LED however that look the same but have different anode/cathode configurations.

Anyway, it's just the RGB LED on the board. That not working right doesn't really invalidate the whole thing. I wouldn't be too sad.
Nyamekye,
User avatar
kwiley
Posts: 107
Joined: Fri Dec 21, 2018 5:22 pm

Re: LED Selection not working as doccumented

Postby kwiley » Fri Jan 11, 2019 2:51 am

No, I agree. I'm just a perfectionist, and it gave me some concern that other parts of the board might have problems too, but all the example scripts work like a charm so the critical features are all working flawlessly as far as I can tell.

Thanks. I regret missing the KS campaign. I was totally unaware of it. I see preorder options, but I'm not sure if that puts me way behind in the shipping schedule (or costs me some cheaper deal that may have been associated with the KS options). At any rate, I'll pick up an H7 as soon as possible and see how these cameras perform for me. I have loved working with the PyBoard and look forward to expanding my MicroPython projects into new realms.

Cheers!
User avatar
kotenok
Posts: 2
Joined: Sun Jan 06, 2019 7:24 am

Re: LED Selection not working as doccumented

Postby kotenok » Tue Jan 15, 2019 8:26 am

I also have a clone board. You don't ship to Russia, so I got my M7 from ali and bought a registration key for it. :|
To fix the led I swapped LED pins on the board:
  • unmount LED
  • unbend pins 3 & 4
  • mount LED to board using pins 1 & 2
  • pin 3 goes to Resistor
  • pin 4 goes to 3.3V
  • use smth to fix LED on board
Now it works as expected 8-)
Attachments
WIN_20190115_16_13_53_Pro.jpg
Swapped pins 3 & 4
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: LED Selection not working as doccumented

Postby kwagyeman » Tue Jan 15, 2019 11:53 pm

We are moving to a new shipping company before the end of the month! Then we can ship to Russia! The era of ShitBob is almost over. :)
Nyamekye,
User avatar
kwiley
Posts: 107
Joined: Fri Dec 21, 2018 5:22 pm

Re: LED Selection not working as doccumented

Postby kwiley » Thu Jan 17, 2019 2:54 pm

kotenok wrote:
Tue Jan 15, 2019 8:26 am
I also have a clone board. You don't ship to Russia, so I got my M7 from ali and bought a registration key for it. :|
To fix the led I swapped LED pins on the board:
  • unmount LED
  • unbend pins 3 & 4
  • mount LED to board using pins 1 & 2
  • pin 3 goes to Resistor
  • pin 4 goes to 3.3V
  • use smth to fix LED on board
Now it works as expected 8-)
Thanks! I might try that (potentially either biffing the LED or the entire board in the process).

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 8 guests