Category Archives: simulation

Spice With A Sound Card

In years gone by, trying out a new circuit probably would have meant heating up a soldering iron. Solderless breadboards have made that even easier and computer simulation is easier still, but there’s something not quite as satisfying about building a circuit virtually. [Thedeuluiz] has a way to get some …read more

Continue reading

Posted in computer hacks, simulation, sound card, SPICE, tool hacks | Leave a comment

An Epic Mech Cockpit Build For Steel Battalion

Steel Battalion was released for the Xbox in 2002, and remains one of the most hardcore mech simulators of all time. It became legendary for its huge twin-stick controller covered in buttons, and for deleting your save game if you failed to eject in time. It took giant robot gaming …read more

Continue reading

Posted in battlemech, mech, mech simulator, simulation, simulator, steel battalion, xbox, Xbox Hacks | Leave a comment

Visualizing Verilog Simulation

You don’t usually think of simulating Verilog code — usually for an FPGA — as a visual process. You write a test script colloquially known as a test bench and run your simulation. You might get some printed information or you might get a graphical result by dumping a waveform, but you don’t usually see the circuit. A new site combines Yosys and a Javascript-based logic simulator to let you visualize and simulate Verilog in your browser. It is a work in progress on GitHub, so you might find a few hiccups like we did, but it is still an …read more

Continue reading

Posted in fpga, simulation, verilog, yosys | Leave a comment

Circuit VR: An (Almost) Practical Buck Converter

In the last installment of Circuit VR, we walked around a simplified buck converter. The main simplification was using a constant PWM signal. The result is that the output voltage is a fixed fraction of the input voltage. For a regulator, the pulse width will need to depend on the output voltage so that any changes in the output are self-correcting. So this time, we’ll make a regulator, although we’ll still use a few Spice elements you’d have to replace in a practical design. In particular, we’ll assume you can generate a triangle wave, which is easy enough, and produce …read more

Continue reading

Posted in buck converter, Hackaday Columns, LTSpice, pwm, simulation, Skills, smps, switching power supply | Leave a comment

Open-source Circuit Simulation

For simple circuits, it’s easy enough to grab a breadboard and start putting it together. Breadboards make it easy to check your circuit for mistakes before soldering together a finished product. But if you have a more complicated circuit, or if you need to do response modeling or other math on your design before you start building, you’ll need circuit simulation software.

While it’s easy to get a trial version of something like OrCAD PSpice, this software doesn’t have all of the features available unless you’re willing to pony up some cash. Luckily, there’s a fully featured free and open …read more

Continue reading

Posted in psim, PSpice, qucs, simulation, software, software hacks, SPICE | Leave a comment

Circuit VR: The Dickson Charge Pump

There was a time when taking a low DC voltage — say a single battery — and converting it to a higher voltage was painful. Now, however, cheap and easy-to-use DC to DC converters are readily available. For some small tasks, though, these can seem like overkill. For example, consider a case where you need to supply a higher voltage for a MOSFET gate that doesn’t draw much current. Perhaps you need that higher voltage to trigger a microcontroller’s programming mode and nothing else. The current draw is minimal, and a full-blown DC to DC converter is overkill. For cases …read more

Continue reading

Posted in LTSpice, simulation, Skills, SPICE, voltage multiplier | Leave a comment

Amazing Mechanical Linkages and The Software to Design Them

Most of us are more bits-and-bytes than nuts-and-bolts, but we have the deepest appreciation for the combination of the two. So, apparently, does [rectorsquid]. Check out the design and flow of his rolling ball sculpture (YouTube, embedded below) to see what we mean. See how the arms hesitate just a bit as the ball is transferred? See how the upper arm gently places it on the ramp with a slight downward gesture? See how it’s done with one motor? There’s no way [rectorsquid] designed this on paper, right?

Of course he didn’t (YouTube). Instead, he wrote a simulator that …read more

Continue reading

Posted in linkage, mechanical engineering, sculpture, simulation, software hacks, toy hacks | Leave a comment

Nematoduino: A Roundworm Neural Model on an Arduino

When it comes to building a neural network to simulate complex behavior, Arduino isn’t exactly the first platform that springs to mind. But when your goal is to model the behavior of an organism with only a handful of neurons, the constraints presented by an Arduino start to make sense.

It may be the most important non-segmented worm you’ve never heard of, but Caenorhabditis elegans, mercifully abbreviated C. elegans, is an important model organism for neurobiology, having had its entire nervous system mapped in 2012. [Nathan Griffith] used this “connectome” to simulate a subset of the diminutive nematode’s …read more

Continue reading

Posted in misc hacks, neural network, neurons, roundworm, simulation | Leave a comment

Emulate ICs in Python

Most people who want to simulate logic ICs will use Verilog, VHDL, or System Verilog. Not [hsoft]. He wanted to use Python, and wrote a simple Python framework for doing just that. You can find the code on GitHub, and there is an ASCII video that won’t embed here at Hackaday, but which you can view at ASCIInema.

Below the break we have an example of “constructing” a circuit in Python using ICemu:

dec = SN74HC138() sr1 = CD74AC164() sr2 = CD74AC164() mcu_pin = OutputPin('PB4') sr1.pin_CP.wire_to(dec.pin_Y0) sr2.pin_CP.wire_to(dec.pin_Y1) sr1.pin_DS1.wire_to(mcu_pin) sr2.pin_DS1.wire_to(mcu_pin) print(dec.asciiart()) _______ A>|- U +|>Y7 B>|- +|>Y6 C>|- +|>Y5 G2A>|- +|>Y4 

…read more

Continue reading

Posted in Logic simulation, python, simulation, software hacks | Leave a comment

Building a Working Game of Tetris in Conway’s Game of Life

If you haven’t been following along with Conway’s Game of Life, it’s come a long way from the mathematical puzzle published in Scientific American in 1970. Over the years, mathematicians have discovered a wide array of constructs that operate within Life’s rules, including many that can be leveraged to perform programming functions — logic gates, latches, multiplexers, and so on. Some of these creations have gotten rather huge and complicated, at least in terms of Life cells. For instance, the OTCA metapixel is comprised of 64,691 cells and has the ability to mimic any cellular automata found in Life.

A …read more

Continue reading

Posted in mathematics, misc hacks, simulation, tetris | Leave a comment