The 18th assignment of the fab academy was machine design, which basically consists in designing ans assembling the electronics of the machine designed during the mechanical design week. Also this assignment was done in collaboration with students from Open Dot in Milan. in particular, Federico Cirelli contrinuted a lot with the electronics and the code
1 – the circuit
It's now time to make our machine move, so, the first thing to look is what electronic components we are going to use to make our bubbles machine work. The circuit will use an Arduino nano to control a servo motor, a DC motor and an ultrasound sensor to detect the user’s presence in front of the machine. In the following diagrams we'll see the schematics and the collocation of each component
2 – the code
The first thing we did was to instrunìct the servo motor to move from the tank to the fan, so that the bubbles stick act in such a way that bubbles will be produced. To do this we used the servo library.
next step was to make the fan move. initially we tried to use a 9V bayttery to power the motor, and a mosfet and a diod to connect the DC motor to Arduino and control it with a pinmode. However for some reason this technique created many issues with the control of the servo, and therefore we just ceated a second channel where the DC motor is connected straight to the battery and controlled by a good old switch...
Then we added the fan to turn the movements of the motor into a gentle wind.
Once the main mechanism worked we moved to the automatization of the machine. To do that we are going to use an HRS04 ultrasound sensor, that will detect the proximity of a hypothetical kid that goes near our machine. We created a distance variable, and used an "if" command to interact with another variable that determinates the position of the motor.
So, here is the code!
3 – assembly
Once the circuit was done we assembled the whole machine wrapping up all we did. we attached the breadboard to the central leg of the machine, and voilà, our machine is complete.
Of course our machine is far from being perfect, but working as a team remotely during CoVid emergency it's was really challenging. We are very happy about how this collaboration worked from a human as well as from a professional point of view.
Here are all the source files for the Wildcard assignment:
1 - arduino code