ElectroBrandon
LtSpice Potentiometer Model
It takes about 20 seconds to put a potentiometer model in LtSpice. I have no idea why it wasn’t included. Regardless…. — Download the “Pot” folder at https://github.com/brandondrury/LTspice-Libraries — Find your C:\Users\YOUR_USERNAME\Documents\LTspiceXVII\lib\ folder— Place pot.asy in your “sym” folder. C:\Users\YOUR_USERNAME\Documents\LTspiceXVII\lib\sym\— Place pot.sub in your “sub” folder. C:\Users\YOUR_USERNAME\Documents\LTspiceXVII\lib\ sub\— Click the text tool. Select “SPICE Directive” … Read more
MIDI Test Code on Arduino and STM32 Blue Pill
This code turns the onboard PC13 LED of the STM32 Blue Pill on when a MIDI NoteOn message is received and turns the LED off when a MIDI Noteoff message is received. It’s my preferred way to confirm that a MIDI circuit is working. It relies on the Arduino MIDI Library.
Electronics Intuition…The Nasty Way
Developing intuition in electronics is tough. Resistors, capacitors, inductors, and diodes are all tricky dudes (and dudettes), but I’m hoping this video incorporates enough nastiness to make learning it easier.
Heating Bed and Nozzle Simultaneously On CR-10 In Cura
On my CR-10, the nozzle heats up and then the bed heats up. This seems like a waste of time particularly in that I need to make sure the first layer of the print goes down correctly. After that, I don’t care. This sequentially heating dramatically increases my time investment in a print. Warning: I’ve … Read more
Before You Decide On Hand-Soldered 0603 Capacitors
Before you decide to hand solder 0603 capacitors on your board……
Blue Pill STM32 Clones Brown Out or Become Unresponsive
The Problem: The STM32 Blue Pill sometimes dies for no apparent reason. On the PSU, it’s pulling 30mA and then for now apparent reason, the current draw reduces to 10mA (for the power indicator LED, presumably) and the microcontroller appears dead. It only seems to occur when powered from a power supply to the 5V … Read more
Engineering Rule #1: Make Friends With Iteration
Imagine you’re a young boy who worked hard all day on his sandcastle. Just as your mom calls you for dinner, a teenage jerk runs up and kicks your castle down. That feeling of loss, betrayal, and rage is only topped with the feeling that all that hard was for nothing. This is every day. … Read more
Trace Width vs Length Inductance Table for PCB Traces
I need to know the inductance of the traces I’m creating. It’s too slow to use the inductance calculator at All About Circuits. Unfortunately, the equation has any given variable on both the numerator and the denominator. I refuse to invest the brainpower to develop a rule of thumb, so I’m resorting to a table. … Read more
Smooth Fading LEDs With STM32 Blue Pill on Arduino Platform
The smooth fading of LEDs is possible, but it’s best to have 16 bits to work with and ditch the linear world. // My code dutyCycle = pow(1.03, time_increment); // Math equivalent y = 1.03^x Above is the most interesting piece of code today. dutyCycle for this code is a number from 0 – 65535. … Read more
Microchip 25LC256 EEPROM on STM32 Blue Pill and Arduino
For the big, bad synth project, I needed an EEPROM. I selected the Microchip 25LC256 from Digikey simply because it had excess capacity (256k) and was thru-hole. (I always recommend this approach when jumping into a new arena of unpolished prototyping). I had never worked with external EEPROM before. It turns out that EEPROM is … Read more
Backlit Panel Engraving Using CNC – Experiment 001
I did some work with the CNC for engraving onto acrylic which I painted black on one side and engraved backward. The idea is the black will ultimately be the back of the front panel. Because the acrylic is very transparent, the engraving is still 100% visible. Because the acrylic is super flat and shiny, … Read more
Multiple MCP23017 Expanders With Interrupts Not Playing Nice
was manually polling my 3 MCP23017 expanders I need for all the buttons for my synth just to get the ball rolling. The serial monitor tells me it was taking almost 5ms….which is similar to the amount of time it’ll take for the dinosaurs to come back. (It’s a billion years in microcontroller land.) I … Read more
Why Are All These Resistors Thru-Hole? Isn’t SMD Cooler?
SMD is cooler….when a machine does all the work. At the prototyping phase (and assuming you don’t have all the fancier tools specific to the tiny world of SMD), SMD parts take longer to solder, often require a heat gun to remove, and offer no convenient place to hook your oscilloscope probe to. Bodge wires … Read more
Serial USARTs On STM32 Blue Pill With Arduino Code in PlatformIO
Here’s the “Hello World” edition of getting access to USART2 and USART3 on an STM32 Blue Pill in PlatformIO using the Arduino framework. /* lib_deps = NONE # Using a library name ——– Platform.ini Settings———- [env:bluepill_f103c8] platform = ststm32 board = bluepill_f103c8 #board = bluepill_f103c8 framework = arduino upload_protocol = stlink lib_compat_mode = soft */ … Read more
STM32 Blue Pill ADC Values Too Low in PlatformIO
I kept getting values that were way too low when feeding an ADC on the STM32 Blue Pill 3.3V. I should have been getting values that were around 4000 and instead I was closer to 800. Solution 1) The default ADC in the Arduino library is set to 10-bit resolution. This is what you … Read more
Genuine STM32 Blue Pill vs CS32F103C8T6 Clone
I’m troubleshooting a synth design and looking at the data on the SPI bus. I have 10 STM32 clones (CS32F103C8T6) of the STM32F103C8T6 around and decided to try them out since they have the correct USB resistor. I was getting the following error in PlatformIO. Warn : UNEXPECTED idcode: 0x2ba01477 To get the clone to … Read more
bCNC Safe Z
bCNC comes with a feature to move the spindle up to a safe z height. If you right-click on the “Safe Z” button it looks like this. G90 G0Z(safe) The default is 3. In my case, it was 3 millimeters. I wouldn’t call that safe at all. I use clamps that are much thicker/taller than … Read more
Use Python To List All Files In A Directory
I needed a lengthy list of files for a massive 3D printing project I’m starting and I didn’t want to have to copy and paste each file one at a time. Brandon’s Rule #232: If you are faced with a 2 minute task that bores the hell out of you, invest 15 minutes into automating … Read more
My Saga With PLCs – Part1
I didn’t learn PLCs in school. My gig was Engineering Physics and if the homework didn’t use Calculus to think about the atomic level, I didn’t learn it. Granted, I didn’t learn to use Calculus to think about the atomic level, either, but that’s another rant. So, I’m learning PLCs. Here are some thoughts for … Read more
Trials and Tribulations With Protoneer V3.51 CNC Shield
I recently purchased a Protoneer V3.51 board for my CNC as I wanted to control the speed of my spindle in Fusion 360. My CNC came with a potentiometer which made it impossible to save my speeds and feeds. Speeds and feeds are the name of the game with CNC. There is an ideal amount … Read more
Is Engineering School A Total Waste of Time and Money?
I graduated with a degree in Engineering Physics from Southeast Missouri State University three weeks ago. I turned 40 three weeks ago. My situation is a bit unique. I’ve been trying to put into words what school is dozens and dozens of times. This attempt is the only one I’m happy with. Here goes. What … Read more
Solved: G28 Causing CNC Crashing From Fusion 360 Generated GCode
For some time I struggled with the default Gcode generated by Fusion 360 on my CNC machine. The G28 command was causing the tool to go straight to the top edge of my project and scrape the living crap out of it. My temporary solution in a pinch was to remove the G28 commands from … Read more
Add 32 Buttons With Just 2 Pins With MCP23017 Expander
I need about 40 buttons for my synth project. I’m trying to run the entire synth with a single STM32 Blue Pill. I’ve already shown how I can run 256 LEDs with 3 pins LINK IT HERE. Since the MCP23017 is I2C, I could possibly run 128 buttons on 2 pins. For now, I’m just … Read more
140 Resistor Labels for 3D Printed Organizer
I created paper labels for the E24 Series Resistor Storage Solution on Thingiverse. I liked this approach, but I figured that paper labels would suffice. I used Python to generate the html to avoid any repetitive work. The already-generated text labels can be found here. Printing in standard “Letter” size in Chrome onto card stock … Read more