Bee Prepared! - Sunflower Pollen Sensor and Moving Bee With Lights Display
by -agneta- in Circuits > Arduino
14 Views, 0 Favorites, 0 Comments
Bee Prepared! - Sunflower Pollen Sensor and Moving Bee With Lights Display

A pollen detection kit for children to learn and understand their allergies. A local pollen sensor part that connects to a bee display. The bee has a trafficlight colour system to understand if the pollen levels are high or low.
Supplies
Electronics
- 3 WeMo's D1 mini
- Neo pixels, 20mm apart, strip of 12
- Wires (male to female, female to female)
- Sharp GP2Y1010AU0F dust sensor
- Servo motor
- 150 OHM resistor
- 220 Capacitor
Materials
- PLA 3D print filament
- 3D printer
- Clay plant pot
- Balsa wood
- Masking or electrical tape
- Sheets of 3mm acrylic (1 white, 1 clear)
- MDF 3mm
- Paint ( acrylic and spray)
- Car body filler
- Plastic primer
The Sunflower




Making the Sunflower
To begin making the physical 3D printed parts of the flower to house the dust sensor, we sketched each part on Fusion 360. There were 3 different parts to this flower, the stem part, the flower petal part and then finally the flower centre part that covers the sensor.
Once these parts had been sketched, they were exported from Fusion 360 and sliced using Ultimaker Cura to create the G-code files to send to the 3D printer. We chose to print all of these parts from PLA filament with a 1mm wall thickness, a 1mm top and bottom thickness and a 10% cubic infill. This gave the parts enough strength while also not wasting filament and reduced the print time slightly. In total, it took around 32 hours to print the three parts.
Once the parts had finished printing, we removed all support material with pliers and sanded them starting with 100 grit sandpaper and then worked up to 320 grit to smooth the surface finish prior to filling. After this, we mixed up a small amount of car body panel filler and applied it to any of the low spots in the surface of the prints. Once this cured, we sanded it down smooth with 400 grit sand paper.
To create a soil like texture around the base of the flower stem, we mixed table salt with white acrylic paint to make a paste which could be shaped to create a soil effect. Once this had dried, we brushed a layer of PVA glue over the salt and paint mix to seal it in.
To begin painting, we gave all of the parts a light coat of clear plastic primer to help the colour coat of paint stick to the parts. The flower petal part was the given 2 coats of yellow spray paint, the flower centre part got 2 coats of black spray paint and the stem was brush painted in a green colour. The very bottom of the flower petal part where it connected to the stem, was also painted in this same green colour. We also brush painted the textured part at the bottom of the stem a brown colour to give it a soil appearance.
Rather than 3D printing the plant pot, we decided that it would be much better use of our time to just buy a small terracotta plant pot to use to place these parts in.
Once all parts and been painted we started to assemble them. I had initially thought that we could have needed to use glue to secure the stem into the flower petal part, but in the end these two parts were a tight enough tolerance fit that no glue was needed.
We used a small amount of hot glue to secure the dust sensor to the print to ensure the hole in the sensor lined up with the hole in the printed part and didn’t move. The wires for the sensor were then passed down through the hole in the stem and reconnected to the breadboard below in the plant pot. The flower centre part was then also secured in place with a small dab of hot glue.
Sunflower Code
We used code connecting our D1 mini’s to the internet and then connected it to a broker on mqtt, to send data that the sunflower would collect and send through to the rest of the D1’s for them to translate the data into there outputs.
The dust sensor and D1 is fully hidden inside the pot making it look clean and with the small hole in the top to allow pollen to fall onto the sensor.
This worked and accuratley send the data through to MQTT for the other D1's to retrive the figures.
The Bee




