News for hackers. Stuff that matters.
Re:Building an occupancy sensor with a $5 ESP32 and a server... by morphle on Monday November 13, 2023 @03:58PM (#38255298)
A custom MCU is a 3 months work: downloading an design for an FPGA, testing it, using openlane to make an custom chip, taping it out, writting boot code and the main loop ( I would do that in assembly, much simpler than using C and some vendors library). The big issue is taping it out to a chip FAB, around $25K, see my comment below.

I would get started with an off the shelf MCU with good documentation, writing the software on a good development platform with the same assembly as the final microcontroller. For the $0,04 ARM microcontroller I mentioned above as final target with analog to digital controller (ADC) I would first write the program (the main loop) on a Mac on a high level language like Squeak or Python and use the $4 raspberry pi pico as ADC. I would then rewrite the working software in ARM assembly and test it directly on the pi pico. Then I would flash it on the $0.04 arm microcontroller wired on a breadboard to the moisture sensor. Then I would debug it again, with simple flashing leds to see where your software goes wrong. morphle at ziggo dot nl for more questions like how to find a 4 cent arm chip. I would start at lcsc.com , use their sister company and eda tool to design the pcb only with lcsc.com parts and order it fully assembled. Then I would open source it so others can directly order assembled boards

I would avoid Arduino like the plaque, in essence its just a precanned overpriced bloated C library on an overpriced microcontroller. You always get better results writing from scratch. See 'is it complex or did we make it complicated', a lecture by Alan Kay at Quallcom on Vimeo or Youtube, on designing systems from scratch or by vendor stuff

There are no comments on this comment yet.