Week 11: 24th October to 30th October
Edit
Prof Yung was out of office for an unknown period of time. As such, I went to work on eliminating the transient effect issue when moving from one magnet to another. Several methods were tested. This include using a counter to time the period in which the elctromagnets were off. That proved to be difficult to implement with one microcontroller because there was no possible way I could have the counter and the turning off and on of the magnet running at the same time. The microcontroller can only run one instruction at a time. When I turn off the electromagnet and implement a counter, that counter will always be the same value when the electromagnet is turned on again. To illustrate, we have:
Flowchart of Hold and Play Implementation
The video here shows the aforementioned implementation in action.thumb|300px|right
The video here shows the oscilloscope readings of the hall effect sensor during operation.
thumb|300px|rightEssentially, instead of detecting the hall effect sensor straight away, the user has to move the hall effect sensor out of the working range of the electromagnet before the note can be actuated. This is analogous to pressing a button and letting go before getting any actuation. Depending on how long I “press” the button, I can come up with different actuations. As the system has to probe each electromagnet one by one(check 1st magnet, then check 2nd magnet and so on), it will take some time before the note can be played. Another problem stems from the working range of each electromagnet or the distance above the electromagnet before they can be detected. It is a lot more forgiving than the previous implementations I have come up with, but it is far from perfect and there will be instances when the system will be unable to catch on to the hall effect sensor’s presence. The plus side to it is that the user can discern whether he or she has correctly “pressed” the button. If the electromagnet stays off (no visible spikes) while the hall effect sensor is positioned above it, the button has been “pressed”. Otherwise, spikes will remain which indicates that the button hasn’t been pressed. I have also managed to iron out the issues pertaining to accidentally sounding other notes if the hall effect sensor is too far from the electromagnet. That said, the more checks I implement to prevent unexpected behaviour, the slower the system becomes.
Later in the week, Kasun and I ran the setup with the ferofluid. I discovered a huge setback. The height of the spikes are pretty high, up to 2.5 cm high. All the while, I have been running experiements at close to 0.3 cm to the electromagnet. The voltage drop at 0.3cm is significantly higher than that at more than 2.5 cm. The smaller the voltage drop detected by the hall effect sensor, the more difficult it is for the system to detect. While I can adjust the threshold range to suit the smaller voltage drop, the downside to this is the higher occurrence of unexpected behaviour. This is because the act of simply moving from one magnet to another will generate a voltage drop that may accidentally trigger a note that was not intended to play.The previous setup was able to work because the presence of the neodymium was able to initiate a large voltage drop in the hall effect sensor from about 5V to 1V due to the repulsion of like poles. This is as opposed to the voltage drop from 5V to 2.5V I was able to achieve by simply turning off the magnet.
Objective checklist
- Meet up with Jeffrey to obtain his feedback on my current progress.