{"action":"opened","issue":{"url":"https://api.github.com/repos/radostin-stefanov/push-up-magnetic-levitation/issues/2","repository_url":"https://api.github.com/repos/radostin-stefanov/push-up-magnetic-levitation","labels_url":"https://api.github.com/repos/radostin-stefanov/push-up-magnetic-levitation/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/radostin-stefanov/push-up-magnetic-levitation/issues/2/comments","events_url":"https://api.github.com/repos/radostin-stefanov/push-up-magnetic-levitation/issues/2/events","html_url":"https://github.com/radostin-stefanov/push-up-magnetic-levitation/issues/2","id":186027390,"number":2,"title":"Either the magnet, or the magnetic force produced by the coil is too weak","user":{"login":"zubenelacribi","id":1489518,"avatar_url":"https://avatars.githubusercontent.com/u/1489518?v=3","gravatar_id":"","url":"https://api.github.com/users/zubenelacribi","html_url":"https://github.com/zubenelacribi","followers_url":"https://api.github.com/users/zubenelacribi/followers","following_url":"https://api.github.com/users/zubenelacribi/following{/other_user}","gists_url":"https://api.github.com/users/zubenelacribi/gists{/gist_id}","starred_url":"https://api.github.com/users/zubenelacribi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zubenelacribi/subscriptions","organizations_url":"https://api.github.com/users/zubenelacribi/orgs","repos_url":"https://api.github.com/users/zubenelacribi/repos","events_url":"https://api.github.com/users/zubenelacribi/events{/privacy}","received_events_url":"https://api.github.com/users/zubenelacribi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-28T21:33:45Z","updated_at":"2016-10-28T21:33:45Z","closed_at":null,"body":"I was trying to write some code that reacts to the Hall effect sensor by using its amplified signal. Then I switched to floating average using the last 20 to 300 readings. Then I included another sensor on the other side of the coil in order to cancel the noise I read from the first one when the coil is repeatedly turned on and off. The problem with the latter approach was the the signal should pass through an amplifier to achieve the same form and I'm not sure about the offset of the signal compared to the one coming from the first sensor. I could not compare the two signals because the Y channel of the oscilloscope is damaged and shows just noise. By comparing the signals sequentially using the X channel only, it seemed that they are identical.\r\n\r\nThere is a short range of the potentiometer where the amplified signal from the sensor becomes clear. Going outside this range puts the amplifier in saturation. When we are in this range, the coil becomes repeatedly switched on and off and it begins to attract the magnet. But the magnet either sticks to the coil (too strong attraction), or falls down (too weak attraction).\r\n\r\nI could not achieve the appropriate settings to make the magnet hang and switched back to the code of the Chinese guy. The problems there were the same -- either too strong, or too weak attraction and no hardware or software settings could make the magnet hang. I switched to the coil with thinner wire, tried it with 12V and 24V, then switched back to the coil with thicker wire and tried both voltages. Nothing helped.\r\n\r\nIt seems that even if there is some range of distances from the coil were the magnet can hang, it's too thin to find it right away. I believe that it depends on the magnet's strength, so we should try with a stronger magnet. On the other hand, the H-bridge doesn't get hot even at 24V, which means that the current flowing through it is not very big and the magnetic force that the coil produces is not enough. The coil is unable to attract the magnet when it's 5mm away, but this was possible before, so the problem is in the settings.\r\n\r\nSo we should try to make our own coil (we should do some calculations first) and try with different magnets. We should carefully look at the picture provided by the oscilloscope in order to decide which settings to change. I believe we can apply two sensors (on the top and the bottom side of the coil) and floating average of their readings (flatting the spikes) to remove the noise coming from the coil when switching it on and off. Thus we'll receive the pure signal which corresponds to the magnet's distance from the coil and we'll be able to control the coil easily."}}
{"actor":{"display_login":"zubenelacribi"}}