formated and lint markdown files

This commit is contained in:
Sebastian Wendel 2022-11-03 14:16:53 +01:00
parent d7d3f505fd
commit 4ceb720d4d
No known key found for this signature in database
GPG key ID: 1422B7DF78144640
20 changed files with 401 additions and 250 deletions

View file

@ -4,38 +4,40 @@
![Plankton collage](docs/readme/plankton_collage.webp) ![Plankton collage](docs/readme/plankton_collage.webp)
## What is this?
# What is this?
The PlanktoScope is an open-source, affordable imaging platform for citizen oceanography. It's built around a Raspberry Pi, a couple of HATs, some stepper motors and a few centimeters of silicon tubes. Its cost is at about $500 in parts. The PlanktoScope is an open-source, affordable imaging platform for citizen oceanography. It's built around a Raspberry Pi, a couple of HATs, some stepper motors and a few centimeters of silicon tubes. Its cost is at about $500 in parts.
The goal of the PlanktoScope is to allow citizen to engage in scientific programs, either at sea or onshore. You can use the PlanktoScope to image the different species of Plankton living in a body of water. The goal of the PlanktoScope is to allow citizen to engage in scientific programs, either at sea or onshore. You can use the PlanktoScope to image the different species of Plankton living in a body of water.
## Get the papers
## Get the papers!
The PlanktoScope has been described in a paper available on the [bioRxiv preprint server](https://www.biorxiv.org/content/10.1101/2020.04.23.056978v1). The first results of this program and its outline are also available as a [preprint](https://www.biorxiv.org/content/10.1101/2020.08.31.263442v1). The PlanktoScope has been described in a paper available on the [bioRxiv preprint server](https://www.biorxiv.org/content/10.1101/2020.04.23.056978v1). The first results of this program and its outline are also available as a [preprint](https://www.biorxiv.org/content/10.1101/2020.08.31.263442v1).
| [![PlanktoScope Preprint](docs/readme/planktoscope_pub.webp)](https://www.biorxiv.org/content/10.1101/2020.04.23.056978v1) | [![PlanktonPlanet Preprint](docs/readme/planktonplanet_pub.webp)](https://www.biorxiv.org/content/10.1101/2020.08.31.263442v1) | | [![PlanktoScope Preprint](docs/readme/planktoscope_pub.webp)](https://www.biorxiv.org/content/10.1101/2020.04.23.056978v1) | [![PlanktonPlanet Preprint](docs/readme/planktonplanet_pub.webp)](https://www.biorxiv.org/content/10.1101/2020.08.31.263442v1) |
|--------|--------| | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
## Key Features
# Key Features
- Image small animals and algae living in water - Image small animals and algae living in water
- Focus stage control - Focus stage control
- Pump control - Pump control
- Automatic image capture - Automatic image capture
- Automatic segmentation - Automatic segmentation
# How do I build one? ## How do I build one?
You can access the complete documentation on [Read The Docs](https://planktonscope.readthedocs.io/). You can access the complete documentation on [Read The Docs](https://planktonscope.readthedocs.io/).
# How do I get involved? ## How do I get involved?
There are several ways to join the development effort, share your progress with your build or just ask for help. There are several ways to join the development effort, share your progress with your build or just ask for help.
We are using slack as a communication platform between interested parties. You can [request to join by filling this form](https://docs.google.com/forms/d/e/1FAIpQLSfcod-avpzWVmWj42_hW1v2mMSHm0DAGXHxVECFig2dnKHxGQ/viewform). We are using slack as a communication platform between interested parties. You can [request to join by filling this form](https://docs.google.com/forms/d/e/1FAIpQLSfcod-avpzWVmWj42_hW1v2mMSHm0DAGXHxVECFig2dnKHxGQ/viewform).
This repository is also a good way to get involved. Please fill in an issue if you witnessed a bug in the software or hardware. If you are able, you can also join the development effort. Look through the [issues opened](https://github.com/PlanktonPlanet/PlanktoScope/labels/good%20first%20issue) and choose one that piques your interest. Let us know you want to work on it in the comments, we may even be able to guide your beginnings around the code. This repository is also a good way to get involved. Please fill in an issue if you witnessed a bug in the software or hardware. If you are able, you can also join the development effort. Look through the [issues opened](https://github.com/PlanktonPlanet/PlanktoScope/labels/good%20first%20issue) and choose one that piques your interest. Let us know you want to work on it in the comments, we may even be able to guide your beginnings around the code.
# License: Our work is fully open source ## License: Our work is fully open source
Depending on the material they cover, different licenses apply to the files of this repository. Depending on the material they cover, different licenses apply to the files of this repository.
@ -44,10 +46,13 @@ If you make any change for your use, please fork this repository and publish you
Also, all licenses are contaminating, if you want to use any of this material for a project that you cannot open-source, please contact us using Slack so we can see what can be done to help you and your project. Also, all licenses are contaminating, if you want to use any of this material for a project that you cannot open-source, please contact us using Slack so we can see what can be done to help you and your project.
## Hardware files ## Hardware files
All hardware files and documentation (everything in the `hardware` directory) is released under a [CERN-OHL-S-2.0 license](https://ohwr.org/cern_ohl_s_v2.txt). All hardware files and documentation (everything in the `hardware` directory) is released under a [CERN-OHL-S-2.0 license](https://ohwr.org/cern_ohl_s_v2.txt).
## Software source ## Software source
The source code (everything in the directories `flows` and `scripts`) is released under a [GPL-3.0 license](https://www.gnu.org/licenses/gpl-3.0.en.html). The source code (everything in the directories `flows` and `scripts`) is released under a [GPL-3.0 license](https://www.gnu.org/licenses/gpl-3.0.en.html).
## Everything else (documentation, pictures, etc...) ## Everything else (documentation, pictures, etc...)
Everything else is released under a [Creative Commons CC-BY-SA license](https://creativecommons.org/licenses/by-sa/4.0/). Everything else is released under a [Creative Commons CC-BY-SA license](https://creativecommons.org/licenses/by-sa/4.0/).

View file

@ -10,24 +10,30 @@ You can find here more information about how to build your own PlanktoScope.
- [How to setup your PlanktoScope the hard way (also known as the Expert's path)](expert_setup.md) - [How to setup your PlanktoScope the hard way (also known as the Expert's path)](expert_setup.md)
- [Some information about how to setup a remote access](remote_access.md) - [Some information about how to setup a remote access](remote_access.md)
## Build your machine! ## Build your machine
- [Assembly Guide](assembly_guide.md) - [Assembly Guide](assembly_guide.md)
## Usage ## Usage
- [Information about collection devices](collection_devices.md) - [Information about collection devices](collection_devices.md)
## Under the hood: ## Under the hood
- [Software architecture](software_architecture.md) - [Software architecture](software_architecture.md)
- [MQTT Messages](mqtt_messages.md) - [MQTT Messages](mqtt_messages.md)
- [Create Master SD Card or backup your PlanktoScope](create_sd.md) - [Create Master SD Card or backup your PlanktoScope](create_sd.md)
- How does the segmentation works (soon) - How does the segmentation works (soon)
## Changelog ## Changelog
- [Changelog](changelog.md) - [Changelog](changelog.md)
## Contribute ## Contribute
- [Find out how to contribute to this documentation and help edit it](edit_this_doc.md) - [Find out how to contribute to this documentation and help edit it](edit_this_doc.md)
- [Contribute to the code, here is the getting started](edit_the_code.md) - [Contribute to the code, here is the getting started](edit_the_code.md)
## License of our work ## License of our work
- [More information about the licenses that we use](license.md) - [More information about the licenses that we use](license.md)

View file

@ -1,4 +1,5 @@
# Assembly guide of the PlanktoScope # Assembly guide of the PlanktoScope
![Complete](assembly_guide/pictures/complete.webp) ![Complete](assembly_guide/pictures/complete.webp)
## Step 0: Gather everything you need ## Step 0: Gather everything you need
@ -23,6 +24,7 @@ If you are not familiar with any process, such as soldering, tapping, or wiring,
Soldering deals with high heat and potentially toxic materials, so make sure to use the proper precautions. Soldering deals with high heat and potentially toxic materials, so make sure to use the proper precautions.
## Step 1: Laser cutting ## Step 1: Laser cutting
![Step1](assembly_guide/pictures/step1.webp) ![Step1](assembly_guide/pictures/step1.webp)
Laser cut all components using the .ai file ensuring all cuts are complete. The current design should have a 5mm material thickness. Start by placing laser cut base A on a flat workspace. Make sure all holes are complete, and negative space is clear. Laser cut all components using the .ai file ensuring all cuts are complete. The current design should have a 5mm material thickness. Start by placing laser cut base A on a flat workspace. Make sure all holes are complete, and negative space is clear.
@ -31,6 +33,7 @@ Laser cut all components using the .ai file ensuring all cuts are complete. The
If you are doing the laser cutting yourself, please take the time to check the calibration of the machine and its power output for the material you are using. A tight fit is needed between the different plates to avoid unwanted play between critical parts. If you are doing the laser cutting yourself, please take the time to check the calibration of the machine and its power output for the material you are using. A tight fit is needed between the different plates to avoid unwanted play between critical parts.
## Step 2: Standoff installation ## Step 2: Standoff installation
![Step2](assembly_guide/pictures/step2.webp) ![Step2](assembly_guide/pictures/step2.webp)
![Step2 standoff location](assembly_guide/render/Step2.webp) ![Step2 standoff location](assembly_guide/render/Step2.webp)
@ -39,6 +42,7 @@ Place 8 standoffs (M2.5 6mm) into the designated holes on the laser-cut base A.
![Step3](assembly_guide/pictures/step3.webp) ![Step3](assembly_guide/pictures/step3.webp)
## Step 3: Motor HAT preparation ## Step 3: Motor HAT preparation
![Step4](assembly_guide/pictures/step4.webp) ![Step4](assembly_guide/pictures/step4.webp)
Insert and solder the terminal blocks and headers onto the motor driver PCB. Insert and solder the terminal blocks and headers onto the motor driver PCB.
@ -48,6 +52,7 @@ Insert and solder the terminal blocks and headers onto the motor driver PCB.
Place the motor driver PCB on to the indicated standoffs. Place the motor driver PCB on to the indicated standoffs.
## Step 4: Magnets setup ## Step 4: Magnets setup
![Step6](assembly_guide/pictures/step6.webp) ![Step6](assembly_guide/pictures/step6.webp)
Now is a good time to think about how the magnets will function within the microscope. The magnets in the sample stage will need to attract to the magnets on the flow cell holder. The magnets in the objective holder will need to attract the magnets on the mount. Keep this in mind as you are adding your magnets and tapping your respective M12 holders so your orientation will be correct. Now is a good time to think about how the magnets will function within the microscope. The magnets in the sample stage will need to attract to the magnets on the flow cell holder. The magnets in the objective holder will need to attract the magnets on the mount. Keep this in mind as you are adding your magnets and tapping your respective M12 holders so your orientation will be correct.
@ -58,6 +63,7 @@ You can now fix your magnets into their appropriate holes on sample stage **B**.
It is recommended to glue the magnets in place. If the magnets are too large to fit in, the holes can be widened with a handheld drill. However, they should be quite snug in place. Before you glue them in place make sure that the polarity is maintained, as they will be impossible to remove after gluing. It is recommended to glue the magnets in place. If the magnets are too large to fit in, the holes can be widened with a handheld drill. However, they should be quite snug in place. Before you glue them in place make sure that the polarity is maintained, as they will be impossible to remove after gluing.
## Step 5: Sample stage assembly ## Step 5: Sample stage assembly
![Step9](assembly_guide/pictures/step9.webp) ![Step9](assembly_guide/pictures/step9.webp)
Dont be alarmed by the color swap, this is the sample stage **B**. You can now fit the pegs on the driver mounts into the corresponding holes on the sample stage. They should be glued in place with superglue or epoxy. You can spin the shaft to align the driver mounts on the 2 steppers if it helps making the process easier. Dont be alarmed by the color swap, this is the sample stage **B**. You can now fit the pegs on the driver mounts into the corresponding holes on the sample stage. They should be glued in place with superglue or epoxy. You can spin the shaft to align the driver mounts on the 2 steppers if it helps making the process easier.
@ -67,6 +73,7 @@ Dont be alarmed by the color swap, this is the sample stage **B**. You can no
You should now have a sample stage and motor assembly that looks like this. You should now have a sample stage and motor assembly that looks like this.
## Step 6: Lenses tapping and mounting ## Step 6: Lenses tapping and mounting
![Step12](assembly_guide/pictures/step12.webp) ![Step12](assembly_guide/pictures/step12.webp)
You now need to tap the holes for the M12 lenses in stage and mount **M** and **D**. It is helpful for alignment to do both the objeDtive and tube lens mount together. It is important to do this as straight as possible. A drop of mineral or olive oil can help the process. Be careful to use a right-hand tap (that goes down when turning clockwise). You now need to tap the holes for the M12 lenses in stage and mount **M** and **D**. It is helpful for alignment to do both the objeDtive and tube lens mount together. It is important to do this as straight as possible. A drop of mineral or olive oil can help the process. Be careful to use a right-hand tap (that goes down when turning clockwise).
@ -80,16 +87,19 @@ You can now screw the objective lens (the 25mm one) in part **D**.
![Step14](assembly_guide/pictures/step15.webp) ![Step14](assembly_guide/pictures/step15.webp)
## Step 7: Camera preparation ## Step 7: Camera preparation
You can now unscrew the lens from the Pi camera, being careful not to disturb the sensor below. You can now unscrew the lens from the Pi camera, being careful not to disturb the sensor below.
![Image22](assembly_guide/pictures/image22.webp) ![Image22](assembly_guide/pictures/image22.webp)
![Image30](assembly_guide/pictures/image30.webp) ![Image30](assembly_guide/pictures/image30.webp)
## Step 8: Camera mount ## Step 8: Camera mount
![Step17](assembly_guide/pictures/step17.webp) ![Step17](assembly_guide/pictures/step17.webp)
You can mount the camera using the appropriate holes on the camera mount **G**. Be careful to avoid getting oil or dust on the sensor. You can mount the camera using the appropriate holes on the camera mount **G**. Be careful to avoid getting oil or dust on the sensor.
## Step 9: LED preparation ## Step 9: LED preparation
![Step18](assembly_guide/pictures/step18.webp) ![Step18](assembly_guide/pictures/step18.webp)
The LED can then be wired up and put into its mount **F**. If you wire the LED yourself, remember to give enough length to reach the motor driver on the other end of the microscope. You can also add a bit of glue to fix **F** to the motor mount **E** at this time to make assembly easier, though it is not required. The LED can then be wired up and put into its mount **F**. If you wire the LED yourself, remember to give enough length to reach the motor driver on the other end of the microscope. You can also add a bit of glue to fix **F** to the motor mount **E** at this time to make assembly easier, though it is not required.
@ -99,8 +109,8 @@ The LED can then be wired up and put into its mount **F**. If you wire the LED y
This picture shows the correct wiring for the LED. Please make sure the red wire is on the long pin of the LED. This picture shows the correct wiring for the LED. Please make sure the red wire is on the long pin of the LED.
## Step 10: Vertical slices assembly ## Step 10: Vertical slices assembly
You can now start placing the motor mount/LED assembly- **B**, You can now start placing the motor mount/LED assembly- **B**,
![Step5](assembly_guide/render/step5.webp) ![Step5](assembly_guide/render/step5.webp)
@ -119,6 +129,7 @@ You can now start placing the motor mount/LED assembly- **B**,
and **G** into the base **A**. and **G** into the base **A**.
## Step 11: Pump setup ## Step 11: Pump setup
The pump can then be mounted in place on **H**. Thread the wires through the hole with the pump tubing pointed toward the holes on the mount. The pump can then be mounted in place on **H**. Thread the wires through the hole with the pump tubing pointed toward the holes on the mount.
![Step19](assembly_guide/pictures/step19.webp) ![Step19](assembly_guide/pictures/step19.webp)
@ -126,6 +137,7 @@ Fix the pump in place.
![Step20](assembly_guide/pictures/step20.webp) ![Step20](assembly_guide/pictures/step20.webp)
## Step 12: Pump mounting ## Step 12: Pump mounting
You can now mount the pump on base **A**. You can now mount the pump on base **A**.
![Step15](assembly_guide/render/step15.webp) ![Step15](assembly_guide/render/step15.webp)
@ -134,6 +146,7 @@ Your setup should look like this. Don't worry about the wiring, we'll have a loo
![Step21](assembly_guide/pictures/step21.webp) ![Step21](assembly_guide/pictures/step21.webp)
## Step 13: Motor HAT wiring ## Step 13: Motor HAT wiring
![Step22](assembly_guide/pictures/step22.svg) ![Step22](assembly_guide/pictures/step22.svg)
You will now want to wire the steppers and pump to the terminals on the motor driver board. You will now want to wire the steppers and pump to the terminals on the motor driver board.
@ -143,7 +156,6 @@ You will now want to wire the steppers and pump to the terminals on the motor dr
You can find more information about stepper motors and how they work in this [document](http://resources.linengineering.com/acton/attachment/3791/f-00ca/1/-/-/-/-/Stepper%20Motor%20Basics.pdf). You can find more information about stepper motors and how they work in this [document](http://resources.linengineering.com/acton/attachment/3791/f-00ca/1/-/-/-/-/Stepper%20Motor%20Basics.pdf).
!!! tip !!! tip
If your wires are too short, you can invert the pump and the focus wiring. However, you will have to remember to change the configuration later on. If your wires are too short, you can invert the pump and the focus wiring. However, you will have to remember to change the configuration later on.
@ -151,6 +163,7 @@ You will now want to wire the steppers and pump to the terminals on the motor dr
Make sure the wires are properly connected by pulling on them a little. They should not come loose. Make sure the wires are properly connected by pulling on them a little. They should not come loose.
## Step 14: Raspberry Pi setup and installation ## Step 14: Raspberry Pi setup and installation
![Step24](assembly_guide/pictures/step24.webp) ![Step24](assembly_guide/pictures/step24.webp)
At this point, you can insert your flashed SD card into your Raspberry Pi. [Consult the guide for flashing your SD card](https://www.planktoscope.org/replicate/assemble-your-kit) before you do this. The heat sink can also be added to the processor. At this point, you can insert your flashed SD card into your Raspberry Pi. [Consult the guide for flashing your SD card](https://www.planktoscope.org/replicate/assemble-your-kit) before you do this. The heat sink can also be added to the processor.
@ -163,6 +176,7 @@ At this point, you can insert your flashed SD card into your Raspberry Pi. [Cons
Mount the Raspberry Pi containing the flashed SD card on the standoffs attached to the laser cut base A. Mount the Raspberry Pi containing the flashed SD card on the standoffs attached to the laser cut base A.
## Step 15: Standoffs ## Step 15: Standoffs
![Step17](assembly_guide/render/step17.webp) ![Step17](assembly_guide/render/step17.webp)
Add 8 standoffs (M2.5 15mm) to fix the motor driver board and the Raspberry Pi to the base. Add 8 standoffs (M2.5 15mm) to fix the motor driver board and the Raspberry Pi to the base.
@ -170,11 +184,13 @@ Add 8 standoffs (M2.5 15mm) to fix the motor driver board and the Raspberry Pi t
![Step25](assembly_guide/pictures/step25.webp) ![Step25](assembly_guide/pictures/step25.webp)
## Step 16: Camera flex cable ## Step 16: Camera flex cable
![Step26](assembly_guide/pictures/step26.webp) ![Step26](assembly_guide/pictures/step26.webp)
At this point you can use the Pi camera flex cable to connect the camera to the Pi. This is done by gently pulling up the tensioners, inserting the cable in the right orientation, then pushing the tensioners back in place to set the cable. Try not to kink or fold the flex cable too much as it is possible to damage it. At this point you can use the Pi camera flex cable to connect the camera to the Pi. This is done by gently pulling up the tensioners, inserting the cable in the right orientation, then pushing the tensioners back in place to set the cable. Try not to kink or fold the flex cable too much as it is possible to damage it.
## Step 17: Power supply wiring ## Step 17: Power supply wiring
![Step29](assembly_guide/pictures/step29.webp) ![Step29](assembly_guide/pictures/step29.webp)
The power wires can be wired into place on the motor driver board. The power wires can be wired into place on the motor driver board.
@ -183,16 +199,19 @@ The power wires can be wired into place on the motor driver board.
Make sure the wires are properly connected by pulling on them a little. They should not come loose. Make sure the wires are properly connected by pulling on them a little. They should not come loose.
## Step 18: Prepare the GPS HAT ## Step 18: Prepare the GPS HAT
![Step18-1](assembly_guide/render/step18-1.webp) ![Step18-1](assembly_guide/render/step18-1.webp)
Insert the battery to power the GPS HAT and solder the terminal mounts in place. Insert the battery to power the GPS HAT and solder the terminal mounts in place.
## Step 19: Install the GPS HAT ## Step 19: Install the GPS HAT
![Step18](assembly_guide/render/step18.webp) ![Step18](assembly_guide/render/step18.webp)
Mount the GPS HAT over the motor driver PCB using the standoffs attached to the laser cut base **A**. Mount the GPS HAT over the motor driver PCB using the standoffs attached to the laser cut base **A**.
## Step 20: Install the Fan HAT ## Step 20: Install the Fan HAT
![Step19](assembly_guide/render/step19.webp) ![Step19](assembly_guide/render/step19.webp)
Place the cooling fan HAT above the Raspberry Pi by mounting it to the standoffs on base **A**. Place the cooling fan HAT above the Raspberry Pi by mounting it to the standoffs on base **A**.
@ -201,21 +220,25 @@ Place the cooling fan HAT above the Raspberry Pi by mounting it to the standoffs
Be careful to slide the camera flat cable in the slot in the HAT above the connector. Be careful to slide the camera flat cable in the slot in the HAT above the connector.
## Step 21: Secure the HATS ## Step 21: Secure the HATS
![Step20](assembly_guide/render/step20.webp) ![Step20](assembly_guide/render/step20.webp)
Secure the cooling fan HAT and GPS HAT by tightening the 8 screws to the standoffs on base A Secure the cooling fan HAT and GPS HAT by tightening the 8 screws to the standoffs on base A
## Step 22: Install back panel ## Step 22: Install back panel
![Step21](assembly_guide/render/step21.webp) ![Step21](assembly_guide/render/step21.webp)
Insert the laser cut border **I** into base **A**. Insert the laser cut border **I** into base **A**.
## Step 23: GPS output connector ## Step 23: GPS output connector
![Step22](assembly_guide/render/step22.webp) ![Step22](assembly_guide/render/step22.webp)
Insert the power and GPS connectors into side plate **J**. Insert the power and GPS connectors into side plate **J**.
## Step 24: Install side panel ## Step 24: Install side panel
![Step23](assembly_guide/render/step23.webp) ![Step23](assembly_guide/render/step23.webp)
Place the side plate **J** into the designated slots on the base. You can connect the GPS cable to its connector on the board. Place the side plate **J** into the designated slots on the base. You can connect the GPS cable to its connector on the board.
@ -224,16 +247,19 @@ Place the side plate **J** into the designated slots on the base. You can connec
The GPS connector is quite fragile, make sure to align it properly before inserting it. The GPS connector is quite fragile, make sure to align it properly before inserting it.
## Step 25: Install the other side panel ## Step 25: Install the other side panel
![Step25](assembly_guide/render/step25.webp) ![Step25](assembly_guide/render/step25.webp)
Mount the side plate **K** on base **A** using the assigned slots. Mount the side plate **K** on base **A** using the assigned slots.
## Step 26: Secure the sides together ## Step 26: Secure the sides together
![Step26](assembly_guide/render/step26.webp) ![Step26](assembly_guide/render/step26.webp)
Secure the laser cut sides with the screws and nuts. Secure the laser cut sides with the screws and nuts.
## Step 27: Secure the sides to the base plate ## Step 27: Secure the sides to the base plate
![Step27](assembly_guide/render/step27.webp) ![Step27](assembly_guide/render/step27.webp)
Secure the laser cut sides to the base plate **A** with the screws and nuts. Secure the laser cut sides to the base plate **A** with the screws and nuts.
@ -242,11 +268,13 @@ Secure the laser cut sides to the base plate **A** with the screws and nuts.
To make this easier, you can turn the assembly upside down or on its side. Be careful when doing so as the plates may fall. To make this easier, you can turn the assembly upside down or on its side. Be careful when doing so as the plates may fall.
## Step 28: Insert the camera ribbon cable in the camera ## Step 28: Insert the camera ribbon cable in the camera
![Step28](assembly_guide/pictures/step28.webp) ![Step28](assembly_guide/pictures/step28.webp)
You can now connect the camera flex cable into the connector on the camera board. Once again, gently pull up the tensioners, insert the cable in the right orientation, and push the tensioners back in place to set the cable. Try not to kink or fold the flex cable too much as it is possible to damage it. You can now connect the camera flex cable into the connector on the camera board. Once again, gently pull up the tensioners, insert the cable in the right orientation, and push the tensioners back in place to set the cable. Try not to kink or fold the flex cable too much as it is possible to damage it.
## Step 29: Assemble the GPIO ribbon cable ## Step 29: Assemble the GPIO ribbon cable
If you didn't get an already assembled ribbon cable, you need to build it yourself. If you didn't get an already assembled ribbon cable, you need to build it yourself.
The orientation of the connector does not really matter. However, you need to make sure that both connectors are oriented in the same direction and are on the same side of the ribbon. The orientation of the connector does not really matter. However, you need to make sure that both connectors are oriented in the same direction and are on the same side of the ribbon.
@ -260,8 +288,8 @@ To assemble, slide the ribbon in its connector and close it off. You need to tig
It should rather look like this: It should rather look like this:
![Ribbon good](assembly_guide/pictures/ribbon_good.webp) ![Ribbon good](assembly_guide/pictures/ribbon_good.webp)
## Step 30: Insert the ribbon cable ## Step 30: Insert the ribbon cable
![Step28](assembly_guide/render/step28.webp) ![Step28](assembly_guide/render/step28.webp)
Attach the GPIO ribbon to connect the cooling fan HAT to the GPS HAT. Attach the GPIO ribbon to connect the cooling fan HAT to the GPS HAT.
@ -271,6 +299,7 @@ Attach the GPIO ribbon to connect the cooling fan HAT to the GPS HAT.
![Step31](assembly_guide/pictures/step31.webp) ![Step31](assembly_guide/pictures/step31.webp)
## Step 31: Fluidic assembly ## Step 31: Fluidic assembly
![Step29](assembly_guide/render/step29.webp) ![Step29](assembly_guide/render/step29.webp)
Feed in the tubing from syringe 1 to form the fluidic path as shown. Feed in the tubing from syringe 1 to form the fluidic path as shown.
@ -296,7 +325,7 @@ Place the top **L** into the slots on the PlanktoScope body. Secure it in place
![Step34](assembly_guide/render/step34.webp) ![Step34](assembly_guide/render/step34.webp)
## Step 33: Enjoy! ## Step 33: Enjoy
Congratulations on a job well done. You can have some rest, get a tea and some biscuits! Congratulations on a job well done. You can have some rest, get a tea and some biscuits!
@ -305,4 +334,5 @@ Congratulations on a job well done. You can have some rest, get a tea and some b
You can now plug the machine in and test it. If you have choose the Expert's path, now is a good time to [finish setting up your machine](expert_setup.md). You can now plug the machine in and test it. If you have choose the Expert's path, now is a good time to [finish setting up your machine](expert_setup.md).
## Step 34: Read the getting started guide ## Step 34: Read the getting started guide
[A guide to get started with your machine use is available!](getting_started.md) [A guide to get started with your machine use is available!](getting_started.md)

View file

@ -3,25 +3,23 @@
## Image changelog ## Image changelog
### V2.2.1: released 2021-05-11 ### V2.2.1: released 2021-05-11
Bugfix: Bugfix:
- Package update to fix an issue were newer boards would not get recognised properly, leading to an early crash of the python script. - Package update to fix an issue were newer boards would not get recognised properly, leading to an early crash of the python script.
Improvement: Improvement:
- Addition of a small menu to switch branches of the software. This is going to be of use mainly to developers. - Addition of a small menu to switch branches of the software. This is going to be of use mainly to developers.
**[Image download link](https://drive.google.com/file/d/1y0k_NDXN0yT5caZrXhjLYXgQVxu-D5ql/view?usp=sharing)** **[Image download link](https://drive.google.com/file/d/1y0k_NDXN0yT5caZrXhjLYXgQVxu-D5ql/view?usp=sharing)**
### V2.2: released 2021-01-15 ### V2.2: released 2021-01-15
Breaking changes: Breaking changes:
- new UI: more intuitive and more complete, with data validations checks and helpful tooltips - new UI: more intuitive and more complete, with data validations checks and helpful tooltips
Improvements: Improvements:
- Random camera crash solved: instead of using the python picamera library, we now use a compiled binary, `raspimjpeg` (whose source code is [here](https://github.com/PlanktonPlanet/userland/tree/master/host_applications/linux/apps/raspicam)). It's controlled through a FIFO pipe. - Random camera crash solved: instead of using the python picamera library, we now use a compiled binary, `raspimjpeg` (whose source code is [here](https://github.com/PlanktonPlanet/userland/tree/master/host_applications/linux/apps/raspicam)). It's controlled through a FIFO pipe.
@ -34,16 +32,14 @@ Improvements:
- Wifi configuration tab: you can configure the Wifi network you want the machine to connect to. - Wifi configuration tab: you can configure the Wifi network you want the machine to connect to.
- Hardware configuration tab: to customize the settings dependind on the hardware you use, (pump steps per mL, stepper driver type). - Hardware configuration tab: to customize the settings dependind on the hardware you use, (pump steps per mL, stepper driver type).
Probably broken: Probably broken:
- Embedded segmentation: it's been a while since we touched it. It should still be working, but you may experience bugs with it... If that's the case, please come forward so we can help solve those before the next release! - Embedded segmentation: it's been a while since we touched it. It should still be working, but you may experience bugs with it... If that's the case, please come forward so we can help solve those before the next release!
**[Image download link](https://drive.google.com/file/d/1fht8r7P6_bVsfIIwo7wnGLQ_1uxWCnos/view?usp=sharing)** **[Image download link](https://drive.google.com/file/d/1fht8r7P6_bVsfIIwo7wnGLQ_1uxWCnos/view?usp=sharing)**
### V2.1: released 2020-10-14 ### V2.1: released 2020-10-14
Breaking changes firsts: Breaking changes firsts:
- There is no GUI on this image, it was created based on the Raspberry OS Lite, so no GUI. A new non-lite version is expected for late next week. - There is no GUI on this image, it was created based on the Raspberry OS Lite, so no GUI. A new non-lite version is expected for late next week.
@ -51,12 +47,10 @@ Breaking changes firsts:
- The default user is `pi` and the default password is `copepode` for this user. - The default user is `pi` and the default password is `copepode` for this user.
- The images captured and the segmentation output is now in the folder `/home/pi/data` - The images captured and the segmentation output is now in the folder `/home/pi/data`
Improvements: Improvements:
- Under the hood, whole new code is running! There is still a small bug that is triggered when running long imaging sequences, if this happens, restart the machine! We are working on finding where the problem may comes from. This bug is chased here. - Under the hood, whole new code is running! There is still a small bug that is triggered when running long imaging sequences, if this happens, restart the machine! We are working on finding where the problem may comes from. This bug is chased here.
- Another change: automatic wifi setup! If you setup your Raspberry to connect to a wifi network (by configuring wpa_supplicant.conf) it will try to connect to this network before starting its hotspot. Also, if you connect it to a wired network via its Ethernet port, it will share this connection to devices connected to the hotspot! - Another change: automatic wifi setup! If you setup your Raspberry to connect to a wifi network (by configuring wpa_supplicant.conf) it will try to connect to this network before starting its hotspot. Also, if you connect it to a wired network via its Ethernet port, it will share this connection to devices connected to the hotspot!
- The documentation has been updated to include more information about the ribbon assembly and how to create a backup of your sd card! - The documentation has been updated to include more information about the ribbon assembly and how to create a backup of your sd card!
**[Image download link](https://drive.google.com/file/d/1zOmbmXqt5uELQC0FTha1ndjJyMvehGSk/view?usp=sharing)** **[Image download link](https://drive.google.com/file/d/1zOmbmXqt5uELQC0FTha1ndjJyMvehGSk/view?usp=sharing)**

View file

@ -5,16 +5,17 @@ If you want to backup your machine, or prepare an image from the golden machine
!!! tip !!! tip
The golden machine is the machine on which the setup is made. Everything is prepared according to your needs. Once it's ready, you just cleanly shut it down, pop the SD card out, and copy it to share the love! The golden machine is the machine on which the setup is made. Everything is prepared according to your needs. Once it's ready, you just cleanly shut it down, pop the SD card out, and copy it to share the love!
Everything in this guide is written by using a Linux computer in which the sdcard is inserted. Everything in this guide is written by using a Linux computer in which the sdcard is inserted.
## Find and unmount your sd card ## Find and unmount your sd card
Firsts things firsts, we need to know where is our sdcard in the linux filesystem. Firsts things firsts, we need to know where is our sdcard in the linux filesystem.
To find the device, open a terminal and type in `sudo fdisk -l`. To find the device, open a terminal and type in `sudo fdisk -l`.
In the output, there will be a section looking like this: In the output, there will be a section looking like this:
```
```txt
Disk /dev/mmcblk0: 58.29 GiB, 62587404288 bytes, 122241024 sectors Disk /dev/mmcblk0: 58.29 GiB, 62587404288 bytes, 122241024 sectors
Units: sectors of 1 * 512 = 512 bytes Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes
@ -30,7 +31,8 @@ We are now going to make sure the device is not mounted on your system (some OSe
Simply type `sudo umount /dev/mmcblk0p1` and `sudo umount /dev/mmcblk0p2` to unmount the disk. Simply type `sudo umount /dev/mmcblk0p1` and `sudo umount /dev/mmcblk0p2` to unmount the disk.
If the devices were not mounted, you may see an error message that you can ignore. The message looks like this: If the devices were not mounted, you may see an error message that you can ignore. The message looks like this:
```
```txt
umount: /dev/mmcblk0p2: not mounted. umount: /dev/mmcblk0p2: not mounted.
``` ```
@ -39,6 +41,7 @@ umount: /dev/mmcblk0p2: not mounted.
Choose and navigate to an appropriate directory on your computer. Choose and navigate to an appropriate directory on your computer.
We are going to use `dd` to copy the sdcard. The command to type is the following: We are going to use `dd` to copy the sdcard. The command to type is the following:
```sh ```sh
sudo dd if=/dev/mmcblk0 of=planktoscopeimage.img bs=4M status=progress sudo dd if=/dev/mmcblk0 of=planktoscopeimage.img bs=4M status=progress
``` ```
@ -48,14 +51,13 @@ sudo dd if=/dev/mmcblk0 of=planktoscopeimage.img bs=4M status=progress
- `bs`: chooses a block size of 4M, this helps to speeds up the copy - `bs`: chooses a block size of 4M, this helps to speeds up the copy
- `status`: just display a progression of the copy - `status`: just display a progression of the copy
The copy may take more than 15 minutes to complete, so you can go get a coffee or something. The copy may take more than 15 minutes to complete, so you can go get a coffee or something.
Congratulations, you now have a complete copy of your sdcard! Congratulations, you now have a complete copy of your sdcard!
However it's big. Huge even. We are going to resize it to make its storage and sharing easier. However it's big. Huge even. We are going to resize it to make its storage and sharing easier.
## Shrink and share! ## Shrink and share
Before shrinking the image, let's sanitize it first and remove eventual secrets stored in it (like wifi passwords for example). Before shrinking the image, let's sanitize it first and remove eventual secrets stored in it (like wifi passwords for example).
@ -83,12 +85,14 @@ Once your cleanup is done, unmount the image with `sudo umount mnt`.
Now, let's shrink the image! To do so, we are going to use [PiShrink](https://github.com/Drewsif/PiShrink). Now, let's shrink the image! To do so, we are going to use [PiShrink](https://github.com/Drewsif/PiShrink).
You can install the script using the following: You can install the script using the following:
```sh ```sh
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh chmod +x pishrink.sh
``` ```
Now, starts PiShrink on your image, and watch it do its magic: Now, starts PiShrink on your image, and watch it do its magic:
```sh ```sh
sudo ./pishrink.sh -z -a planktoscopeimage.img sudo ./pishrink.sh -z -a planktoscopeimage.img
``` ```
@ -99,4 +103,3 @@ The flags `-z -a` are used to compress the image to a gz file using the multithr
If you want to distribute the image you created, you should use the flag `-p` with PiShrink to remove logs, apt archives, ssh hosts keys and similar things. If you want to distribute the image you created, you should use the flag `-p` with PiShrink to remove logs, apt archives, ssh hosts keys and similar things.
You now have a compressed image that should be between 10 and 100 times smaller than the one you started with. You can distribute it (don't forget to do the steps above first), archive it, do whatever you please with it! You now have a compressed image that should be between 10 and 100 times smaller than the one you started with. You can distribute it (don't forget to do the steps above first), archive it, do whatever you please with it!

View file

@ -17,6 +17,7 @@ Select the SD card you wish to write your image to.
Review your selections and click 'Flash!' to begin writing data to the SD card. Review your selections and click 'Flash!' to begin writing data to the SD card.
## Inserting the SD card ## Inserting the SD card
Once flashing is over, you can unmount the SD card from the computer (usually done by right clicking on the card icon in the taskbar). Once flashing is over, you can unmount the SD card from the computer (usually done by right clicking on the card icon in the taskbar).
Insert now the card in the Raspberry installed in your PlanktoScope. Insert now the card in the Raspberry installed in your PlanktoScope.
@ -31,6 +32,6 @@ If you are running a Windows machine, you will need to install the Bonjour servi
To install the client, download the installer [here](https://download.info.apple.com/Mac_OS_X/061-8098.20100603.gthyu/BonjourPSSetup.exe) and launch it. To install the client, download the installer [here](https://download.info.apple.com/Mac_OS_X/061-8098.20100603.gthyu/BonjourPSSetup.exe) and launch it.
## Start playing! ## Start playing
Start up your PlanktoScope and connect to its WiFi network. You can now access the webpage at http://planktoscope.local:1880/ui to start using your machine! Start up your PlanktoScope and connect to its WiFi network. You can now access the webpage at <http://planktoscope.local:1880/ui> to start using your machine!

View file

@ -1,6 +1,6 @@
# Edit this documentation! # Edit this documentation
This documentation is hosted by [ReadTheDocs.org](https://readthedocs.org/) at https://planktonscope.readthedocs.io/. This documentation is hosted by [ReadTheDocs.org](https://readthedocs.org/) at <https://planktonscope.readthedocs.io/>.
The source files are in the main [github repository](https://www.github.com/PlanktonPlanet/PlanktoScope), in the `docs` folder. The source files are in the main [github repository](https://www.github.com/PlanktonPlanet/PlanktoScope), in the `docs` folder.
@ -14,8 +14,8 @@ If you want to include pictures and diagrams in the documentation, please set th
Contributions should be made by creating pull requests on [Github directly](https://github.com/PlanktonPlanet/PlanktoScope/pulls). Contributions should be made by creating pull requests on [Github directly](https://github.com/PlanktonPlanet/PlanktoScope/pulls).
## Extensions available ## Extensions available
In addition to the common markdown syntax, several extensions are activated. If you want more information on any of them, please follow the linked guides. In addition to the common markdown syntax, several extensions are activated. If you want more information on any of them, please follow the linked guides.
- [SmartyPants](https://python-markdown.github.io/extensions/smarty/): Converts ASCII dashes, quotes and ellipses to their HTML entity equivalents. - [SmartyPants](https://python-markdown.github.io/extensions/smarty/): Converts ASCII dashes, quotes and ellipses to their HTML entity equivalents.

View file

@ -3,7 +3,8 @@
## Install and setup Raspbian on your Raspberry Pi ## Install and setup Raspbian on your Raspberry Pi
### Computer setup ### Computer setup
In order to make it easy to connect to the PlanktoScope, you may want to install [avahi](https://en.wikipedia.org/wiki/Avahi_%28software%29) or the [Bonjour](https://en.wikipedia.org/wiki/Bonjour_%28software%29) service on any computer you will use to access the PlanktoScope interface. This will allow you to connect to the PlantoScop using an address similar such as http://planktoscope.local instead of an IP address.
In order to make it easy to connect to the PlanktoScope, you may want to install [avahi](https://en.wikipedia.org/wiki/Avahi_%28software%29) or the [Bonjour](https://en.wikipedia.org/wiki/Bonjour_%28software%29) service on any computer you will use to access the PlanktoScope interface. This will allow you to connect to the PlantoScop using an address similar such as <http://planktoscope.local> instead of an IP address.
### Download the image ### Download the image
@ -23,6 +24,7 @@ Select the SD card you want to write your image to.
Review your selections and click `Flash!` to begin writing data to the SD card. Review your selections and click `Flash!` to begin writing data to the SD card.
#### Prepare your Raspberry Pi #### Prepare your Raspberry Pi
[Getting Started with your Raspberry Pi](https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started/) [Getting Started with your Raspberry Pi](https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started/)
Plug the SD Card in your Raspberry Pi and connect your Pi to a screen, mouse and a keyboard. Check the connection twice before plugging the power. Plug the SD Card in your Raspberry Pi and connect your Pi to a screen, mouse and a keyboard. Check the connection twice before plugging the power.
@ -34,6 +36,7 @@ The first boot to the desktop may take up to 120 seconds. This is normal and is
Make sure you have access to internet and update/upgrade your fresh Raspbian install. Make sure you have access to internet and update/upgrade your fresh Raspbian install.
Update your Pi first. Open up a terminal, and do the following: Update your Pi first. Open up a terminal, and do the following:
```sh ```sh
sudo apt update -y sudo apt update -y
sudo apt full-upgrade -y sudo apt full-upgrade -y
@ -41,17 +44,19 @@ sudo apt install git
``` ```
You can now reboot your Pi safely. You can now reboot your Pi safely.
```sh ```sh
sudo reboot now sudo reboot now
``` ```
## Raspberry Pi configuration ## Raspberry Pi configuration
### Clone this repository! ### Clone this repository
First of all, and to ensure you have the latest documentation available locally, you should clone this repository using git. First of all, and to ensure you have the latest documentation available locally, you should clone this repository using git.
Simply run the following in a terminal: Simply run the following in a terminal:
```sh ```sh
git clone https://github.com/PlanktonPlanet/PlanktoScope/ git clone https://github.com/PlanktonPlanet/PlanktoScope/
``` ```
@ -59,6 +64,7 @@ git clone https://github.com/PlanktonPlanet/PlanktoScope/
### Enable Camera/SSH/I2C in raspi-config ### Enable Camera/SSH/I2C in raspi-config
You can now launch the configuration tool: You can now launch the configuration tool:
```sh ```sh
sudo raspi-config sudo raspi-config
``` ```
@ -86,7 +92,7 @@ Last steps we need to do is to increase the amount of memory available to the GP
Also, to be able to use the ISO8601 datetime standard, we need to change the locale in use. Choose `5 Localisations Options`, then `L1 Locale` and press space after selecting the `en_DK.UTF8`. Press Enter and then select the en_DK locale as default for your system. Also, to be able to use the ISO8601 datetime standard, we need to change the locale in use. Choose `5 Localisations Options`, then `L1 Locale` and press space after selecting the `en_DK.UTF8`. Press Enter and then select the en_DK locale as default for your system.
!!!info !!!info
The en_DK is a hack where month and day names are in English, but date and time format uses the ISO8601 format. See https://serverfault.com/questions/17118/how-do-i-set-the-date-format-to-iso-globally-in-linux The en_DK is a hack where month and day names are in English, but date and time format uses the ISO8601 format. See <https://serverfault.com/questions/17118/how-do-i-set-the-date-format-to-iso-globally-in-linux>
These steps can also be done from the Raspberry Pi Configuration GUI tool that you can find in `Main Menu > Preferences`. Go to the `Interfaces` tab. Pay attention, here the Serial Port must be enabled, but the Serial Port Console must be disabled. These steps can also be done from the Raspberry Pi Configuration GUI tool that you can find in `Main Menu > Preferences`. Go to the `Interfaces` tab. Pay attention, here the Serial Port must be enabled, but the Serial Port Console must be disabled.
@ -94,14 +100,15 @@ These steps can also be done from the Raspberry Pi Configuration GUI tool that y
Optional step: overclocking Optional step: overclocking
It's possible to overclock the machine and get a bit more performance out of it. Open `/boot/config.txt` with `sudo nano /boot/config.txt` and add at the end of the file on two new lines: It's possible to overclock the machine and get a bit more performance out of it. Open `/boot/config.txt` with `sudo nano /boot/config.txt` and add at the end of the file on two new lines:
`over_voltage=6` ```txt
over_voltage=6
`arm_freq=2000` arm_freq=2000
```
Those settings were verified to be stable, but if you notice any weird behavior under a high load, remove those lines. Those settings were verified to be stable, but if you notice any weird behavior under a high load, remove those lines.
Reboot your Pi safely. Reboot your Pi safely.
```sh ```sh
sudo reboot now sudo reboot now
``` ```
@ -128,13 +135,15 @@ mkdir test libraries
``` ```
### Install all python libraries ### Install all python libraries
To simplify setup, we provide requirements.txt: To simplify setup, we provide requirements.txt:
```sh ```sh
pip3 install -U -r /home/pi/PlanktoScope/requirements.txt pip3 install -U -r /home/pi/PlanktoScope/requirements.txt
``` ```
### Add to python path ### Add to python path
We need to do this to make sure we can call the modules from any path in the system, and not just from the `scripts` folder: We need to do this to make sure we can call the modules from any path in the system, and not just from the `scripts` folder:
``` ```
@ -146,6 +155,7 @@ sudo ln -s /home/pi/PlanktoScope/scripts/shush /root/.local/lib/python3.7/site-p
``` ```
### [ADAFRUIT VERSION] Check CircuitPython's install ### [ADAFRUIT VERSION] Check CircuitPython's install
Start by following [Adafruit's guide](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi). You can start at the chapter `Install Python Libraries`. Start by following [Adafruit's guide](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi). You can start at the chapter `Install Python Libraries`.
#### Testing the installation and the wiring #### Testing the installation and the wiring
@ -177,12 +187,14 @@ print("done!")
``` ```
To start the script, just run the following: To start the script, just run the following:
```sh ```sh
chmod +x test/blinkatest.py chmod +x test/blinkatest.py
./test/blinkatest.py ./test/blinkatest.py
``` ```
The output should be similar to this: The output should be similar to this:
```sh ```sh
pi@planktoscope:~ $ ./test/blinkatest.py pi@planktoscope:~ $ ./test/blinkatest.py
Hello blinka! Hello blinka!
@ -193,6 +205,7 @@ done!
``` ```
Also, to make sure the wiring is good, we are going to use `sudo i2cdetect -y 1` to see if our devices are detected: Also, to make sure the wiring is good, we are going to use `sudo i2cdetect -y 1` to see if our devices are detected:
```sh ```sh
pi@planktoscope:~ $ sudo i2cdetect -y 1 pi@planktoscope:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 3 4 5 6 7 8 9 a b c d e f
@ -211,7 +224,9 @@ The device appearing at addresses 60 and 70 is our motor controller. Address `0d
In case the motor controller does not appear, shutdown your Planktoscope and check the wiring. If your board is using a connector instead of a soldered pin connection (as happens with the Adafruit Bonnet Motor Controller), sometimes the pins on the male side need to be bent a little to make good contact. In any case, do not hesitate to ask for help in Slack. In case the motor controller does not appear, shutdown your Planktoscope and check the wiring. If your board is using a connector instead of a soldered pin connection (as happens with the Adafruit Bonnet Motor Controller), sometimes the pins on the male side need to be bent a little to make good contact. In any case, do not hesitate to ask for help in Slack.
### [PSCOPE_HAT VERSION] Test the stepper controllers ### [PSCOPE_HAT VERSION] Test the stepper controllers
After wiring the steppers, please run the following script, you can create it in `~/test/stepper_controller.py`: After wiring the steppers, please run the following script, you can create it in `~/test/stepper_controller.py`:
```python ```python
#!/usr/bin/python3 #!/usr/bin/python3
import shush import shush
@ -258,6 +273,7 @@ while True:
``` ```
To start the script, just run the following: To start the script, just run the following:
```sh ```sh
chmod +x ~/test/stepper_controller.py chmod +x ~/test/stepper_controller.py
~/test/stepper_controller.py ~/test/stepper_controller.py
@ -266,7 +282,9 @@ chmod +x ~/test/stepper_controller.py
The pump should run in one direction then in the other, and the focus stage should move in one direction and then in another. The pump should run in one direction then in the other, and the focus stage should move in one direction and then in another.
### Deactivate steppers ### Deactivate steppers
Create `sudo nano /etc/systemd/system/gpio-init.service`: Create `sudo nano /etc/systemd/system/gpio-init.service`:
``` ```
[Unit] [Unit]
Description=GPIO Init Description=GPIO Init
@ -283,8 +301,8 @@ WantedBy=sysinit.target
And activate with `sudo systemctl enable autohotspot.service`. And activate with `sudo systemctl enable autohotspot.service`.
Create the script with `sudo nano /usr/bin/stepper-disable`: Create the script with `sudo nano /usr/bin/stepper-disable`:
```sh ```sh
#!/bin/sh -e #!/bin/sh -e
@ -308,6 +326,7 @@ echo "1" > /sys/class/gpio/gpio12/value
You can start by testing that the GPS module is working. Either install your PlanktoScope with a view of the sky, or connect the external antenna. You can start by testing that the GPS module is working. Either install your PlanktoScope with a view of the sky, or connect the external antenna.
Now you need to run the following: Now you need to run the following:
```sh ```sh
sudo apt install gpsd gpsd-clients sudo apt install gpsd gpsd-clients
stty -F /dev/serial0 raw 9600 cs8 clocal -cstopb stty -F /dev/serial0 raw 9600 cs8 clocal -cstopb
@ -315,6 +334,7 @@ cat /dev/serial0
``` ```
If the GPS works, you should now see NMEA sentences scrolling: If the GPS works, you should now see NMEA sentences scrolling:
``` ```
$GPGGA,000908.799,,,,,0,00,,,M,,M,,*7E $GPGGA,000908.799,,,,,0,00,,,M,,M,,*7E
$GPGSA,A,1,,,,,,,,,,,,,,,*1E $GPGSA,A,1,,,,,,,,,,,,,,,*1E
@ -334,31 +354,37 @@ $GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
Until you get a GPS fix, most of the sentences are empty (see the lines starting with GPGSA and with lot of commas). Until you get a GPS fix, most of the sentences are empty (see the lines starting with GPGSA and with lot of commas).
We are going to use gpsd to parse the GPS data. We need to set it up by editing `/etc/default/gpsd`. This file is source just before starting gpsd and allows to configure its working. We are going to use gpsd to parse the GPS data. We need to set it up by editing `/etc/default/gpsd`. This file is source just before starting gpsd and allows to configure its working.
```sh ```sh
sudo nano /etc/default/gpsd sudo nano /etc/default/gpsd
``` ```
Change the `USB_AUTO` line to read `false` Change the `USB_AUTO` line to read `false`
```sh ```sh
USBAUTO="false" USBAUTO="false"
``` ```
Also change the `DEVICES` line to add the device we are going to use `/dev/serial0`: Also change the `DEVICES` line to add the device we are going to use `/dev/serial0`:
```sh ```sh
DEVICES="/dev/serial0" DEVICES="/dev/serial0"
``` ```
Finally, we want to add the parameter `-n -r` to `GPSD_OPTIONS`: Finally, we want to add the parameter `-n -r` to `GPSD_OPTIONS`:
```sh ```sh
GPSD_OPTIONS="-n -r" GPSD_OPTIONS="-n -r"
``` ```
Save your work, and restart gpsd by running the following: Save your work, and restart gpsd by running the following:
```sh ```sh
sudo systemctl restart gpsd.service sudo systemctl restart gpsd.service
``` ```
If you wait a bit, you can run `gpsmon` to check that your configuration is correct. You should get an output similar to this: If you wait a bit, you can run `gpsmon` to check that your configuration is correct. You should get an output similar to this:
``` ```
pi@planktoscope:~ $ gpsmon pi@planktoscope:~ $ gpsmon
/dev/serial0 NMEA0183> /dev/serial0 NMEA0183>
@ -402,6 +428,7 @@ You can leave with `CTRL+C`.
The Adafruit GPS HAT allows your PlanktoScope to automatically sets its time to the GPS received one. Moreover, since the PPS (Pulse Per Second) output is activated, you can even set your PlanktoScope to act as a stratum 1 timeserver. The Adafruit GPS HAT allows your PlanktoScope to automatically sets its time to the GPS received one. Moreover, since the PPS (Pulse Per Second) output is activated, you can even set your PlanktoScope to act as a stratum 1 timeserver.
We are first going to make sure that your PlanktoScope receives proper PPS signal. We need to add the following line at the end of `/boot/config.txt`: We are first going to make sure that your PlanktoScope receives proper PPS signal. We need to add the following line at the end of `/boot/config.txt`:
``` ```
sudo nano /boot/config.txt sudo nano /boot/config.txt
# Add the following line at the end of the line # Add the following line at the end of the line
@ -417,16 +444,19 @@ pps-gpio
``` ```
Now install `pps-tools` so we can check that this is properly running. Now install `pps-tools` so we can check that this is properly running.
```sh ```sh
sudo apt install pps-tools sudo apt install pps-tools
``` ```
Finally, in the `/etc/default/gpsd` file, we need to add our pps device to the line `DEVICES`. Append `/dev/pps0`: Finally, in the `/etc/default/gpsd` file, we need to add our pps device to the line `DEVICES`. Append `/dev/pps0`:
```sh ```sh
DEVICES="/dev/serial0 /dev/pps0" DEVICES="/dev/serial0 /dev/pps0"
``` ```
Reboot your PlanktoScope now and check that the PPS signal is properly parsed by the PlanktoScope. You can do this by running `sudo ppstest /dev/pps0`: Reboot your PlanktoScope now and check that the PPS signal is properly parsed by the PlanktoScope. You can do this by running `sudo ppstest /dev/pps0`:
``` ```
pi@planktoscope:~ $ sudo ppstest /dev/pps0 pi@planktoscope:~ $ sudo ppstest /dev/pps0
trying PPS source "/dev/pps0" trying PPS source "/dev/pps0"
@ -439,6 +469,7 @@ source 0 - assert 1595329940.946459463, sequence: 4126 - clear 0.000000000, seq
`gpsmon` should also show a PPS signal in the `GSA + PPS` box. `gpsmon` should also show a PPS signal in the `GSA + PPS` box.
We now need to install the software that will act as timeserver, both locally and globally. Its name is Chrony. It's a more modern replacement for `ntp`, using the same underlying protocol. Let's go ahead and install it: We now need to install the software that will act as timeserver, both locally and globally. Its name is Chrony. It's a more modern replacement for `ntp`, using the same underlying protocol. Let's go ahead and install it:
```sh ```sh
sudo apt install chrony sudo apt install chrony
``` ```
@ -446,6 +477,7 @@ sudo apt install chrony
We need to edit the configuration of chrony, to activate both the GPS time synchronization and to allow clients to request time updates directly from our microscope. We need to edit the configuration of chrony, to activate both the GPS time synchronization and to allow clients to request time updates directly from our microscope.
Edit the file `/etc/chrony/chrony.conf` and replace its content with the following: Edit the file `/etc/chrony/chrony.conf` and replace its content with the following:
``` ```
pool pool.ntp.org iburst maxsources 4 pool pool.ntp.org iburst maxsources 4
@ -469,18 +501,21 @@ log rtc refclocks
``` ```
Before restarting `chrony`, we need to make sure the timesync service from systemd is deactivated: Before restarting `chrony`, we need to make sure the timesync service from systemd is deactivated:
```sh ```sh
sudo systemctl stop systemd-timesyncd.service sudo systemctl stop systemd-timesyncd.service
sudo systemctl disable systemd-timesyncd.service sudo systemctl disable systemd-timesyncd.service
``` ```
Final step, let's start `chrony` with its new configuration and restart `gpsd`: Final step, let's start `chrony` with its new configuration and restart `gpsd`:
```sh ```sh
sudo systemctl restart chrony sudo systemctl restart chrony
sudo systemctl restart gpsd sudo systemctl restart gpsd
``` ```
To check that everything is working as intended, wait a few minutes, and then type `chronyc sources -v`. This command will show the time sources `chrony` is using, and right at the top there should be our NMEA source. Make sure its line starts with `#*`, which means this source is selected: To check that everything is working as intended, wait a few minutes, and then type `chronyc sources -v`. This command will show the time sources `chrony` is using, and right at the top there should be our NMEA source. Make sure its line starts with `#*`, which means this source is selected:
``` ```
pi@planktoscope:~ $ chronyc sources -v pi@planktoscope:~ $ chronyc sources -v
210 Number of sources = 5 210 Number of sources = 5
@ -510,9 +545,10 @@ The ultimate step will have to be done on the other equipment on the network whe
You can find more information in this hardware module in Adafruit documentation at [Installing Adafruit GPS HAT](https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/overview) or on this page to [use Python Thread with GPS HAT](http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/) You can find more information in this hardware module in Adafruit documentation at [Installing Adafruit GPS HAT](https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/overview) or on this page to [use Python Thread with GPS HAT](http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/)
### Install RGB Cooling HAT ### Install RGB Cooling HAT
To setup the RGB Cooling HAT, you just need to clone and build the WiringPi library: To setup the RGB Cooling HAT, you just need to clone and build the WiringPi library:
```sh ```sh
cd ~/libraries cd ~/libraries
git clone https://github.com/WiringPi/WiringPi.git git clone https://github.com/WiringPi/WiringPi.git
@ -522,6 +558,7 @@ gpio -v
``` ```
The last command should output something similar to the following: The last command should output something similar to the following:
``` ```
gpio version: 2.60 gpio version: 2.60
Copyright (c) 2012-2018 Gordon Henderson Copyright (c) 2012-2018 Gordon Henderson
@ -537,6 +574,7 @@ Raspberry Pi Details:
``` ```
You will also need to install some python modules: You will also need to install some python modules:
```sh ```sh
sudo apt install i2c-tools sudo apt install i2c-tools
sudo pip3 install smbus2 sudo pip3 install smbus2
@ -544,10 +582,10 @@ sudo pip3 install smbus2
More information can be found on Yahboom website, on the page [Installing RGB Cooling HAT](https://www.yahboom.net/study/RGB_Cooling_HAT). More information can be found on Yahboom website, on the page [Installing RGB Cooling HAT](https://www.yahboom.net/study/RGB_Cooling_HAT).
### Install Mosquitto MQTT ### Install Mosquitto MQTT
In order to send and receive data from Node-RED, you need to install this. Run the following: In order to send and receive data from Node-RED, you need to install this. Run the following:
``` ```
sudo apt install mosquitto mosquitto-clients sudo apt install mosquitto mosquitto-clients
@ -558,16 +596,19 @@ sudo apt install mosquitto mosquitto-clients
We need to install the latest OpenCV version. Unfortunately, it is not available in the repositories. We are going to install it directly by using pip. We need to install the latest OpenCV version. Unfortunately, it is not available in the repositories. We are going to install it directly by using pip.
First, we need to install the needed dependencies, then we will directly install opencv: First, we need to install the needed dependencies, then we will directly install opencv:
```sh ```sh
sudo apt install libgtk-3-0 libavformat58 libavcodec58 libqt4-test libopenexr23 libilmbase23 libqtgui4 libavutil56 libjasper1 libqtcore4 libcairo-gobject2 libswscale5 libhdf5-dev libilmbase-dev libopenexr-dev libgstreamer1.0-dev libavcodec-dev libavformat-dev libswscale-dev libwebp-dev libatlas-base-dev sudo apt install libgtk-3-0 libavformat58 libavcodec58 libqt4-test libopenexr23 libilmbase23 libqtgui4 libavutil56 libjasper1 libqtcore4 libcairo-gobject2 libswscale5 libhdf5-dev libilmbase-dev libopenexr-dev libgstreamer1.0-dev libavcodec-dev libavformat-dev libswscale-dev libwebp-dev libatlas-base-dev
``` ```
Install now openCV diretly with pip: Install now openCV diretly with pip:
```sh ```sh
pip install opencv-contrib-python pip install opencv-contrib-python
``` ```
You can now check that opencv is properly installed by running a python interpreter and importing the cv2 module. You can now check that opencv is properly installed by running a python interpreter and importing the cv2 module.
```sh ```sh
pi@planktoscope:~ $ python3 pi@planktoscope:~ $ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) Python 3.7.3 (default, Jan 22 2021, 20:04:44)
@ -583,10 +624,10 @@ If all goes well, the displayed version number should be `4.4.0`.
More detailed information can be found on this [website](https://www.pyimagesearch.com/2019/09/16/install-opencv-4-on-raspberry-pi-4-and-raspbian-buster/). More detailed information can be found on this [website](https://www.pyimagesearch.com/2019/09/16/install-opencv-4-on-raspberry-pi-4-and-raspbian-buster/).
### Check MorphoCut's installation ### Check MorphoCut's installation
To test the installation, open up once again a python interpreter and import the morphocut module: To test the installation, open up once again a python interpreter and import the morphocut module:
```sh ```sh
pi@planktoscope:~ $ python3 pi@planktoscope:~ $ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59) Python 3.7.3 (default, Dec 20 2019, 18:57:59)
@ -600,12 +641,12 @@ Type "help", "copyright", "credits" or "license" for more information.
The MorphoCut documentation can be found [on this page](https://morphocut.readthedocs.io/en/stable/index.html). The MorphoCut documentation can be found [on this page](https://morphocut.readthedocs.io/en/stable/index.html).
### Nginx Setup ### Nginx Setup
To display the gallery, we need to setup an nginx webserver. To display the gallery, we need to setup an nginx webserver.
Type in the following commands: Type in the following commands:
``` ```
sudo apt install nginx sudo apt install nginx
sudo rm /etc/nginx/sites-enabled/default sudo rm /etc/nginx/sites-enabled/default
@ -613,15 +654,18 @@ sudo ln -s /home/pi/PlanktoScope/scripts/gallery/gallery.conf /etc/nginx/sites-e
sudo nginx -t && sudo systemctl reload nginx sudo nginx -t && sudo systemctl reload nginx
``` ```
If you navigate to http://planktoscope.local:80, you should see the library opened. If you navigate to <http://planktoscope.local:80>, you should see the library opened.
### Install Node-RED ### Install Node-RED
#### Download and installation #### Download and installation
To install Node.js, npm and Node-RED onto a Raspberry Pi, you just need to run the following command. You can review the content of this script [here](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered). To install Node.js, npm and Node-RED onto a Raspberry Pi, you just need to run the following command. You can review the content of this script [here](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered).
```sh ```sh
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
``` ```
Type `y` at both prompts to accept the installation and its settings. Type `y` at both prompts to accept the installation and its settings.
### Override Node-RED default settings to make it start after Mosquitto ### Override Node-RED default settings to make it start after Mosquitto
@ -629,6 +673,7 @@ Type `y` at both prompts to accept the installation and its settings.
We need to make sure nodered only starts after Mosquitto. And Mosquitto waits for a network connection to appear before starting. We need to make sure nodered only starts after Mosquitto. And Mosquitto waits for a network connection to appear before starting.
To change this behavior, we need to override Node-red default setting. We modify the default service unit file with the following: To change this behavior, we need to override Node-red default setting. We modify the default service unit file with the following:
```sh ```sh
sudo mkdir -p /etc/systemd/system/nodered.service.d/ sudo mkdir -p /etc/systemd/system/nodered.service.d/
sudo cp /home/pi/PlanktoScope/scripts/raspbian_configuration/etc/systemd/system/nodered.service.d/override.conf /etc/systemd/system/nodered.service.d/override.conf sudo cp /home/pi/PlanktoScope/scripts/raspbian_configuration/etc/systemd/system/nodered.service.d/override.conf /etc/systemd/system/nodered.service.d/override.conf
@ -636,18 +681,22 @@ sudo systemctl daemon-reload
``` ```
#### Enable start on boot and launch Node-RED #### Enable start on boot and launch Node-RED
To run Node-RED when the Pi is turned on or restarted, you need to enable the systemd service by running this command: To run Node-RED when the Pi is turned on or restarted, you need to enable the systemd service by running this command:
```sh ```sh
sudo systemctl enable nodered.service sudo systemctl enable nodered.service
``` ```
You can now start Node-RED by running the following: You can now start Node-RED by running the following:
```sh ```sh
sudo systemctl start nodered.service sudo systemctl start nodered.service
``` ```
#### Check the installation #### Check the installation
Make sure Node-RED is correctly installed by reaching the following page from the browser of your pi http://localhost:1880 or http://planktoscope.local:1880 from another computer on the same network.
Make sure Node-RED is correctly installed by reaching the following page from the browser of your pi <http://localhost:1880> or <http://planktoscope.local:1880> from another computer on the same network.
#### Install the necessary nodes and activate necessary features #### Install the necessary nodes and activate necessary features
@ -657,17 +706,20 @@ We are going to activate the Projects feature of Node-Red as this will help us m
- Line 337: set enabled to true - Line 337: set enabled to true
Restart Node-RED to take into account those changes: Restart Node-RED to take into account those changes:
```sh ```sh
sudo systemctl restart nodered.service sudo systemctl restart nodered.service
``` ```
We need to move the PlanktoScope folder in the right place, in the `projects` subfolder of Node-Red and link this new folder to our `/home/`. To do so, in the terminal type the following:: We need to move the PlanktoScope folder in the right place, in the `projects` subfolder of Node-Red and link this new folder to our `/home/`. To do so, in the terminal type the following::
```sh ```sh
mv /home/pi/PlanktoScope /home/pi/.node-red/projects/ mv /home/pi/PlanktoScope /home/pi/.node-red/projects/
ln -s ./.node-red/projects/PlanktoScope /home/pi/PlanktoScope ln -s ./.node-red/projects/PlanktoScope /home/pi/PlanktoScope
``` ```
We will now install the missing nodes. These nodes will be used by the PlanktoScope software: We will now install the missing nodes. These nodes will be used by the PlanktoScope software:
```sh ```sh
cd /home/pi/.node-red/ cd /home/pi/.node-red/
npm install copy-dependencies npm install copy-dependencies
@ -680,6 +732,7 @@ Save you changes.
The final step before restarting node-red is to link the projects directory from within node-red folder to our main home directory. To do so, just open a terminal and type the following: The final step before restarting node-red is to link the projects directory from within node-red folder to our main home directory. To do so, just open a terminal and type the following:
You can now restart the nodered service: You can now restart the nodered service:
``` ```
sudo systemctl restart nodered.service sudo systemctl restart nodered.service
``` ```
@ -688,24 +741,25 @@ sudo systemctl restart nodered.service
If you now open the Node-Red GUI in your browser, it will ask you to setup the project, an email and a username (so if you make changes to the flow and want to share them we can know who made them). If you now open the Node-Red GUI in your browser, it will ask you to setup the project, an email and a username (so if you make changes to the flow and want to share them we can know who made them).
Open your browser and navigate to http://planktoscope.local:1880. In the prompt, select `Open existing project` button at the bottom, choose the PlanktoScope project and click on `Open Project`. Eventually, merge the proposed changes. Open your browser and navigate to <http://planktoscope.local:1880>. In the prompt, select `Open existing project` button at the bottom, choose the PlanktoScope project and click on `Open Project`. Eventually, merge the proposed changes.
The latest flow version will be available immediately. The latest flow version will be available immediately.
#### More information #### More information
[Installing Node-RED on Raspberry Pi](https://nodered.org/docs/getting-started/raspberrypi)
[Installing Node-RED on Raspberry Pi](https://nodered.org/docs/getting-started/raspberrypi)
## Finishing the install ## Finishing the install
Make sure to update your Pi Make sure to update your Pi
``` ```
sudo apt update -y sudo apt update -y
sudo apt full-upgrade -y sudo apt full-upgrade -y
``` ```
Reboot your Pi safely Reboot your Pi safely
``` ```
sudo reboot now sudo reboot now
@ -716,6 +770,7 @@ sudo reboot now
### Update the cloned repository ### Update the cloned repository
Updates are published on Github regurlarly. Make sure to update once in a while by running this command: Updates are published on Github regurlarly. Make sure to update once in a while by running this command:
```sh ```sh
cd PlanktoScope cd PlanktoScope
git pull git pull
@ -725,7 +780,4 @@ This will pull and merge all the changes made since your last update.
### Share WiFi via Ethernet ### Share WiFi via Ethernet
At this link : https://www.instructables.com/id/Share-WiFi-With-Ethernet-Port-on-a-Raspberry-Pi/ At this link : <https://www.instructables.com/id/Share-WiFi-With-Ethernet-Port-on-a-Raspberry-Pi/>

View file

@ -1,8 +1,9 @@
# Getting started with using the machine # Getting started with using the machine
Congratulations! You have finished assembling your machine, now is the time to test it and learn how to use it! Congratulations! You have finished assembling your machine, now is the time to test it and learn how to use it!
## How to connect to and control the machine ## How to connect to and control the machine
On powering up, your PlanktoScope will create its own isolated WiFi network. It should appear on the list of available wifi networks about two minutes after the first startup. On powering up, your PlanktoScope will create its own isolated WiFi network. It should appear on the list of available wifi networks about two minutes after the first startup.
![network list](getting_started/wifi.webp) ![network list](getting_started/wifi.webp)
@ -15,8 +16,8 @@ Once connected, you will not have acces to the Internet, only to the PlanktoScop
From there, you can have a look at the [UI guide](ui_guide.md) to get a handle on how it works. From there, you can have a look at the [UI guide](ui_guide.md) to get a handle on how it works.
## How to image plankton ## How to image plankton
Before doing an acquisition, you will need to collect targets. There are several ways to do this, and you probably already have a source nearby (in a culture if you are working in a lab). Before doing an acquisition, you will need to collect targets. There are several ways to do this, and you probably already have a source nearby (in a culture if you are working in a lab).
However, if you have access to a body of water (even a tiny lake or river is enough), you can build yourself a plankton net to collect a sample. Once the sample is collected, either pump it with a syringe that you connect to the machine, or dip one of the silicone tube inside the sample tube you have. However, if you have access to a body of water (even a tiny lake or river is enough), you can build yourself a plankton net to collect a sample. Once the sample is collected, either pump it with a syringe that you connect to the machine, or dip one of the silicone tube inside the sample tube you have.

View file

@ -3,20 +3,25 @@
## Buses and GPIO pinout ## Buses and GPIO pinout
### I2C1 Bus ### I2C1 Bus
#### RTC RV-3028-C7 #### RTC RV-3028-C7
Address 0x52 Address 0x52
Configured through a kernel driver. Configured through a kernel driver.
#### OLED Display #### OLED Display
Address 0x3c Address 0x3c
#### LED control: LM36011 #### LED control: LM36011
Address 0x64 Address 0x64
Control through specific software, current range from 0 to 376mA in normal mode, up to 1.5A in flash mode. Control through specific software, current range from 0 to 376mA in normal mode, up to 1.5A in flash mode.
### SPI0 Bus ### SPI0 Bus
#### Motor Controller 0: TMC5160 #### Motor Controller 0: TMC5160
Chip Enable: SPI0_CE0 Chip Enable: SPI0_CE0
Motor Enable: GPIO23 Motor Enable: GPIO23
@ -24,8 +29,8 @@ Diagnostic output:
GPIO16 for Error output GPIO16 for Error output
GPIO20 for Stall output GPIO20 for Stall output
#### Motor Controller 1: TMC5160 #### Motor Controller 1: TMC5160
Chip Enable: SPI0_CE1 Chip Enable: SPI0_CE1
Motor Enable: GPIO5 Motor Enable: GPIO5
@ -34,16 +39,22 @@ GPIO16 for Error output
GPIO20 for Stall output GPIO20 for Stall output
### GPIO ### GPIO
#### Fan control #### Fan control
PWM1 control through GPIO13 PWM1 control through GPIO13
#### LED Output selection #### LED Output selection
GPIO18: high for LED1, low for LED2 GPIO18: high for LED1, low for LED2
#### LED Strobe #### LED Strobe
GPIO22 for pulse GPIO22 for pulse
### I2C0 Bus ### I2C0 Bus
#### EEPROM M24C32 #### EEPROM M24C32
Address 0x50 Address 0x50
For HAT information only. For HAT information only.

View file

@ -3,10 +3,13 @@
That's the headline, yes. That's the headline, yes.
## Hardware files ## Hardware files
We released our hardware files (everything in the `hardware` directory) under a [CERN OHL-S license](https://ohwr.org/cern_ohl_s_v2.txt). We released our hardware files (everything in the `hardware` directory) under a [CERN OHL-S license](https://ohwr.org/cern_ohl_s_v2.txt).
## Software source ## Software source
Our source code (everything in the directories `flows` and `scripts`) is released under a [GPL-3.0 license](https://www.gnu.org/licenses/gpl-3.0.en.html). Our source code (everything in the directories `flows` and `scripts`) is released under a [GPL-3.0 license](https://www.gnu.org/licenses/gpl-3.0.en.html).
## Everything else (documentation, pictures, etc...) ## Everything else (documentation, pictures, etc...)
Everything else is released under a [Creative Commons CC-BY-SA license](https://creativecommons.org/licenses/by-sa/4.0/). Everything else is released under a [Creative Commons CC-BY-SA license](https://creativecommons.org/licenses/by-sa/4.0/).

View file

@ -1,6 +1,7 @@
# Details about used MQTT messages # Details about used MQTT messages
## Topic lists ## Topic lists
- [`actuator`](#actuator) - [`actuator`](#actuator)
- [`actuator/pump`](#actuatorpump) - [`actuator/pump`](#actuatorpump)
- [`actuator/focus`](#actuatorfocus) - [`actuator/focus`](#actuatorfocus)
@ -15,12 +16,14 @@
- [`status/segmenter/object_id`](#statussegmenterobject_id) - [`status/segmenter/object_id`](#statussegmenterobject_id)
- [`status/segmenter/metric`](#statussegmentermetric) - [`status/segmenter/metric`](#statussegmentermetric)
## Topic details ## Topic details
### `actuator` ### `actuator`
#### `actuator/pump` #### `actuator/pump`
Control the movement of the pump. The message is a JSON object: Control the movement of the pump. The message is a JSON object:
```json ```json
{ {
"action": "move", "action": "move",
@ -29,9 +32,11 @@ Control the movement of the pump. The message is a JSON object:
"flowrate": 1 "flowrate": 1
} }
``` ```
This messages make the pump move 10mL forward at 1mL/min. This messages make the pump move 10mL forward at 1mL/min.
Another supported message is: Another supported message is:
```json ```json
{ {
"action": "stop" "action": "stop"
@ -41,7 +46,9 @@ Another supported message is:
- Receive only - Receive only
#### `actuator/focus` #### `actuator/focus`
Control of the focus stage. The message is a JSON object, speed is optional: Control of the focus stage. The message is a JSON object, speed is optional:
```json ```json
{ {
"action": "move", "action": "move",
@ -54,6 +61,7 @@ Control of the focus stage. The message is a JSON object, speed is optional:
This message makes the stage move up by 10mm. This message makes the stage move up by 10mm.
Another supported message is: Another supported message is:
```json ```json
{ {
"action": "stop" "action": "stop"
@ -62,9 +70,10 @@ Another supported message is:
- Receive only - Receive only
### `imager/image` ### `imager/image`
This topic controls the camera and capture. The message allowed is a JSON message: This topic controls the camera and capture. The message allowed is a JSON message:
```json ```json
{ {
"action": "image", "action": "image",
@ -77,6 +86,7 @@ This topic controls the camera and capture. The message allowed is a JSON messag
Volume is in mL. Volume is in mL.
This topic can also receive a config update message: This topic can also receive a config update message:
```json ```json
{ {
"action": "config", "action": "config",
@ -85,6 +95,7 @@ This topic can also receive a config update message:
``` ```
A camera settings message can also be received here. The fields `iso`, `shutter_speed`, `white_balance_gain`, `white_balance` and `image_gain` are optionals: A camera settings message can also be received here. The fields `iso`, `shutter_speed`, `white_balance_gain`, `white_balance` and `image_gain` are optionals:
```json ```json
{ {
"action": "settings", "action": "settings",
@ -101,7 +112,9 @@ A camera settings message can also be received here. The fields `iso`, `shutter_
- Receive only - Receive only
### `segmenter/segment` ### `segmenter/segment`
This topic controls the segmentation process. The message is a JSON object: This topic controls the segmentation process. The message is a JSON object:
```json ```json
{ {
"action": "segment", "action": "segment",
@ -129,10 +142,13 @@ The `action` element is the only element required. If no `path` is supplied, the
- Receive only - Receive only
### `status` ### `status`
This high-level topic is used to send information to the Node-Red process. There is no publication or receive at this level. This high-level topic is used to send information to the Node-Red process. There is no publication or receive at this level.
#### `status/pump` #### `status/pump`
State of the pump. It's a JSON object with: State of the pump. It's a JSON object with:
```json ```json
{ {
"status": "Started", "status": "Started",
@ -147,7 +163,9 @@ Status can be `Started`, `Ready`, `Done`, `Interrupted`, `Error`, `Dead`.
- Publish only - Publish only
#### `status/focus` #### `status/focus`
State of the focus stage. It's a JSON object with: State of the focus stage. It's a JSON object with:
```json ```json
{ {
"status": "Started", "status": "Started",
@ -162,7 +180,9 @@ Status is one of `Started`, `Ready`, `Done`, `Interrupted`, `Error`, `Dead`.
- Publish only - Publish only
#### `status/imager` #### `status/imager`
State of the imager. It's a JSON object with: State of the imager. It's a JSON object with:
```json ```json
{ {
"status": "Started", "status": "Started",
@ -175,7 +195,9 @@ Status is one of `Started`, `Ready`, `Completed` or `12_11_15_0.1.jpg has been i
- Publish only - Publish only
#### `status/segmenter` #### `status/segmenter`
Status of the segmentation. It's a JSON object with: Status of the segmentation. It's a JSON object with:
```json ```json
{ {
"status": "Started", "status": "Started",
@ -187,6 +209,7 @@ Status of the segmentation. It's a JSON object with:
- Publish only - Publish only
#### `status/segmenter/object_id` #### `status/segmenter/object_id`
```json ```json
{ {
"object_id": "13449" "object_id": "13449"
@ -194,6 +217,7 @@ Status of the segmentation. It's a JSON object with:
``` ```
#### `status/segmenter/metric` #### `status/segmenter/metric`
```json ```json
{ {
"name": "01_13_28_232066_0", "name": "01_13_28_232066_0",

View file

@ -7,11 +7,13 @@ All the files modified in this document are also available in the repository, in
In order to work as an access point, the Raspberry Pi will need to have access point software installed, along with DHCP server software to provide connecting devices with a network address. In order to work as an access point, the Raspberry Pi will need to have access point software installed, along with DHCP server software to provide connecting devices with a network address.
To create an access point, we'll need DNSMasq and HostAPD. Install all the required software in one go with this command:: To create an access point, we'll need DNSMasq and HostAPD. Install all the required software in one go with this command::
```sh ```sh
sudo apt install dnsmasq hostapd sudo apt install dnsmasq hostapd
``` ```
Since the configuration files are not ready yet, turn the new software off as follows:: Since the configuration files are not ready yet, turn the new software off as follows::
```sh ```sh
sudo systemctl unmask hostapd sudo systemctl unmask hostapd
sudo systemctl disable dnsmasq sudo systemctl disable dnsmasq
@ -22,7 +24,7 @@ sudo systemctl disable hostapd
Using a text editor edit the hostapd configuration file. This file won't exist at this stage so will be blank: `sudo nano /etc/hostapd/hostapd.conf` Using a text editor edit the hostapd configuration file. This file won't exist at this stage so will be blank: `sudo nano /etc/hostapd/hostapd.conf`
``` ```txt
#2.4GHz setup wifi 80211 b,g,n #2.4GHz setup wifi 80211 b,g,n
interface=wlan0 interface=wlan0
driver=nl80211 driver=nl80211
@ -57,6 +59,7 @@ The country_code should be set to your country to comply with local RF laws. You
To save the config file press `CTRL+O` and to exit press `CTRL+X`. To save the config file press `CTRL+O` and to exit press `CTRL+X`.
We also use a special function to change the network name to the machine name. Add this to `/etc/rc.local` with `sudo nano /etc/rc.local`: We also use a special function to change the network name to the machine name. Add this to `/etc/rc.local` with `sudo nano /etc/rc.local`:
```sh ```sh
# Replace wifi hostname # Replace wifi hostname
sed -i "s/^ssid.*/ssid=PlanktoScope-$(python3 -c "import planktoscope.uuidName as uuidName; print(uuidName.machineName(machine=uuidName.getSerial()).replace(' ','_'))")/" /etc/hostapd/hostapd.conf sed -i "s/^ssid.*/ssid=PlanktoScope-$(python3 -c "import planktoscope.uuidName as uuidName; print(uuidName.machineName(machine=uuidName.getSerial()).replace(' ','_'))")/" /etc/hostapd/hostapd.conf
@ -76,7 +79,8 @@ And save.
Next dnsmasq needs to be configured to allow the Rpi to act as a router and issue ip addresses. Open the dnsmasq.conf file with `sudo nano /etc/dnsmasq.conf` Next dnsmasq needs to be configured to allow the Rpi to act as a router and issue ip addresses. Open the dnsmasq.conf file with `sudo nano /etc/dnsmasq.conf`
Go to the bottom of the file and add the following lines: Go to the bottom of the file and add the following lines:
```
```txt
#AutoHotspot config #AutoHotspot config
interface=wlan0 interface=wlan0
bind-dynamic bind-dynamic
@ -97,6 +101,7 @@ dhcp-range=192.168.5.100,192.168.5.200,12h
and then save `CTRL+O` and exit `CTRL+X`. and then save `CTRL+O` and exit `CTRL+X`.
Reload dnsmasq to use the updated configuration: Reload dnsmasq to use the updated configuration:
```sh ```sh
sudo systemctl reload dnsmasq sudo systemctl reload dnsmasq
``` ```
@ -108,7 +113,8 @@ DHCPCD is the software that manages the network setup. The next step is to stop
This will also create a fallback configuration to a static IP if no DHCP server is present on the Ethernet network. This will also create a fallback configuration to a static IP if no DHCP server is present on the Ethernet network.
Just add this line to the end of /etc/dhcpcd.conf with `sudo nano /etc/dhcpcd.conf`: Just add this line to the end of /etc/dhcpcd.conf with `sudo nano /etc/dhcpcd.conf`:
```
```txt
nohook wpa_supplicant nohook wpa_supplicant
# define static profile # define static profile
@ -121,6 +127,7 @@ static domain_name_servers=192.168.5.1
interface eth0 interface eth0
fallback static_eth0 fallback static_eth0
``` ```
Save and exit. Save and exit.
For the fallback Ethernet network to work, we also need to add a hook to DHCPCD so it starts up the local DHCP server (dnsmasq). Edit the file `/etc/dhcpcd.enter-hook` with `sudo nano /etc/dhcpcd.enter-hook`: For the fallback Ethernet network to work, we also need to add a hook to DHCPCD so it starts up the local DHCP server (dnsmasq). Edit the file `/etc/dhcpcd.enter-hook` with `sudo nano /etc/dhcpcd.enter-hook`:
@ -136,14 +143,14 @@ if [ "$interface" = "eth0" ] && [ "$if_up" ]; then
fi fi
``` ```
## Autohotspot service file ## Autohotspot service file
Next we have to create a service which will run the autohotspot script when the Raspberry Pi starts up. Next we have to create a service which will run the autohotspot script when the Raspberry Pi starts up.
Create a new file with the command `sudo nano /etc/systemd/system/autohotspot.service` Create a new file with the command `sudo nano /etc/systemd/system/autohotspot.service`
Then enter the following text: Then enter the following text:
```
```txt
[Unit] [Unit]
Description=Automatically generates a Hotspot when a valid SSID is not in range Description=Automatically generates a Hotspot when a valid SSID is not in range
After=multi-user.target After=multi-user.target
@ -162,7 +169,8 @@ For the service to work it has to be enabled. To do this enter the command `sudo
## Service Timer ## Service Timer
Create the timer with `sudo nano /etc/systemd/system/autohotspot.timer`: Create the timer with `sudo nano /etc/systemd/system/autohotspot.timer`:
```
```txt
# /etc/systemd/system/autohotspot.timer # /etc/systemd/system/autohotspot.timer
[Unit] [Unit]
Description=Run autohotspot every 5 minutes, starting 10 seconds after system boot Description=Run autohotspot every 5 minutes, starting 10 seconds after system boot
@ -174,6 +182,7 @@ OnUnitActivateSec=5min
[Install] [Install]
WantedBy=timers.target WantedBy=timers.target
``` ```
Save and exit. Save and exit.
Activate with `sudo systemctl enable autohotspot.timer`. Activate with `sudo systemctl enable autohotspot.timer`.
@ -187,12 +196,13 @@ It will search for any wifi connection that is setup on you Raspberry Pi by usin
If no wifi signal is found for a known SSID then the script will shutdown the wifi network setup and create a Hotspot. If an ethernet cable that allows internet access is connect then the Hotspot will become a full internet access point. Allowing all connected devices to use the Internet. Without an ethernet connect the Raspberry Pi can be accessed from a wifi device using SSH or VNC. If no wifi signal is found for a known SSID then the script will shutdown the wifi network setup and create a Hotspot. If an ethernet cable that allows internet access is connect then the Hotspot will become a full internet access point. Allowing all connected devices to use the Internet. Without an ethernet connect the Raspberry Pi can be accessed from a wifi device using SSH or VNC.
The script works with SSID's that contain spaces and by entering your routers MAC address it can be used with hidden SSID's. The script works with SSID's that contain spaces and by entering your routers MAC address it can be used with hidden SSID's.
!!! info !!! info
Hidden SSIDs Hidden SSIDs
If your routers SSID is not broadcast/hidden then find this section in the script If your routers SSID is not broadcast/hidden then find this section in the script
``` ```txt
#Enter the Routers Mac Addresses for hidden SSIDs, seperated by spaces ie #Enter the Routers Mac Addresses for hidden SSIDs, seperated by spaces ie
#( '11:22:33:44:55:66' 'aa:bb:cc:dd:ee:ff' ) #( '11:22:33:44:55:66' 'aa:bb:cc:dd:ee:ff' )
mac=() mac=()
@ -201,6 +211,7 @@ The script works with SSID's that contain spaces and by entering your routers MA
and enter you routers MAC address in the brackets of mac=() as shown in the example. Make sure mutiple MAC addresses are seperated by a space. and enter you routers MAC address in the brackets of mac=() as shown in the example. Make sure mutiple MAC addresses are seperated by a space.
Create a new file with the command `sudo nano /usr/bin/autohotspotN` and add the following: Create a new file with the command `sudo nano /usr/bin/autohotspotN` and add the following:
```sh ```sh
#!/bin/bash #!/bin/bash
#version 0.961-N/HS-I-PlanktonPlanet #version 0.961-N/HS-I-PlanktonPlanet

View file

@ -1,10 +1,11 @@
# Our software architecture # Our software architecture
## Node-Red ## Node-Red
Node-Red is our main process. We use the flow to manage our user interface through a dashboard instance. Node-Red is our main process. We use the flow to manage our user interface through a dashboard instance.
## Python ## Python
The python code is separated in four main processes, each with a specific set of responsibilities: The python code is separated in four main processes, each with a specific set of responsibilities:
- The main process controls all the others, starts everything up and cleans up on shutdown - The main process controls all the others, starts everything up and cleans up on shutdown
@ -12,7 +13,6 @@ The python code is separated in four main processes, each with a specific set of
- The imager process controls the camera and the streaming server via a state machine. - The imager process controls the camera and the streaming server via a state machine.
- The segmenter process manages the segmentation and its outputs. - The segmenter process manages the segmentation and its outputs.
Those processes all communicates together using MQTT and json messages. Each message is adressed to one topic. The high level topic controls which process receives the message. The details of each topic is at the end of this commit message. You can learn more about the [MQTT Messages here](mqtt_messages). Those processes all communicates together using MQTT and json messages. Each message is adressed to one topic. The high level topic controls which process receives the message. The details of each topic is at the end of this commit message. You can learn more about the [MQTT Messages here](mqtt_messages).
The code is architectured around 6 modules and about 10 classes. I encourage you to have a look at the files, they're pretty straightforward to understand. The code is architectured around 6 modules and about 10 classes. I encourage you to have a look at the files, they're pretty straightforward to understand.

View file

@ -1,9 +1,11 @@
# User interface guide # User interface guide
Starting with the release of v2.2, a new user interface brings a whole new user interface. This guide will help you get familiar with it. Starting with the release of v2.2, a new user interface brings a whole new user interface. This guide will help you get familiar with it.
![Home](ui_guide/home.webp) ![Home](ui_guide/home.webp)
## Home ## Home
As you can see above, when you first connect with your planktoscope at [http://planktoscope.local:1880/ui](http://planktoscope.local:1880/ui), you will reach this page. As you can see above, when you first connect with your planktoscope at [http://planktoscope.local:1880/ui](http://planktoscope.local:1880/ui), you will reach this page.
From here, you can quickly access any of the available tabs. The buttons are only the most used functionnalities of the machine. Three others tabs are accessible only through the hamburger menu on the top left of the screen (the three horizontal lines): From here, you can quickly access any of the available tabs. The buttons are only the most used functionnalities of the machine. Three others tabs are accessible only through the hamburger menu on the top left of the screen (the three horizontal lines):
@ -18,11 +20,11 @@ From here, you can quickly access any of the available tabs. The buttons are onl
This list is also available from any other tab and allows you to quickly navigate between tabs. This list is also available from any other tab and allows you to quickly navigate between tabs.
## Machine shutdown ## Machine shutdown
From this page, you can also shutdown the machine when you are done. From this page, you can also shutdown the machine when you are done.
!!! warning !!! warning
It's **very very very important** to **always** shutdown the machine and wait a minute for it to completely shutdown before unplugging the power supply! It's **very very very important** to **always** shutdown the machine and wait a minute for it to completely shutdown before unplugging the power supply!
**You risk data corruption is you savagely shutdown your machine!** **You risk data corruption is you savagely shutdown your machine!**
To shutdown the machine, first unlock the shutdown button by clicking on "Unlock Button". To shutdown the machine, first unlock the shutdown button by clicking on "Unlock Button".
@ -33,8 +35,8 @@ You can then click on "Shutdown". The machine will ask for a final confirmation
![Home Shutdown](ui_guide/home_shutdown.webp) ![Home Shutdown](ui_guide/home_shutdown.webp)
## Sample Tab ## Sample Tab
![Sample](ui_guide/sample_pass.webp) ![Sample](ui_guide/sample_pass.webp)
In this page, you can enter all the information regarding the current sample you want to image. This includes the project name, the operator, but also the type of collection device you used. In this page, you can enter all the information regarding the current sample you want to image. This includes the project name, the operator, but also the type of collection device you used.
@ -54,6 +56,7 @@ The GPS status block will give you the current information on the GPS fix and lo
Once all the fields are completed, you can go to the next tab by clicking the -> arrow. This will make sure all the inserted data is valid. Once all the fields are completed, you can go to the next tab by clicking the -> arrow. This will make sure all the inserted data is valid.
## Optic Configuration ## Optic Configuration
This page allows you to control the optical setup of the acquisition. This page allows you to control the optical setup of the acquisition.
![Optic configuration](ui_guide/optic_configuration.webp) ![Optic configuration](ui_guide/optic_configuration.webp)
@ -72,6 +75,7 @@ The Focus Adjustment block allows you to control the focus stage. With the leftm
As with all the tabs, once you are satisfied with your focus and your image settings, you can click on "Continue". As with all the tabs, once you are satisfied with your focus and your image settings, you can click on "Continue".
## Fluidic Acquisition ## Fluidic Acquisition
Finally, this is where the magic happens! You will be able to chose the final parameters of your capture. Finally, this is where the magic happens! You will be able to chose the final parameters of your capture.
![Fluidic Acquisition](ui_guide/fluidic_acquisition.webp) ![Fluidic Acquisition](ui_guide/fluidic_acquisition.webp)
@ -129,7 +133,6 @@ Clicking on the button `Reset wifi networks` will erase ALL networks saved previ
!!! warning !!! warning
Please be mindful about the security policies of your organisation before connecting your device to a network (either through Wifi or with an Ethernet cable). A lot of research institutions don't allow devices not controlled by them to be connected to their network without first going on an approved list with a least a basic security checkup. Please be mindful about the security policies of your organisation before connecting your device to a network (either through Wifi or with an Ethernet cable). A lot of research institutions don't allow devices not controlled by them to be connected to their network without first going on an approved list with a least a basic security checkup.
## Administration ## Administration
![Administration](ui_guide/administration.webp) ![Administration](ui_guide/administration.webp)
@ -153,7 +156,6 @@ The python script will also restart the python script.
Once the message displayed top right show "The segmenter is ready", you're good to go on the latest version! Once the message displayed top right show "The segmenter is ready", you're good to go on the latest version!
![Administration](ui_guide/update_ready.webp) ![Administration](ui_guide/update_ready.webp)
## Hardware Configuration ## Hardware Configuration
![Hardware Configuration](ui_guide/hardware_config.webp) ![Hardware Configuration](ui_guide/hardware_config.webp)

View file

@ -2,44 +2,44 @@
The Pi's camera module includes an LED flash driver which can be used to illuminate a scene upon capture. The flash driver has two configurable GPIO pins: The Pi's camera module includes an LED flash driver which can be used to illuminate a scene upon capture. The flash driver has two configurable GPIO pins:
* one for connection to an LED based flash (xenon flashes won't work with the camera module due to it having a `rolling shutter`). This will fire before (`flash metering`) and during capture - one for connection to an LED based flash (xenon flashes won't work with the camera module due to it having a `rolling shutter`). This will fire before (`flash metering`) and during capture
* one for an optional privacy indicator (a requirement for cameras in some jurisdictions). This will fire after taking a picture to indicate that the - one for an optional privacy indicator (a requirement for cameras in some jurisdictions). This will fire after taking a picture to indicate that the
camera has been used camera has been used
These pins are configured by updating the `VideoCore device tree blob`. Firstly, install the device tree compiler, then grab a copy of the default These pins are configured by updating the `VideoCore device tree blob`. Firstly, install the device tree compiler, then grab a copy of the default
device tree source: device tree source:
```
$ sudo apt-get install device-tree-compiler ```sh
$ wget https://github.com/raspberrypi/firmware/raw/master/extra/dt-blob.dts sudo apt-get install device-tree-compiler
wget https://github.com/raspberrypi/firmware/raw/master/extra/dt-blob.dts
``` ```
The device tree source contains a number of sections enclosed in curly braces, which form a hierarchy of definitions. The section to edit will depend on which revision of Raspberry Pi you have (check the silk-screen writing on the board for the revision number if you are unsure): The device tree source contains a number of sections enclosed in curly braces, which form a hierarchy of definitions. The section to edit will depend on which revision of Raspberry Pi you have (check the silk-screen writing on the board for the revision number if you are unsure):
Model | Section | Model | Section |
------|:--------: | -------------------------------------- | :----------------------- |
Raspberry Pi Model B rev 1 | `/videocore/pins_rev1` | Raspberry Pi Model B rev 1 | `/videocore/pins_rev1` |
Raspberry Pi Model A and Model B rev 2 | `/videocore/pins_rev2` | Raspberry Pi Model A and Model B rev 2 | `/videocore/pins_rev2` |
Raspberry Pi Model A+ | `/videocore/pins_aplus` | Raspberry Pi Model A+ | `/videocore/pins_aplus` |
Raspberry Pi Model B+ rev 1.1 | `/videocore/pins_bplus1` | Raspberry Pi Model B+ rev 1.1 | `/videocore/pins_bplus1` |
Raspberry Pi Model B+ rev 1.2 | `/videocore/pins_bplus2` | Raspberry Pi Model B+ rev 1.2 | `/videocore/pins_bplus2` |
Raspberry Pi 2 Model B rev 1.0 | `/videocore/pins_2b1` | Raspberry Pi 2 Model B rev 1.0 | `/videocore/pins_2b1` |
Raspberry Pi 2 Model B rev 1.1-1.2 | `/videocore/pins_2b2` | Raspberry Pi 2 Model B rev 1.1-1.2 | `/videocore/pins_2b2` |
Raspberry Pi 3 Model B rev 1.0 | `/videocore/pins_3b1` | Raspberry Pi 3 Model B rev 1.0 | `/videocore/pins_3b1` |
Raspberry Pi 3 Model B rev 1.2 | `/videocore/pins_3b2` | Raspberry Pi 3 Model B rev 1.2 | `/videocore/pins_3b2` |
Raspberry Pi Zero rev 1.2-1.3 | `/videocore/pins_pi0` | Raspberry Pi Zero rev 1.2-1.3 | `/videocore/pins_pi0` |
Under the section for your particular model of Pi you will find `pin_config` and `pin_defines` sections. Under the `pin_config` section you need to configure the GPIO pins you want to use for the flash and privacy indicator as using pull down termination. Then, under the `pin_defines` section you need to associate those pins with the `FLASH_0_ENABLE` and `FLASH_0_INDICATOR` pins. Under the section for your particular model of Pi you will find `pin_config` and `pin_defines` sections. Under the `pin_config` section you need to configure the GPIO pins you want to use for the flash and privacy indicator as using pull down termination. Then, under the `pin_defines` section you need to associate those pins with the `FLASH_0_ENABLE` and `FLASH_0_INDICATOR` pins.
For example, to configure GPIO 17 as the flash pin, leaving the privacy indicator pin absent, on a Raspberry Pi 2 Model B rev 1.1 you would add the following line under the `/videocore/pins_2b2/pin_config` section: For example, to configure GPIO 17 as the flash pin, leaving the privacy indicator pin absent, on a Raspberry Pi 2 Model B rev 1.1 you would add the following line under the `/videocore/pins_2b2/pin_config` section:
```
```txt
pin@p17 { function = "output"; termination = "pull_down"; }; pin@p17 { function = "output"; termination = "pull_down"; };
``` ```
Please note that GPIO pins will be numbered according to the `Broadcom pin numbers`(BCM mode in the RPi.GPIO library, *not* BOARD mode). Then change the following section under `/videocore/pins_2b2/pin_defines`. Specifically, change the type from "absent" to "internal", and add a number property defining the flash pin as GPIO 17: Please note that GPIO pins will be numbered according to the `Broadcom pin numbers`(BCM mode in the RPi.GPIO library, _not_ BOARD mode). Then change the following section under `/videocore/pins_2b2/pin_defines`. Specifically, change the type from "absent" to "internal", and add a number property defining the flash pin as GPIO 17:
``` ```c
pin_define@FLASH_0_ENABLE { pin_define@FLASH_0_ENABLE {
type = "internal"; type = "internal";
number = <17>; number = <17>;
@ -47,35 +47,40 @@ Please note that GPIO pins will be numbered according to the `Broadcom pin numbe
``` ```
With the device tree source updated, you now need to compile it into a binary blob for the firmware to read. This is done with the following command line: With the device tree source updated, you now need to compile it into a binary blob for the firmware to read. This is done with the following command line:
```
$ dtc -q -I dts -O dtb dt-blob.dts -o dt-blob.bin ```sh
dtc -q -I dts -O dtb dt-blob.dts -o dt-blob.bin
``` ```
Dissecting this command line, the following components are present: Dissecting this command line, the following components are present:
* `dtc` - Execute the device tree compiler
* `-I dts` - The input file is in device tree source format
* `-O dtb` - The output file should be produced in device tree binary format
* `dt-blob.dts` - The first anonymous parameter is the input filename
* `-o dt-blob.bin` - The output filename
This should output nothing. If you get lots of warnings, you've forgotten the `-q` switch; you can ignore the warnings. If anything else is output, it will most likely be an error message indicating you have made a mistake in the device tree source. In this case, review your edits carefully (note that sections and properties *must* be semi-colon terminated for example), and try again. - `dtc` - Execute the device tree compiler
- `-I dts` - The input file is in device tree source format
- `-O dtb` - The output file should be produced in device tree binary format
- `dt-blob.dts` - The first anonymous parameter is the input filename
- `-o dt-blob.bin` - The output filename
This should output nothing. If you get lots of warnings, you've forgotten the `-q` switch; you can ignore the warnings. If anything else is output, it will most likely be an error message indicating you have made a mistake in the device tree source. In this case, review your edits carefully (note that sections and properties _must_ be semi-colon terminated for example), and try again.
Now the device tree binary blob has been produced, it needs to be placed on the first partition of the SD card. In the case of non-NOOBS Raspbian installs, this is generally the partition mounted as `/boot`: Now the device tree binary blob has been produced, it needs to be placed on the first partition of the SD card. In the case of non-NOOBS Raspbian installs, this is generally the partition mounted as `/boot`:
```
$ sudo cp dt-blob.bin /boot/ ```sh
sudo cp dt-blob.bin /boot/
``` ```
However, in the case of NOOBS Raspbian installs, this is the recovery partition, which is not mounted by default: However, in the case of NOOBS Raspbian installs, this is the recovery partition, which is not mounted by default:
```
$ sudo mkdir /mnt/recovery ```sh
$ sudo mount /dev/mmcblk0p1 /mnt/recovery sudo mkdir /mnt/recovery
$ sudo cp dt-blob.bin /mnt/recovery sudo mount /dev/mmcblk0p1 /mnt/recovery
$ sudo umount /mnt/recovery sudo cp dt-blob.bin /mnt/recovery
$ sudo rmdir /mnt/recovery sudo umount /mnt/recovery
sudo rmdir /mnt/recovery
``` ```
Please note that the filename and location are important. The binary blob must be named `dt-blob.bin` (all lowercase), and it must be placed in the root Please note that the filename and location are important. The binary blob must be named `dt-blob.bin` (all lowercase), and it must be placed in the root
directory of the first partition on the SD card. Once you have rebooted the Pi (to activate the new device tree configuration) you can test the flash with the following simple script: directory of the first partition on the SD card. Once you have rebooted the Pi (to activate the new device tree configuration) you can test the flash with the following simple script:
```python ```python
import picamera import picamera
@ -91,8 +96,11 @@ You should see your flash LED blink twice during the execution of the script.
For reference, the flash driver chips we have used on mobile phones will often drive up to 500mA into the LED. If you're aiming for that, then please think about your power supply too. For reference, the flash driver chips we have used on mobile phones will often drive up to 500mA into the LED. If you're aiming for that, then please think about your power supply too.
If you wish to experiment with the flash driver without attaching anything to the GPIO pins, you can also reconfigure the camera's own LED to act as the flash LED. Obviously this is no good for actual flash photography but it can demonstrate whether your configuration is good. In this case you need not add anything to the `pin_config` section (the camera's LED pin is already defined to use pull down termination), but you do need to set `CAMERA_0_LED` to absent, and `FLASH_0_ENABLE` to the old `CAMERA_0_LED` definition (this will be pin 5 in the case of `pins_rev1` and `pins_rev2``, and pin 32 in the case of everything else). For example, change: If you wish to experiment with the flash driver without attaching anything to the GPIO pins, you can also reconfigure the camera's own LED to act as the flash LED. Obviously this is no good for actual flash photography but it can demonstrate whether your configuration is good. In this case you need not add anything to the `pin_config` section (the camera's LED pin is already defined to use pull down termination), but you do need to set `CAMERA_0_LED` to absent, and `FLASH_0_ENABLE` to the old `CAMERA_0_LED` definition (this will be pin 5 in the case of `pins_rev1` and `pins_rev2``, and pin 32 in the case of everything else).
```
For example, change:
```c
pin_define@CAMERA_0_LED { pin_define@CAMERA_0_LED {
type = "internal"; type = "internal";
number = <5>; number = <5>;
@ -104,7 +112,7 @@ If you wish to experiment with the flash driver without attaching anything to th
into this: into this:
``` ```c
pin_define@CAMERA_0_LED { pin_define@CAMERA_0_LED {
type = "absent"; type = "absent";
}; };

View file

@ -1,44 +1,44 @@
Qty|Value |Device |Package |Parts |Description |MPN |Order Link |Alternative MPN | Alternative Order Link | Qty | Value | Device | Package | Parts | Description | MPN | Order Link | Alternative MPN | Alternative Order Link |
:-:|----------------|----------------------------|--------------------|-------------------------------|--------------------------------------------------|---------------------|-----------|----------------|----------------------- | :-: | ------------------ | ---------------------------- | -------------------- | ------------------------------- | ------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------- |
1 |1.2nF |Capacitor Ceramic |0805 |C13 |Ceramic Capacitors |C0805C122K5RACTU |https://www.mouser.fr/ProductDetail/KEMET/C0805C122K5RACTU/?qs=NIa6rHQlSswqUPePPDFdig%3D%3D| | | 1 | 1.2nF | Capacitor Ceramic | 0805 | C13 | Ceramic Capacitors | C0805C122K5RACTU | <https://www.mouser.fr/ProductDetail/KEMET/C0805C122K5RACTU/?qs=NIa6rHQlSswqUPePPDFdig%3D%3D> | |
7 |100nF 100V |Capacitor Ceramic |0805 |C1, C2, C3, C11, C12 , C21, C22|Ceramic Capacitors |CL21B104KCFSFNE |https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B104KCFSFNE/?qs=yOVawPpwOwlgEcd1Ttc9BA%3D%3D | | | 7 | 100nF 100V | Capacitor Ceramic | 0805 | C1, C2, C3, C11, C12 , C21, C22 | Ceramic Capacitors | CL21B104KCFSFNE | <https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B104KCFSFNE/?qs=yOVawPpwOwlgEcd1Ttc9BA%3D%3D> | |
2 |220nF |Capacitor Ceramic |0805 |C25, C28 |Ceramic Capacitors |CL21B224KBFNNNG |https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B224KBFNNNG/?qs=hqM3L16%252Bxld2kKInBt3c6Q%3D%3D | | | 2 | 220nF | Capacitor Ceramic | 0805 | C25, C28 | Ceramic Capacitors | CL21B224KBFNNNG | <https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B224KBFNNNG/?qs=hqM3L16%252Bxld2kKInBt3c6Q%3D%3D> | |
5 |10uF |Capacitor Ceramic |0805 |C14, C15, C16, C17, C19 |Ceramic Capacitors |CL21A106KOQNNNG |https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21A106KOQNNNG/?qs=hqM3L16%252BxlcMWI7QbqH0LA%3D%3D | | | 5 | 10uF | Capacitor Ceramic | 0805 | C14, C15, C16, C17, C19 | Ceramic Capacitors | CL21A106KOQNNNG | <https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21A106KOQNNNG/?qs=hqM3L16%252BxlcMWI7QbqH0LA%3D%3D> | |
7 |10uF 35V |Capacitor Ceramic |0805 |C4, C5, C6, C7, C8, C9, C10 |Ceramic Capacitors |GRM21BR61H106KE43L |https://www.mouser.fr/ProductDetail/Murata-Electronics/GRM21BR61H106KE43L/?qs=lYGu3FyN48cBZlIduWKclg%3D%3D | | | 7 | 10uF 35V | Capacitor Ceramic | 0805 | C4, C5, C6, C7, C8, C9, C10 | Ceramic Capacitors | GRM21BR61H106KE43L | <https://www.mouser.fr/ProductDetail/Murata-Electronics/GRM21BR61H106KE43L/?qs=lYGu3FyN48cBZlIduWKclg%3D%3D> | |
1 |100µF 10VDC |Capacitor Polarised Tantalum|2412 (6032 metric) |C18 |Capacitor Polarised |TPSC107K010T0200 |https://www.mouser.fr/ProductDetail/AVX/TPSC107K010T0200/?qs=%2Fha2pyFaduiZPcj7UUG8CecpOo2UHFHg6mJX9az5PlmwOj8%2FRFv3qA%3D%3D | | | 1 | 100µF 10VDC | Capacitor Polarised Tantalum | 2412 (6032 metric) | C18 | Capacitor Polarised | TPSC107K010T0200 | <https://www.mouser.fr/ProductDetail/AVX/TPSC107K010T0200/?qs=%2Fha2pyFaduiZPcj7UUG8CecpOo2UHFHg6mJX9az5PlmwOj8%2FRFv3qA%3D%3D> | |
3 |1µF |Capacitor Ceramic |0805 |C26, C29, C20 |Ceramic Capacitors |CL21B105KAFNFNE |https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B105KAFNFNE/?qs=%252B6g0mu59x7LIqMOGGtEcpA%3D%3D | | | 3 | 1µF | Capacitor Ceramic | 0805 | C26, C29, C20 | Ceramic Capacitors | CL21B105KAFNFNE | <https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21B105KAFNFNE/?qs=%252B6g0mu59x7LIqMOGGtEcpA%3D%3D> | |
2 |4.7µF |Capacitor Ceramic |0805 |C23, C27 |Ceramic Capacitors |CL21A475KAQNNNG |https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21A475KAQNNNG/?qs=yOVawPpwOwnnyiHyGRHclw%3D%3D | | | 2 | 4.7µF | Capacitor Ceramic | 0805 | C23, C27 | Ceramic Capacitors | CL21A475KAQNNNG | <https://www.mouser.fr/ProductDetail/Samsung-Electro-Mechanics/CL21A475KAQNNNG/?qs=yOVawPpwOwnnyiHyGRHclw%3D%3D> | |
1 |1F-10F 3V |Supercap |8X3.5X0.9 |C24 |WCAP-PTHT Aluminum Polymer Capacitors |DSF106Q3R0 |https://www.mouser.fr/ProductDetail/Cornell-Dubilier-CDE/DSF106Q3R0/?qs=TiOZkKH1s2RiCLa3r8Elsw%3D%3D |SCCR16E205PRB |https://www.mouser.fr/ProductDetail/AVX/SCCR16E205PRB/?qs=qSfuJ%252Bfl%2Fd7eMHsQ5Du%252B0w%3D%3D | 1 | 1F-10F 3V | Supercap | 8X3.5X0.9 | C24 | WCAP-PTHT Aluminum Polymer Capacitors | DSF106Q3R0 | <https://www.mouser.fr/ProductDetail/Cornell-Dubilier-CDE/DSF106Q3R0/?qs=TiOZkKH1s2RiCLa3r8Elsw%3D%3D> | SCCR16E205PRB | <https://www.mouser.fr/ProductDetail/AVX/SCCR16E205PRB/?qs=qSfuJ%252Bfl%2Fd7eMHsQ5Du%252B0w%3D%3D> |
2 |2R / 10R |Resistor |0805 |R16, R17 |Resistors |CRCW08052R00FKEA |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08052R00FKEA/?qs=sGAEpiMZZMvdGkrng054t1VbmbR8V6nMYkjW88fKAys%3D | | | 2 | 2R / 10R | Resistor | 0805 | R16, R17 | Resistors | CRCW08052R00FKEA | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08052R00FKEA/?qs=sGAEpiMZZMvdGkrng054t1VbmbR8V6nMYkjW88fKAys%3D> | |
1 |10R |Resistor |0805 |R6 |Resistors |CRCW080510R0FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080510R0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gUet6HMFspYNp5h1axhY5mw%3D%3D | | | 1 | 10R | Resistor | 0805 | R6 | Resistors | CRCW080510R0FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080510R0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gUet6HMFspYNp5h1axhY5mw%3D%3D> | |
1 |499R |Resistor |0805 |R11 |Resistors |CR0805-FX-4990ELF |https://www.mouser.fr/ProductDetail/Bourns/CR0805-FX-4990ELF/?qs=sGAEpiMZZMvdGkrng054t%252BRNGJdg958RPRT4PRu8QUk%3D | | | 1 | 499R | Resistor | 0805 | R11 | Resistors | CR0805-FX-4990ELF | <https://www.mouser.fr/ProductDetail/Bourns/CR0805-FX-4990ELF/?qs=sGAEpiMZZMvdGkrng054t%252BRNGJdg958RPRT4PRu8QUk%3D> | |
1 |1k |Resistor |0805 |R3 |Resistors |CRCW08051K00FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08051K00FKEAC/?qs=sGAEpiMZZMvdGkrng054t0PR8nwhaYvFk03hm7%252BP4yw%3D | | | 1 | 1k | Resistor | 0805 | R3 | Resistors | CRCW08051K00FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08051K00FKEAC/?qs=sGAEpiMZZMvdGkrng054t0PR8nwhaYvFk03hm7%252BP4yw%3D> | |
1 |2.2k 1% |Resistor |0805 |R7 |Resistors |CRCW08052K20FKEA |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08052K20FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGuFFC5Og%2FqMn8%3D | | | 1 | 2.2k 1% | Resistor | 0805 | R7 | Resistors | CRCW08052K20FKEA | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08052K20FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGuFFC5Og%2FqMn8%3D> | |
2 |3.9k |Resistor |0805 |R1, R2 |Resistors |CRCW08053K90FKEA |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08053K90FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGuTYngavIqSY8%3D | | | 2 | 3.9k | Resistor | 0805 | R1, R2 | Resistors | CRCW08053K90FKEA | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08053K90FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGuTYngavIqSY8%3D> | |
1 |4.99k |Resistor |0805 |R12 |Resistors |CRCW08054K99FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08054K99FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8g%2F7ymnn7FEGW0GG%2FpsF6WEQ%3D%3D | | | 1 | 4.99k | Resistor | 0805 | R12 | Resistors | CRCW08054K99FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW08054K99FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8g%2F7ymnn7FEGW0GG%2FpsF6WEQ%3D%3D> | |
6 |10k 1% |Resistor |0805 |R9, R13, R14, R15, R18, R19 |Resistors |CRCW080510K0FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080510K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gfqkSxP9fr9ZR4z%2FeBWdvcw%3D%3D | | | 6 | 10k 1% | Resistor | 0805 | R9, R13, R14, R15, R18, R19 | Resistors | CRCW080510K0FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080510K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gfqkSxP9fr9ZR4z%2FeBWdvcw%3D%3D> | |
2 |12k 1% |Resistor |0805 |R4, R5 |Resistors |CRCW080512K0FKEA |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080512K0FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGu5Vau95zlXps%3D | | | 2 | 12k 1% | Resistor | 0805 | R4, R5 | Resistors | CRCW080512K0FKEA | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080512K0FKEA/?qs=sGAEpiMZZMvdGkrng054txEw7b1YnvGu5Vau95zlXps%3D> | |
1 |20k 1% |Resistor |0805 |R8 |Resistors |CRCW080520K0FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080520K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gy1%2FAQRrEahhEgDysdi6Y0w%3D%3D | | | 1 | 20k 1% | Resistor | 0805 | R8 | Resistors | CRCW080520K0FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080520K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gy1%2FAQRrEahhEgDysdi6Y0w%3D%3D> | |
1 |47k 1% |Resistor |0805 |R10 |Resistors |CRCW080547K0FKEAC |https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080547K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gUgaxOQtvYvv91DEGwPYUUg%3D%3D | | | 1 | 47k 1% | Resistor | 0805 | R10 | Resistors | CRCW080547K0FKEAC | <https://www.mouser.fr/ProductDetail/Vishay-Dale/CRCW080547K0FKEAC/?qs=sGAEpiMZZMvdGkrng054t0DrEhLhGh8gUgaxOQtvYvv91DEGwPYUUg%3D%3D> | |
1 |40MM_FAN |FAN PWM Control |40MM_FAN |FAN | |NF-A4x10 5V PWM |https://www.amazon.fr/NF-A4x10-5V-PWM-Ventilateur-silencieux/dp/B07DXS86G7/ | | | 1 | 40MM_FAN | FAN PWM Control | 40MM_FAN | FAN | | NF-A4x10 5V PWM | <https://www.amazon.fr/NF-A4x10-5V-PWM-Ventilateur-silencieux/dp/B07DXS86G7/> | |
2 |2828XX-2282834-2 |2828XX-2282834-2 |TERMBLK_254-2N |LED1, LED2 |2 Position Wire to Board Terminal Block |282834-2 |https://fr.farnell.com/buchanan-te-connectivity/282834-2/terminal-block-pcb-30-16awg-2/dp/2112482?st=282834-2 |1814841 + 1814980 |https://www.mouser.fr/ProductDetail/Phoenix-Contact/1814841/?qs=%2Fha2pyFadugD6Bmywnn0QUWDHSwFu5N4gQjMqCsq5LQ%3D + | 2 | 2828XX-2282834-2 | 2828XX-2282834-2 | TERMBLK_254-2N | LED1, LED2 | 2 Position Wire to Board Terminal Block | 282834-2 | <https://fr.farnell.com/buchanan-te-connectivity/282834-2/terminal-block-pcb-30-16awg-2/dp/2112482?st=282834-2> | 1814841 + 1814980 | <https://www.mouser.fr/ProductDetail/Phoenix-Contact/1814841/?qs=%2Fha2pyFadugD6Bmywnn0QUWDHSwFu5N4gQjMqCsq5LQ%3D> + |
1 |2828XX-2282837-2 |2828XX-2282837-2 |TERMBLK_508-2N |INPUT |2 Position Wire to Board Terminal Block |TC0203620000G |https://www.mouser.fr/ProductDetail/Amphenol-Anytek/TC0203620000G/?qs=Mv7BduZupUiHURQaUHJ1XQ%3D%3D |1792863|https://www.mouser.fr/ProductDetail/Phoenix-Contact/1792863/?qs=YjJcVSlHJPU69DDcZ8WVCg%3D%3D | 1 | 2828XX-2282837-2 | 2828XX-2282837-2 | TERMBLK_508-2N | INPUT | 2 Position Wire to Board Terminal Block | TC0203620000G | <https://www.mouser.fr/ProductDetail/Amphenol-Anytek/TC0203620000G/?qs=Mv7BduZupUiHURQaUHJ1XQ%3D%3D> | 1792863 | <https://www.mouser.fr/ProductDetail/Phoenix-Contact/1792863/?qs=YjJcVSlHJPU69DDcZ8WVCg%3D%3D> |
1 |2x20pins 2.54mm |Stacking header |2x20 |K1 |Stacking pin header |M20-6102045 |https://fr.farnell.com/harwin/m20-6102045/fiche-femelle-pc-104-20voies/dp/1569230 | | | 1 | 2x20pins 2.54mm | Stacking header | 2x20 | K1 | Stacking pin header | M20-6102045 | <https://fr.farnell.com/harwin/m20-6102045/fiche-femelle-pc-104-20voies/dp/1569230> | |
2 |2pins 2.54mm |Female Header Vertical |1x2 |P6, P9 |Pin Header |801-87-040-10-001101 |https://www.mouser.fr/ProductDetail/Preci-dip/801-87-040-10-001101/?qs=FtMuP6KVi2Q5EJHayha1aA%3D%3D | | | 2 | 2pins 2.54mm | Female Header Vertical | 1x2 | P6, P9 | Pin Header | 801-87-040-10-001101 | <https://www.mouser.fr/ProductDetail/Preci-dip/801-87-040-10-001101/?qs=FtMuP6KVi2Q5EJHayha1aA%3D%3D> | |
4 |8pins 2.54mm |Female Header Vertical |1x8 |P4, P5, P7, P8 |Pin Header |combined with above | | | | 4 | 8pins 2.54mm | Female Header Vertical | 1x8 | P4, P5, P7, P8 | Pin Header | combined with above | | |
1 |4pins 2.54mm |Female Header Vertical |1x4 |OLED |Pin Header |combined with above | | | | 1 | 4pins 2.54mm | Female Header Vertical | 1x4 | OLED | Pin Header | combined with above | | |
2 |S4B-XH-SM4-TB |4pin SMD connector |S4B-XH-SM4-TB_JST |MOT1, MOT2 | |S4B-XH-SM4-TB(LF)(SN)|https://fr.farnell.com/jst-japan-solderless-terminals/s4b-xh-sm4-tb-lf-sn/connecteur-header-4pos-2-5mm-1/dp/2399335 | | | 2 | S4B-XH-SM4-TB | 4pin SMD connector | S4B-XH-SM4-TB_JST | MOT1, MOT2 | | S4B-XH-SM4-TB(LF)(SN) | <https://fr.farnell.com/jst-japan-solderless-terminals/s4b-xh-sm4-tb-lf-sn/connecteur-header-4pos-2-5mm-1/dp/2399335> | |
2 |40V 500MA |Diode Schottky |SOD-123 |D3, D4 |B0540W |B0540W-7-F |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/B0540W-7-F/?qs=YXkucIlFnjz2bH5zQm6HNw%3D%3D | | | 2 | 40V 500MA | Diode Schottky | SOD-123 | D3, D4 | B0540W | B0540W-7-F | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/B0540W-7-F/?qs=YXkucIlFnjz2bH5zQm6HNw%3D%3D> | |
2 |10µH |Inductor molded |1210 (3225 metric) |L2, L3 |Inductor |CBC3225T100KR |https://www.mouser.fr/ProductDetail/Taiyo-Yuden/CBC3225T100KR/?qs=I6KAKw0tg2xBtBHDie3dYA%3D%3D | | | 2 | 10µH | Inductor molded | 1210 (3225 metric) | L2, L3 | Inductor | CBC3225T100KR | <https://www.mouser.fr/ProductDetail/Taiyo-Yuden/CBC3225T100KR/?qs=I6KAKw0tg2xBtBHDie3dYA%3D%3D> | |
1 |3.3µH/±20%/4.5A |Inductor |SRN6045 |L1 |Inductor |SRN6045TA-3R3Y |https://www.mouser.fr/ProductDetail/Bourns/SRN6045TA-3R3Y/?qs=%2Fha2pyFaduixm1pedfESyrDoAGExuFam9impyPniigzQgJLIYoAwtQ%3D%3D | | | 1 | 3.3µH/±20%/4.5A | Inductor | SRN6045 | L1 | Inductor | SRN6045TA-3R3Y | <https://www.mouser.fr/ProductDetail/Bourns/SRN6045TA-3R3Y/?qs=%2Fha2pyFaduixm1pedfESyrDoAGExuFam9impyPniigzQgJLIYoAwtQ%3D%3D> | |
1 |5V 5A |Voltage Regulator |SO-8EP_DIO |U3 | |AP64501SP-13 |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/AP64501SP-13/?qs=P1JMDcb91o7FS0GU%252BW7TIQ%3D%3D | | | 1 | 5V 5A | Voltage Regulator | SO-8EP_DIO | U3 | | AP64501SP-13 | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/AP64501SP-13/?qs=P1JMDcb91o7FS0GU%252BW7TIQ%3D%3D> | |
1 |12V 300mA |Diode Zener |SODFL 1608 X70 |D1 |Zener Diode |BZT52C12T-7 |https://www.mouser.fr/ProductDetail/621-BZT52C12T-7/ | | | 1 | 12V 300mA | Diode Zener | SODFL 1608 X70 | D1 | Zener Diode | BZT52C12T-7 | <https://www.mouser.fr/ProductDetail/621-BZT52C12T-7/> | |
1 |600V 1A |Diode |DO-214AC(SMA) |D2 |Diode Rectifier |FM4005 |https://www.mouser.fr/ProductDetail/Rectron/FM4005/?qs=sGAEpiMZZMtbRapU8LlZDxWiYCajBUyV8CYZfLuTecw%3D | | | 1 | 600V 1A | Diode | DO-214AC(SMA) | D2 | Diode Rectifier | FM4005 | <https://www.mouser.fr/ProductDetail/Rectron/FM4005/?qs=sGAEpiMZZMtbRapU8LlZDxWiYCajBUyV8CYZfLuTecw%3D> | |
1 |DMMT5401 |Dual PNP |SOT26 |U4 | |DMMT5401-7-F |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMMT5401-7-F/?qs=hiZRsJxw0h3f7LzTPwvEFQ%3D%3D | | | 1 | DMMT5401 | Dual PNP | SOT26 | U4 | | DMMT5401-7-F | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMMT5401-7-F/?qs=hiZRsJxw0h3f7LzTPwvEFQ%3D%3D> | |
1 |30V 5.2A 28mΩ |Mosfet N Channel |SOT23-3 |Q1 |N-channel MOSFET |IRLML0030TRPBF |https://www.mouser.fr/ProductDetail/Infineon-IR/IRLML0030TRPBF/?qs=9%252BKlkBgLFf0lLJi3xz1alg%3D%3D | | | 1 | 30V 5.2A 28mΩ | Mosfet N Channel | SOT23-3 | Q1 | N-channel MOSFET | IRLML0030TRPBF | <https://www.mouser.fr/ProductDetail/Infineon-IR/IRLML0030TRPBF/?qs=9%252BKlkBgLFf0lLJi3xz1alg%3D%3D> | |
1 |20V 4.2A 52mΩ 1.4W|Mosfet P-Channel |SOT23-3 |Q2 |P-channel MOSFET |DMG2305UX-7 |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMG2305UX-7/?qs=L1DZKBg7t5F%2FNBHrjfxC%252Bg%3D%3D | | | 1 | 20V 4.2A 52mΩ 1.4W | Mosfet P-Channel | SOT23-3 | Q2 | P-channel MOSFET | DMG2305UX-7 | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMG2305UX-7/?qs=L1DZKBg7t5F%2FNBHrjfxC%252Bg%3D%3D> | |
1 |30V 35A |Mosfet P-Channel |POWERDI3333-8_UX_DIO|Q3 |P-channel MOSFET |DMP3013SFV-7 |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMP3013SFV-7/?qs=W0yvOO0ixfH1hnmiAtL1VQ%3D%3D | | | 1 | 30V 35A | Mosfet P-Channel | POWERDI3333-8_UX_DIO | Q3 | P-channel MOSFET | DMP3013SFV-7 | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/DMP3013SFV-7/?qs=W0yvOO0ixfH1hnmiAtL1VQ%3D%3D> | |
1 |32Kbit I2C |EEPROM |SOIC8 |U1 |EEPROM 32Kbit |M24C32-RMN6P |https://www.mouser.fr/ProductDetail/STMicroelectronics/M24C32-RMN6P/?qs=eb%2FRSZx1fMs5wlkq%2FbnRHQ%3D%3D | | | 1 | 32Kbit I2C | EEPROM | SOIC8 | U1 | EEPROM 32Kbit | M24C32-RMN6P | <https://www.mouser.fr/ProductDetail/STMicroelectronics/M24C32-RMN6P/?qs=eb%2FRSZx1fMs5wlkq%2FbnRHQ%3D%3D> | |
1 |RV-3028 |RTC Low power |RV-3028 |U6 |RV-3028 - RTC with I2C Bus |RV-3028-C7 |https://www.mouser.fr/ProductDetail/Micro-Crystal/RV-3028-C7-32768kHz-1ppm-TA-QC/?qs=u16ybLDytRaU7ZFJl2AxfQ%3D%3D | | | 1 | RV-3028 | RTC Low power | RV-3028 | U6 | RV-3028 - RTC with I2C Bus | RV-3028-C7 | <https://www.mouser.fr/ProductDetail/Micro-Crystal/RV-3028-C7-32768kHz-1ppm-TA-QC/?qs=u16ybLDytRaU7ZFJl2AxfQ%3D%3D> | |
2 |1 channel, 1A |LED Driver |SOT-23 DBV6 |U5, U7 |LED Driver |TPS61165DBVR |https://www.mouser.fr/ProductDetail/Texas-Instruments/TPS61165DBVR/?qs=HM7Ob9npyBLl0sTgi6JQSQ%3D%3D | | | 2 | 1 channel, 1A | LED Driver | SOT-23 DBV6 | U5, U7 | LED Driver | TPS61165DBVR | <https://www.mouser.fr/ProductDetail/Texas-Instruments/TPS61165DBVR/?qs=HM7Ob9npyBLl0sTgi6JQSQ%3D%3D> | |
1 |AP2112K-3.3V |Voltage regulator 3.3V |SOT23-5 |U2 |AP2112 - 600mA CMOS LDO Regulator w/ Enable |AP2112K-3.3TRG1 |https://www.mouser.fr/ProductDetail/Diodes-Incorporated/AP2112K-33TRG1/?qs=x6A8l6qLYDDPYHosCdzh%2FA%3D%3D | | | 1 | AP2112K-3.3V | Voltage regulator 3.3V | SOT23-5 | U2 | AP2112 - 600mA CMOS LDO Regulator w/ Enable | AP2112K-3.3TRG1 | <https://www.mouser.fr/ProductDetail/Diodes-Incorporated/AP2112K-33TRG1/?qs=x6A8l6qLYDDPYHosCdzh%2FA%3D%3D> | |