Backpack #1: OpenMV Camera
Intro: Backpack #1: OpenMV Camera
SPIKE Prime Backpacks are extensions for LEGO Education SPIKE Prime.
The Open MV camera is the brain for the Camera Backpack that allows you to integrate image processing and machine vision capabilities of the Open MV camera to LEGO SPIKE Prime.
We also have a Grove Sensor Backpack that allows you to connect cool sensors, a Pyboard Backpack that lets you connect to the WiFi, a Micro:bit Backpack that enables radio communication, and a Breadboard Backpack that you can use to prototype circuits.
STEP 1: Printing the Connector PCB
The Connector PCB will connect the OpenMV camera to the SPIKE Prime.
Go to the Google Drive folder and download "OpenMV v3 Manutacturing.fzz" file. There are many companies that can manufacture PCBs for you. Find the one that is nearby.
OR,
If you have access to a makerspace and you can use Desktop PCB Milling Machine by Bantam Tool download "OpenMV v2 Othermill.fzz" file and print them.
OR,
You can do it at your home. Follow the instructions here. https://www.instructables.com/id/DIY-PCB-Etching.... If you want to open the file go to and download/install Fritzing on your computer and open the design on your computer.
STEP 2: 3D Printing the Case
3D Print "backpack OpenMV lid v1.0.stl" and "backpack OpenMV v1.0.stl".
Our prints were made using Form 2 Printer. You may need to adjust the dimension based on your printer and you may need to sand down the sides to press fit.
STEP 3: Soldering Header Pins
Solder 2 - 1x8 Female header pins (long pins) to the OpenMV camera.
Also, solder 1x4 Female header pins and 1x8 Male 1.27 header pins to the Connector PCB.
STEP 4: Inserting Connector PCB Inside the Case
Secure the PCB inside the 3D printed case using M2 nuts and bolts.
STEP 5: Placing the OpenMV Inside the 3D Printed Case
Place the OpenMV camera over the connector PCB inside the case.
Close the 3D printed case with the 3D printed lid.
Note: Clip the long pins of the top four legs if they hit the bolt.
STEP 6: Connecting the Backpack to Distance Sensor Connector
Unscrew and take out the connector from the LEGO SPIKE Prime Distance Sensor and plug it to the backpack. The headers are small, so be careful while plugging it in.
STEP 7: Encasing the Backpack in Paper Cover
Download the paper cover design from our Google Drive Folder. Print it in color if have access to color printer. B/W printer will work as well.
If you have access to a laser cutter then use laser cutter to cut the design. If not, use scissors to cut them or use X-acto knives.
Fold them and wrap them around the 3D printed case. Use beams and pegs to secure the paper on the case.
19 Comments
mhelfman 1 year ago
mhelfman 2 years ago
99curiosity 1 year ago
where did you find the code?
thanks
silvia
mhelfman 1 year ago
As I mentioned in one of my comments, I discovered that they had posted the code for communicating between an OpenMV camera and a Spike Prime Hub about nine months ago. Up until then I had an OpenMV that was just sitting on the shelf gathering dust. Scroll all the way down to the end of the comments and click on the words "3 answers" and there'll be a link to the code. Make sure you scroll down past the list of Python programs to where it says: "LEGO Spike Prime Backpack examples" and read the instructions for the OpenMV camera and Spike Prime..
The examples don't include color tracking, but I can send it to you if you need it. Good Luck,
Marc
99curiosity 1 year ago
I hadn’t found this instructables, so I bought Anthony’s board, but I got the same problem for data transfer.
I found the code and will try it out. it would be great if you could send me the code for colour tracking.
thanks a lot, silvia
.
mhelfman 1 year ago
I can send the code in the next couple of days (OpenMV code for generating the tracking data & sending it the Spike Hub, Spike code to extract the data, & PID code to make use of the data to control the motors on the robot so it can track a colored object.
99curiosity 1 year ago
thanks !
looking forward to try it out
cheers
silvia
mhelfman 1 year ago
Marc
Mirkotrabb 1 year ago
I'm trying to run the openMV_SendNumbers_SPIKEcode.py program but I can't run it. How do you program the Spike in micropython?
Thanks
Mirko
mhelfman 1 year ago
When you say you can't run the program, do you mean you're getting an error message or that you're not able to do Python programming in the Spike Prime software? LEGO recently came out with a new version of the software (I believe it's version 3.0) which no longer includes the Python capability, so you'd have to go back to version 2.0 which I think is still available on the LEGO Spike website. On the other hand, if you're getting an error message, you'll need to delete line 15 of the Spike SendNumbers code: hub.port.B.device.mode(0). Hope this helps.
Marc
p.s. Just thought of something else.The software for LEGO Mindstorms Inventor (the retail version of Spike Prime) still has Python coding available. You should be able to find it online. It will work fine on your Spike Prime Hub. When you connect to your computer and launch the software, it will ask if you want to update the firmware. Click on ok and you should be good to go.
Mirkotrabb 1 year ago
Have a nice day!
Mirko
mhelfman 1 year ago
mhelfman 1 year ago
99curiosity 1 year ago
Till soon
mhelfman 2 years ago
hub.port.B.device.mode(0)
...it worked ok.
I noticed that on Anton's Mindstorms Hacks website, he used the same Spike code in a project of his and didn't include this line of code, so you may already be aware of this.
So now that I've gotten everything working, I was wondering if there is anyway to increase the data transfer rate from the OpenMV to the Spike Hub. WIth the current setup, I could only get about five 8 bit values per second into the Spike Hub.
Thanks for posting the code for this project and hope others are benefiting from it as well.
Marc Helfman
Kenwood, CA
mhelfman 4 years ago
Honeydew Robotics 3 years ago
https://github.com/ceeoinnovations/SPIKEPrimeBackp...
Regards,
mhelfman 2 years ago
hub.port.B.device.mode(0)
...it worked ok.
I noticed that on Anton's Mindstorms Hacks website, he used the same Spike code in a project of his and didn't include this line of code, so you may already be aware of this.
So now that I've gotten everything working, I was wondering if there is anyway to increase the data transfer rate from the OpenMV to the Spike Hub. WIth the current setup, I could only get about five 8 bit values per second into the Spike Hub.
Thanks for posting the code for this project and hope others are benefiting from it as well.
Marc Helfman
Kenwood, CA
CEEOInnovations 4 years ago