Making the Bee
Using the STL file given, 3D print all components at 1:1 scale. This will comprise the bee's main body, two wings, two wing pins, a gear stand and cover, and a base plate on which the bee will sit.
Once you have your 3D prints, sand them to remove any defects. Start with coarse sandpaper and work your way up to fine sandpaper to get a smooth surface finish for the paint to settle on.
Spray-paint or paint the wings and main body in the preferred colours. The wings in the example are bright blue, whereas the body of the bee is yellow. Allow the paint to dry completely before adding a second layer. Sand between each application to ensure that the paint is free of lumps.
Apply masking tape on the main bee. Mask off any sections you wish to remain yellow. To better portray the bee, we masked out the horizontal lines going around its body as well as the eyes. We painted the exposed portions with the colour of our choosing, in this case black matt spray paint, and allowed them to dry completely. Once dry, remove all masking tape. If any black spray paint escaped behind the masking tape, use the same colour as on the main body and a fine paintbrush to make any necessary touch-ups.
Apply the finishing coat of your choosing. For our bee, we utilised a satin finish to seal in the painted surface, preventing flaking and giving it a more polished appearance. Allow it to thoroughly dry before proceeding to assembly.
Using a strong adhesive, attach the bee to the 3D-printed base plate. We used super glue. Make sure it's secure, as this is where the bee's components will be stored.
Attach the mini servo motor to the gear stand in the allocated slot, ensuring that it is the proper distance from the other gear cog. We used super glue to ensure that it did not come free. Attach one of the gears in the middle using the servo plastic arm; attempt to line it as closely as possible to the centre while avoiding getting glue on any of the gear teeth. This gear may be simply attached and detached from the servo, making it easier to modify the wings later.
Apply the wing pins from before. Adhere the flat rectangular component to the back of both gears. It makes no difference where they are placed; they may be rotated when needed l ater.
Use the gear that is not attached to the servo arm. Place it on the expanded section of the gear stand. Make sure it's sitting flat. Once you're satisfied with how it sits on top of it, use the gear cover to keep it together. Make sure there isn't too much space among the gear to keep them from slipping out of place. Then, using an adhesive, connect the gear cover to the centre section that comes through the middle of the gear, being careful not to get any on the gear itself, since we still want it to move freely.
Insert the gear stand with the blank side into the bee, aligning it with the space for the wings using the connected gear/wing pins as reference . You can use a pen to mark the bottom to ensure that the gear stand is correctly positioned before attaching it to the base.
Once securely attached to the base plate and following the circuit diagram from the servo receiver, position it behind the motor stand and route the D1 mini wire along the bottom and out the cable hole in the rear arch. With the gear attached, ensure that they are in the same position, then slip the wings onto the wing pins through the gap to complete the bee assembly.
Bee Code
We used code connecting our D1 mini’s to the internet and then connected it to a broker on mqtt, to collect data that the sunflower would collect and send through to the rest of the D1’s
There is a d1 in both the arch and the bee. We decided to use two D1 minis - one for each part - instead of using one for both. If it were to be one D1 there were issues with power supply in moving the servo and the neo pixels, so we had to split it across two to make sure there was enough power for everything to work correctly.
This worked and allows each section to be coded separately and still move together and be connected through the broker.
The code used bellow is how each section is coded.
Explanations are attached to each line of the code and what each section does.
The Arch





Glowing Arch
For making the colour arch we got 3mm acrylic in both white and clear.
Using illustrator we measured out using the sizing's of the bee so that it fits snugly. As well as giving enough room for the electronics and some movement for it to be pulled apart when required.
The acrylic was laser cut to the shape and dimensions of the illustrator file we created.
We did one layer of the white acrylic for the front, in the thickest of the arch shape we created. Choosing for it to be 3mm so that a decent amount of light would shine through so the colours could be easily seen, this was to not be looking straight at the neo pixels as it can be too bright or hurt your eyes if you look directly at it for too long.
For the thinner arches we made three of those to stack together to give some extra room for wiring. We made all three of these out of clear 3mm acrylic, this meant when they were stacked the light shines out and spreads from the arch when its in use. as its looking side on it did not create the same blinding effect and helped diffuse the light outwards.
The semi circle arch was also cut out of clear acrylic so the inner workings of the electronics could be seen and explored by users and interested parties.
The front section and the first arch were glued together, with contact glue, directly on top of one another making all of the edges flush. As glue dried the next coat and layer was added until all four arches were layered together.
After they fully dried, using a 2mm drill bit we drilled 3.5mm deep into the layered plastic. Four holes were drilled into the top and bottom of the straight sections of the arch on both sides. in these holes we hammered 3x2mm magnets, making sure the right side was facing the correct way.
We placed the final semi circle arch flush on top of the connected sections and drew with a whiteboard marker -so it would not stain - so we could be sure once glue was added to see where each of the magnets were.
On top of the magnets hammered in we joined it up with its partner that would be connected to the other side. Once all four were on we dotted a drop of super glue on each and waited a few seconds for it to get tacky before lining up the marker dots and joining the magnets onto the other sheet of acrylic.
After we were sure it was dry we disconnected the magnets and pulled the acrylic sheet off with four magnets now attached.
Now we had a back that was removable so we could edit the electronics without it being open and too accessible. this is also the panel that would have the neo pixels attached. We outlined (in whiteboard marker) where the thin arch would hit the back board and lined up and stuck down the neo pixels within that.
After the neo pixels were stuck down and we made sure they all lined up we were able to fit everything together and fit all of the electronic components inside of the bee.
With all of these elements attached the physical pieces of all of the product were complete and could be combined to work together.
Neo Pixel Code
We used code connecting our D1 mini’s to the internet and then connected it to a broker on mqtt, to collect data that the sunflower would collect and send through to the rest of the D1’s
There is a d1 in both the arch and the bee. We decided to use two D1 minis - one for each part - instead of using one for both. If it were to be one D1 there were issues with power supply in moving the servo and the neo pixels, so we had to split it across two to make sure there was enough power for everything to work correctly.
This worked and allows each section to be coded separately and still move together and be connected through the broker.
The code used bellow is how each is section coded.
Explanations are attached to each line of the code and what each section does.