A blinky PCB made from code - Page 1
Forum section: electronics / general

author: Timot
author_rank: Newbie
timestamp: December 19, 2023, 01:01:35 am
content: Hey,We've been working on a compiler for electronics and wanted to build the equivalent of "hello world!" in the electronics world. So we built a "blinky" circuit! It's basically a blinking LED circuit but with a few added bits to make it more fun: 20 addressable LEDs, an IMU, a light sensor and a li-ion charger.The project lives here with more details about the compiler, the description language and the circuit:https://gitlab.atopile.io/community-projects/blinkyCurious to hear what you think of it!

author: dobsonr741
author_rank: Frequent Contributor
timestamp: December 19, 2023, 01:33:58 am
content: Love the product idea - the auto break light.Ato, and how it’s presented posed a few questions/concerns:Dropping the schematics from electronics design is brave, but not for everyone.The layout still needs to be done in KiCad, right?Why not build the firmware with CI too?Why promoting JLCPCB?

author: Timot
author_rank: Newbie
timestamp: December 19, 2023, 01:52:26 am
content: The bike light firmware could use some work on the sensor filtration side. It tends to turn RED with shocks sometimes.On the compiler side:Yes, the move towards code rather than schematics is a spicy one. We did experiment with getting modularity, reusability and testing using schematics but we did not achieve it. With code, it was trivial to do so.Yep, for the layout it's as usual. From kicad, just do file>import>netlist and the components and nets will show up.We definitely could build the firmware in CI. Sadly we haven't got around to implementing it. Platform.io made the local firmware build pretty easy.We aren't necessarily trying to promote a specific vendor. JLC's automated assembly was quite straight forward to work with, which is why we used it. Actually I'd be great to have contributions to the compiler to support other vendors.

author: tychob
author_rank: Contributor
timestamp: December 21, 2023, 10:39:03 pm
content: What is the benefit of a completely new language, vs embedding in python likehttps://github.com/devbisme/skidl?At first glance it looks like it is hard to add additional testing and verification capabilities without extending the compilier in atopile.

author: Timot
author_rank: Newbie
timestamp: December 22, 2023, 03:21:06 pm
content: Good question! We actually tried Skidl on a few designs. Here are some of the issues we discovered:- The code isn't as readable as it could be if it was specifically developed for electronics.- Since python is a full blown programing language, there is no way to guide the user to write "correct" code. Errors might be related to misuse of python as much as they might be due to an electrical connection error. This is a big problem from a usability and stability perspective.- The infrastructure developed around python for sharing modules, importing files and version control has not been developed around electronics. Skidl has to inherit from software development workflows (which contain the right ideas but are not implemented for hardware specifically)- We found it complex to add features to skidl, mostly due to the fact that it was an alternate use of python that could not extend beyond what python was already capable of.In our case, we tailored the compiler and the language syntax to describe electronic system specifically. You are right that additional features will have to be implemented in the compiler itself. But we have already seen that we can move faster by having our own architecture. And we think users will enjoy the experience more since it was meant for that problem specifically.Skidl is awesome though. We had fun using it and learned a lot from it!

author: tychob
author_rank: Contributor
timestamp: December 22, 2023, 04:41:53 pm
content: Do you have any plans for how you plan to encode requirements for nets? For example, different families of logic have different high low voltages, can I encode that this chip emits at least 4.5v for high voltage, whilst this one can't handle more than 3.3v on its input. These requirements are often dependent, for example, must not be higher than Vcc (where a chip may have multiple Vcc rails).Also, what about parameterized modules based on use? For example, I would love to be able to just declare a Sallen–Key filter, based on f0 and Q, and a) have the module work out the values for me, and b) have some validation that the resistor and capacitor values are appropriate.

author: mawildoer
author_rank: Newbie
timestamp: December 22, 2023, 08:32:30 pm
content: Some plans, but we're also expecting there to be some exploration in that area!Totally agree that there's a lot that's oriented around the node on the net, and that's our primary focus to begin with. The nets (or links as we express them in atopile) are nothing more than a conduit!There seems to me to be two distinct categories of requirements/specs in that area; binary (is a type of signal) and continuous (voltage, current, signal speeds etc...).Definitely excited about parametrised modules as well!! In the midst of working on allowing symbolic equations, toleranced variables and unit support.Once those are in place, the plan is that we should be able to describe the topology of our circuits, the relationships between all the variables and the bounds of those variables, and then for the engine to solve and check the circuit. We too want to trivialise filters, regulators and the likes for most applications - obviously there are corner cases.

author: cosmicray
author_rank: Frequent Contributor
timestamp: March 21, 2024, 02:47:51 pm
content: Are these available for order via JLCPCB ? I have a (new to me) recumbent that would benefit from having a rear light such as this.TIA

author: Kean
author_rank: Unknown
timestamp: March 24, 2024, 03:31:30 pm
content: Quote from: cosmicray on March 21, 2024, 02:47:51 pmThey mention this athttps://gitlab.atopile.io/community-projects/blinky#manufacturing-the-circuitThe gerber files (& BOM?) are available for download under "Artifacts" - e.g. last successful build athttps://gitlab.atopile.io/community-projects/blinky/-/jobs/6266/artifacts/browse/build/default/

author: nctnico
author_rank: Super Contributor
timestamp: March 24, 2024, 05:28:31 pm
content: Quote from: mawildoer on December 22, 2023, 08:32:30 pmBut can you also create a schematic? At some point somebody will need to debug & test a circuit. For that a schematic is necessary as a netlist is just too far away from the actual implementation.I see a lot of parallels to FPGA development where I use the schematic representation made from the VHDL code to check if everything is connected the way I expect it to. And bringing up VHDL: why not use VHDL? As VHDL (or more precisely: VHDL-AMS) is also suitable for describing analog circuitry. Building on an existing standard has a better prospect of being picked up compared to developing yet another programming language people have never heard of (and likely the language will change due to new insights which then breaks compatibility with existing code; see PHP and Python as prime examples).

author: cosmicray
author_rank: Frequent Contributor
timestamp: March 27, 2024, 11:44:42 am
content: Quote from: Kean on March 24, 2024, 03:31:30 pmThe part that I could be missing somewhere is the programming. Even if JLCPCB can make & assemble the boards, there is still firmware to be loaded ? How does that happen.

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 27, 2024, 12:23:40 pm
content: Not a good idea, if it lights up by the IMU (When you're already braking), it's too late!You want to warn about your braking intentions even if you're not actually braking, so it should turn on at the lightest touch of the brake so the people behind you can avoid riding over your body.The design is nice, but not practical nor safe!

author: Kean
author_rank: Unknown
timestamp: March 27, 2024, 08:10:25 pm
content: Quote from: cosmicray on March 27, 2024, 11:44:42 amThere is a firmware folder in the GitLab repo.I imagine you’d need to load it yourself. A good learning experience!

author: Kean
author_rank: Unknown
timestamp: March 27, 2024, 08:16:00 pm
content: Quote from: DavidAlfa on March 27, 2024, 12:23:40 pmI believe it is always lit up, but it changes colour when braking (decelerating). So that adds some extra warning compared to a basic rear light.I wouldn’t say it is unsafe, and not sure how practical it is. It is just intended as a demonstration project not a real product.

author: Sagar
author_rank: Contributor
timestamp: July 09, 2024, 07:28:29 am
content: I also ordered some assembled board form JLCPCB with WS2312 addressable LEDs. I can 't solder 100's of LEDs manually on a PCB. And I think soldering these delicate parts are really hard.