{"id":221,"date":"2024-01-16T20:05:16","date_gmt":"2024-01-16T20:05:16","guid":{"rendered":"https:\/\/akaflieg.nl\/?p=221"},"modified":"2024-05-31T17:22:06","modified_gmt":"2024-05-31T17:22:06","slug":"towards-an-audio-angle-of-attack-indicator-part-2","status":"publish","type":"post","link":"https:\/\/akaflieg.nl\/index.php\/2024\/01\/16\/towards-an-audio-angle-of-attack-indicator-part-2\/","title":{"rendered":"Towards an Audio Angle of Attack Indicator &#8211; Part 2: Hello World"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em><a href=\"https:\/\/akaflieg.nl\/index.php\/2024\/01\/04\/towards-an-audio-angle-of-attack-indicator-part-1\/\">Last time<\/a>, I wrote about the first PCBA being on it&#8217;s way. As I&#8217;m writing this, the second PCBA is on it&#8217;s way towards me. And boy, does it have a lot of improvements&#8230;<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"520\" src=\"https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-1024x520.jpg\" alt=\"\" class=\"wp-image-231\" srcset=\"https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-1024x520.jpg 1024w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-300x152.jpg 300w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-768x390.jpg 768w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-1536x781.jpg 1536w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/20240104_163710-2048x1041.jpg 2048w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">My very first PCBA!<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first iteration was a &#8220;Hello World&#8221; of PCBA: it featured just a button and a buzzer. Long story short: the button didn&#8217;t work and the buzzer did&#8230;sort of.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As soon as the PCBAs arrived, I soldered one onto a 40-pin header and tested it on my least expensive Raspberry Pi: a Zero W. The Pi didn&#8217;t even turn on. That&#8217;s not good, but it still worked without my PCBA. Although my soldering isn&#8217;t that great, it wasn&#8217;t the cause for the problems I was seeing: all PCBAs had a short between the button&#8217;s terminals.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Button<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">During design of the PCBA, I decided to tie unused pins from the button to ground. Not such a great move, since I created a short between the 3.3 Volt pin and ground this way. Luckily the Raspberry Pi Zero has some protections and just didn&#8217;t power on. No fried hardware yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It took me a while to figure this out, but once I did I could easily fix the problem by scratching through one of the lines towards the button. Now the button didn&#8217;t work at all, but at least I could test the buzzer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another problem with the button was the GPIO pin I had connected it to. Aparently GPIO pin 17 is sometimes used for other things, even though it&#8217;s not documented.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Buzzer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The buzzer worked! It made a sound and it was nearly loud enough. A good result for a first try.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_59_14-1024x529.png\" alt=\"\" class=\"wp-image-227\" srcset=\"https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_59_14-1024x529.png 1024w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_59_14-300x155.png 300w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_59_14-768x397.png 768w, https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_59_14.png 1302w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First I created an Excel sheet to keep track of which pins I was using and what pins the other Pi HATs I own use. In the future I want to combine my PCBA with perhaps a <a href=\"https:\/\/www.uugear.com\/product\/zero2go-omini-wide-input-range-multi-channel-power-supply-for-raspberry-pi\/\">12-Volt powerboard<\/a> and a <a href=\"https:\/\/makerplane.org\/downloads\/sunlight-readable-display-technical-info\/\">5-inch LCD screen<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then fixed the short-circuit for the button,  and started to look at the extra features for the next iteration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After spending way to long on soldering this PCBA, I decided to see if I could have the manufacturer of the board solder header on it for me. I turned it he can. A few hours of fiddling with EasyEDA later and the 3D view showed a PCBA with female headers attached to the bottom.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next version should also contain debug points, so I can attach my USB-scope to the board and see what&#8217;s happening.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Last, but certainly not least, the board should receive power and data. Lucky for me, this is rather easy. I&#8217;m connecting my board to an <a href=\"https:\/\/gliding.lxnav.com\/products\/lx9070\/\">LXNAV 9070<\/a>, which delivers 5 Volts of power at a maximum of 1 Ampere. This is precisely what I need and the Pi Zero W can operate well below the maximum of 1 Ampere. The LXNAV also provides a UART interface at 3.3 Volts, which is precisely the voltage that the Raspberry Pi Zero W wants. Since the Raspberry Pi Zero already contains protection against static electricity, there&#8217;s no need to build in extra protections at this point. It&#8217;s just a matter of routing the correct pins from the RJ45 connector to the correct pins of the Raspberry Pi 40-pin header.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now that I&#8217;m feeding the Raspberry Pi via the RJ45 connector, I&#8217;m starting to thing about all the wiring. I remember a former colleague mentioning 4-layer PCBs and I start to investigate a little bit and talk to my electrical engineering colleagues. I decide to create a 4-layer PCBA for the next iteration, just to see if it makes life more easy for me. At <a href=\"https:\/\/jlcpcb.com\/\">JLCPCB<\/a>, who I use to create my PCBAs, it makes no difference at all if I use 2 or 4 layers&#8230; so let&#8217;s try it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both the UART and the 5 Volt circuits get their own set of pins for attaching a scope, and I order the next version of the PCBA. Since I decided to place parts at both the top (button, buzzer, RJ45 connector) and the bottom (female headers to save me some soldering), I now have to move to a more expensive price category&#8230;which is about $100 extra compared to the previous iteration. That&#8217;s definitely something I&#8217;m going to look at for version 3. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>After ordering, I&#8217;m again faced with the long wait for these PCBAs to be made. Although the week it takes JLCPCB to manufacture and send the PCBAs is quite quick by modern standards, I&#8217;m so used to feedback loops measured in seconds or maybe minutes that this feels like going back in time. Despite feedback being somewhat slower than I&#8217;m used to, I&#8217;m quite excited about this small project. I&#8217;m learning new things every time I&#8217;m working on this project, and people all around me are very willing to teach me. No amount of studying beats experience&#8230;<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last time, I wrote about the first PCBA being on it&#8217;s way. As I&#8217;m writing this, the second PCBA is on it&#8217;s way towards me. And boy, does it have a lot of improvements&#8230; The first iteration was a &#8220;Hello World&#8221; of PCBA: it featured just a button and a buzzer. Long story short: the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/akaflieg.nl\/index.php\/2024\/01\/16\/towards-an-audio-angle-of-attack-indicator-part-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Towards an Audio Angle of Attack Indicator &#8211; Part 2: Hello World&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":225,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[5],"class_list":["post-221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-hobbes"],"jetpack_featured_media_url":"https:\/\/akaflieg.nl\/wp-content\/uploads\/2024\/01\/screencapture-easyeda-editor-2024-01-16-20_56_22.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":9,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":269,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/posts\/221\/revisions\/269"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/media\/225"}],"wp:attachment":[{"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/akaflieg.nl\/index.php\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}