Tuesday, January 18, 2022

Lander Avionics, out with the old...

 I started working on the avionics for the lander over a year ago. I started off with a professional embedded approach, where I employed STM32F446 devices with their own supporting circuitry and used a traditional firmware development approach. It was a stacked sandwich set of boards where one micro did all the sensing related tasks: GPS, IMU, analog channels... and the other micro did all the actuation sets of tasks: interface with the valve driver, UART ports for the throttle valve motor controller and TVC actuator controllers. I realized this was silly.. first of all I split things up into two boards with two sets of firmware. Second, I was using a microcontroller that I wasn't super familiar with and writing firmware for ended up being a colossal pain in the ass. Most of the toolchains/tools I used for doing development were pretty much a nightmare to get started with and I realized that If I abstracted some of the systems to a  USB interface with the flight computer and the others to a Teensy, I could probably write the firmware for it in a couple days tops.

Regardless, I'll share what this old system looked like.. as it at least didn't look too ugly.




   





Sunday, January 9, 2022

Lander Update 01/09

I haven't gotten a chance to do a lot of work lately with holidays and work deadlines.. But I have been putting some thought into a couple things. I redesigned the tank mounting hardware. Pay no mind to the interlapping components, there are a couple bends that will fix the issue.

The bent sheet metal component will get tig welded to the tank, with smallish heat affected zone. Then the whole assembly will bolt down to the 1inch steel square tube welded to the chassis. This will allow for simpler tank integration. 

SendCutSend.com had issues with how tight the bends are, so I did them myself. This was my first time playing around with an industrial sheet metal bender, here is  how they turned out:


I also have been working on the "everything else board" which connects over SPI to the flight computer and does all GPS reception, reads all analog channels, and does all the expansion/timing for the flight computer to command the relay board and therefore all of the solenoid valves / things that are activated via relay. This will also include ignitors, etc. I also added some interfaces for switches and an extra IMU: the Aceinna OpenIMU platform. The main controller is a Teensy 4.1 microcontroller. I had designed this beautiful stacked avionics system before.. with two STM32F4s because I thought that was the most professional approach. It turns out that the best approach is the one that uses the tools you're good at using and the one that will finish the job the quickest and yield the same results. So... Teensy! This will cut down dev time by a lot.

I guess I'm also learning a lot about design philosophy in this project too.


I am still designing this board, but he're what it looks like. The main cable harnesses for all ADC inputs are mildly chunky since they need a drive voltage, ground line, and then return ADC line for the mux. Since some devices need to get driven by 12V and some by 5V, there are some complications involved with routing. Similarly, all get fed through a mux that heads to an ADC who has a maximum 3v3 rating (Teensy).. so I need custom dividers for each line. I added a common divider at the end, and give each port the option to add more inline R1 resistance to bring voltage down further. 


I also have been working on my printers. I added octoprint, and now have web interfaces for each of them to start prints. Only a mild convenience at this point, since I don't have a webcam and I didn't connect them to a port on my router.