LED Selection not working as doccumented

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 OpenMV Review - Machine Vision Camera Module - YouTube (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

1 Like

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)

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.

Firmware is 3.0.0
The ebay site is Openmv3 Cam M7 Smart Camera Image Processing Color Recognitionl Inspection for sale online | eBay

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.

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.

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.

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.

That license key is the registration, the cloner should have registered the cams before selling them.

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 :slight_smile:

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.

Just swap the pin numbers you use to control the LEDs. The LEDs are 1, 2, and 3.

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.).

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.

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. :smiley:

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.

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/en/cree-inc/CLV1L-FKB-CHMMQDGBB7673673/CLV1L-FKB-CHMMQDGBB7673673CT-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.

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!

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. :neutral_face:
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 :sunglasses:
WIN_20190115_16_13_53_Pro.jpg

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. :slight_smile:

Thanks! I might try that (potentially either biffing the LED or the entire board in the process).