-
1Build the jig for data acquisition
In order to collect sound data of the rubbish objects, we need to first build the minimal hardware necessary as shown in the below pictures, this makes sure that the collected data will be similar to the real scenario. At this stage we don't need a functional smart bin, so it is ok to just use a sticky tape to keep the trapdoor and some acrylic parts in place.
For the aluminium build use the 550mm aluminium for the vertical profile and 290mm aluminium for horizontal profile. The inverted pyramid shaped acrylic sink can be mounted to the top four 290mm aluminium as shown below. You can tape the MCU board (Arduino Nano 33 BLE Sense) in place or use the case. All design files and parts list are included in the "Files" and "Components" tab.
-
2Build the AI model using Edge Impulse
[New update: Check out this log if you want to use Seeed Studio Xiao nRF52840 Sense]
[New update: Check out this log if you want to use Arduino Nicla Voice]
If you want to use my Edge Impulse project model you can access it here: https://studio.edgeimpulse.com/public/244026/latest
If you want to build your own model, you can follow along the steps below:
For this step you will need to sign up for an https://edgeimpulse.com/ account and then log in. To connect your MCU board to Edge Impulse, you need edge impulse CLI on your computer and then burn the Edge Impulse firmware for Arduino BLE Sense, Here is a more detailed instruction to do so: https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-mcu-targets/arduino-nano-33-ble-sense
After connected, create a new project and go to the Edge Impulse "Data acquisition" tab and start collecting audio data. Choose Device: Arduino BLE Sense, Sensor: Microphone, Frequency: 16,000Hz, Sample length: 19,000, and most importantly name the label depending on the rubbish object you want to sample.
You can now start sampling, since each sample length is 19 seconds, you can later split it into 1 second window and adjust it to when the collision happen. Ideally you want about 60 sample of 1 second window for each rubbish objects.
Next, go to the Impulse design tab, select create impulse and set the parameters to the screenshot below.
Autotune parameters and generate features on the MFE tab.
Start training on the classifier tab using default parameters (this may take a while).
-
3Program your Microcontroller
On the Edge Impulse "Deployment" tab you can configure your deployment. Choose Arduino library and click build. This will create the Edge Impulse AI model as a .zip file which you should unzip and place the unzipped folder in the Arduino "libraries" folder.
Now you can download the .ino code in this Hackaday project's "files" tab and then upload it to your Arduino.
-
4Build the rest of the hardware
Print all the remaining .stl parts from the "files" tab and assemble them to the aluminium frame as shown below. Most of the parts such as the trapdoor and rotating base-plate can be mounted using the M5 bolt and M5 T-nut.
-
5Wire the electronics
[New update: Check out this log if you want to use a separate MCU for actuator control]
Wire the electronics based on the following diagram. To save space, the wires can be soldered directly to the Arduino Nano 33 BLE Sense.
Make sure the hall sensor is mounted close enough to the bottom part of the acrylic base. The magnet should be glued to the bottom side of the acrylic base and should be around 2-4 mm above the hall sensor.
Secure any dangling wires by zip-tying it to the aluminium frame.
You can now add stickers (included in the "files" tab) to make the design more intuitive for people to use.
-
6Power it up!
Your AI Audio Classifier Recycle Bin should work now. Power it up and try it yourself!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.