Posts with «simulator» label

Arduino Gear Shift Indicator Finds ‘Em So You Won’t Grind ‘Em

Now, it’s been a shamefully long time since we’ve driven a car with a manual transmission, but as we recall it was pretty straightforward. It certainly didn’t require a lot of help with the shifting pattern, at least not enough to require a technical solution to know what gear you’re in. But then again, we suspect that’s not really the point of [upir]’s latest build.

Oh sure, it’s pretty cool to display your current gear selection on a little LCD screen using an Arduino. And [upir] promises a follow-up project where the display goes inside the shifter knob, which will be really cool. But if you take a look at the video below, you’ll see that the real value of this project is the stepwise approach he takes to create this project. [upir] spends most of the time in the video below simulating the hardware and the code of the project in Wokwi, which lets him make changes and tune the design up before committing anything to actual hardware.

That turned out to be particularly useful with this build since he chose to use analog Hall sensors to detect the shift lever position and didn’t know exactly how that would work. Wokwi let him quickly build a virtual prototype for one sensor (using a potentiometer as a stand-in, since the simulator lacked a Hall sensor model), then quickly expand to the four sensors needed to detect all six gear positions.

By the time his simulation was complete, the code was almost entirely written. [upir] also walks us through his toolchains for both designing the graphics and laying out the PCB, a non-trivial task given the odd layout. We particularly enjoyed the tip on making smooth curved traces around the oval cutout for the shift lever in the board.

The video below is on the longish side, but it’s chock full of great little tips. Check out some more of [upir]’s work, like his pimped-out potentiometer or his custom animations on 16×2 LCDs.

Learn Sailing Mechanics Without Leaving Dry Land

The ancient art of sailing can be very intimidating for the uninitiated given the shifty nature of wind. To help understand the interaction of wind direction and board orientation, [KifS] designed a hands-on sailing demonstrator that lets students grasp the basics before setting foot on a real sailboat.

The demonstrator uses a potentiometer as a tiller to control a model sailboat’s angle, while another stepper motor adjusts the position of a fan to simulate changing wind directions. With an Arduino Uno controlling everything, this setup affords students the opportunity to learn about sail positioning and adjusting to shifting winds in an interactive way, without the pressures and variables of being on the water.

[KifS]’s creation isn’t just about static demonstrations. It features four modes that progressively challenge learners—from simply getting a feel for the tiller, to adjusting sails with dynamic wind changes, even adding a game element that introduces random wind movements demanding quick adjustments. [KifS] mentions there are potentials aspects that can be refined, like more realistic sail response and usability, but it already achieved the main project goals.

There are a myriad of potential ways to add new tech to the ancient art of sailing. We’ve seen a DIY autopilot system, full sensor arrays, and an open source chart plotter. It’s even been proven you can have a wind powered land vehicle that travels faster than the wind.

P-51 Cockpit Recreated with Help of Local Makerspace

It’s surprisingly easy to misjudge tips that come into the Hackaday tip line. After filtering out the omnipresent spam, a quick scan of tip titles will often form a quick impression that turns out to be completely wrong. Such was the case with a recent tip that seemed from the subject line to be a flight simulator cockpit. The mental picture I had was of a model cockpit hooked to Flight Simulator or some other off-the-shelf flying game, many of which we’ve seen over the years.

I couldn’t have been more wrong about the project that Grant Hobbs undertook. His cockpit simulator turned out to be so much more than what I thought, and after trading a few emails with him to get all the details, I felt like I had to share the series of hacks that led to the short video below and the story about how he somehow managed to build the set despite having no previous experience with the usual tools of the trade.

A Novel and a Film

Grant has been making short films for a while, mainly in collaboration with John Dwyer, an author of historical novels. Grant’s shorts are used as promos for John’s books, and nicely capture the period and settings of John’s novels. Most of these films required little in the way of special sets, relying instead on stock footage and vintage costumes to achieve their look and feel. John’s latest novel would change all that.

Called Mustang, the novel centers on a hotshot fighter pilot in WWII. Grant’s vision for the short to promote the book was inspired by the recent Christopher Nolan film Dunkirk, which featured intricate sequences filmed in the cockpit of a Spitfire. Granted wanted a similar look, and began arranging to use a real P-51 Mustang for filming. That presented immediate problems. First, there aren’t that many of the vintage aircraft left, and those that are still flying usually have anachronistic instruments in the cockpit, like GPS. Also, Grant wanted the instruments to respond as if the plane were airborne, and to have the shadows cast by the canopy into the cockpit suggest aerial maneuvers. Such an effect would be difficult to achieve with a plane stuck on a runway.

That’s when Grant realized that a gimballed cockpit simulator was needed. It could have a period-accurate dashboard, be positioned outdoors to take advantage of natural daylight and real backgrounds rather than CGI, and could be pitched, rolled and yawed to simulate flight. It would be perfect, and it would save the project. There was just one problem: he had no idea how to build it.

Helping Hands

Wisely, Grant turned to his local hackerspace, Dallas Maker Space, for help. There he found not only the tools he lacked, but kindred spirits with the necessary skills and the willingness to share them. They started working on the cockpit instrument panel, which ended up including a combination of actual flight hardware and mocked-up instruments. The fake instruments used steppers and an Arduino to drive the needles, which were controlled by a custom iPad app that was used to animate them live during filming. The real instruments, like the artificial horizon and turn-and-slip indicator, were powered by a vacuum pump and responded to the movements of the simulator on its gimbals.

The gimballed cockpit set for exterior shots. The wide horizon and natural lighting combined with the 3-DOF gimbal make for a very realistic effect.

Mounting this convincing panel into something was an entirely different undertaking. Grant relied heavily on the experience of DMS members to design a structure strong enough to support the actor and allow for the motion needed to create a convincing effect. The cockpit mockup, made from plasma-cut sheet metal and plywood, is mounted to a heavy-duty three-axis gimbal, including a massive bearing from a pallet jack for the yaw axis.

Set and talent, ready for action.

Grant had originally planned to place the mockup on a mountaintop for shooting, much as the Spitfire mockup from Dunkirk was placed on the edge of a cliff to give an unobstructed horizon to simulate flying over the English Channel. When that proved logistically challenging, he set up on an airport runway and used clever camera blocking to avoid shooting the horizon. Grips manually moved the simulator while Grant manipulated the fake instruments and filmed the results, which I think speak for themselves. If only the budget – and on-set safety – would have supported simulating the massive four-blade Mustang propeller, the illusion would have been complete.

I really enjoyed digging into this project and all the hacks that it entailed. Movie magic is as much about hacking as anything else, at least behind the cameras, and it’s good to see what’s possible with a limited budget. We recently featured a low-budget but high-style sci-fi movie set build, and we’ve gone in-depth with a playback designer for the Netflix series Lost in Space, both in these pages and as a Hack Chat.

 

 

Take your X-Plane 11 experience to new heights with this 3D-printed simulator

Apparently not satisfied to simulate flights on a single PC monitor, Ryan H came up with his own custom, 3D-printable cockpit setup for the Garmin G1000 avionics suite that uses a 12.1” LCD panel for flight data and a large number of additional inputs. The system is designed around the X-Plane 11 flight simulator, all controlled by an Arduino Mega with SimVim firmware.

The auxiliary display/inputs assemblies use the Arduino as an interface, enabling it to handle 32 tactile switches plus one standard and five dual rotary encoders via five CD74HC4067 16-channel multiplexers.

Build cost is around $250 per screen. 3D-print files and other information are available on Thingiverse

Simulate City Blocks With Circuit Blocks In A LEGO Box

Have you ever looked around your city’s layout and thought you could do better? Maybe you’ve always wanted to see how she’d run on nuclear or wind power, or just play around with civic amenities and see how your choices affect the citizens.

[Robbe Nagel] made this physical-digital simulator for a Creative Programming class within an industrial design program. We don’t have all the details, but as [Robbe] explains in the video after the break, each block has a resistor on the bottom, and each cubbyhole has a pair of contacts ready to mate with it. An Arduino nestled safely in the LEGO bunker below reads the different resistance values to determine what block was placed where.

[Robbe] wrote a program that evaluates various layouts and provides statistics for things like population, overall health, education level, pollution, etc. As you can see after the break, these values change as soon as blocks are added or removed. Part of what makes this simulator so cool is that it could be used for serious purposes, or it could be totally gamified.

It’s no secret that we like LEGO, especially as an enclosure material. Dress it up or dress it down, just don’t leave any pieces on the floor.

Via r/Arduino

Design and 3D Print Robots with Interactive Robogami

Internals of 3D printed “print and fold” robot. [Image source: MIT CSAIL]
Robot design traditionally separates the body geometry from the mechanics of the gait, but they both have a profound effect upon one another. What if you could play with both at once, and crank out useful prototypes cheaply using just about any old 3D printer? That’s where Interactive Robogami comes in. It’s a tool from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) that aims to let people design, simulate, and then build simple robots with a “3D print, then fold” approach. The idea behind the system is partly to take advantage of the rapid prototyping afforded by 3D printers, but mainly it’s to change how the design work is done.

To make a robot, the body geometry and limb design are all done and simulated in the Robogami tool, where different combinations can have a wild effect on locomotion. Once a design is chosen, the end result is a 3D printable flat pack which is then assembled into the final form with a power supply, Arduino, and servo motors.

A white paper is available online and a demonstration video is embedded below. It’s debatable whether these devices on their own qualify as “robots” since they have no sensors, but as a tool to quickly prototype robot body geometries and gaits it’s an excitingly clever idea.

Perhaps there’s an opportunity to enhance the “3D print, then fold” approach Robogami uses with this concept for making flexible prints out of non-flexible material, or incorporating simple 3D printed circuitry.

Thanks to [Adam] for the tip!


Filed under: robots hacks

Design and 3D Print Robots with Interactive Robogami

Internals of 3D printed “print and fold” robot. [Image source: MIT CSAIL]
Robot design traditionally separates the body geometry from the mechanics of the gait, but they both have a profound effect upon one another. What if you could play with both at once, and crank out useful prototypes cheaply using just about any old 3D printer? That’s where Interactive Robogami comes in. It’s a tool from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) that aims to let people design, simulate, and then build simple robots with a “3D print, then fold” approach. The idea behind the system is partly to take advantage of the rapid prototyping afforded by 3D printers, but mainly it’s to change how the design work is done.

To make a robot, the body geometry and limb design are all done and simulated in the Robogami tool, where different combinations can have a wild effect on locomotion. Once a design is chosen, the end result is a 3D printable flat pack which is then assembled into the final form with a power supply, Arduino, and servo motors.

A white paper is available online and a demonstration video is embedded below. It’s debatable whether these devices on their own qualify as “robots” since they have no sensors, but as a tool to quickly prototype robot body geometries and gaits it’s an excitingly clever idea.

Perhaps there’s an opportunity to enhance the “3D print, then fold” approach Robogami uses with this concept for making flexible prints out of non-flexible material, or incorporating simple 3D printed circuitry.

Thanks to [Adam] for the tip!


Filed under: robots hacks

Tinkercad does Arduino

If you’ve done 3D printing, you’ve probably at least heard of Tinkercad. This popular CAD package runs in your browser and was rescued from oblivion by Autodesk a few years ago. [Chuck] recently did a video about a new Tinkercad feature: building and simulating virtual Arduino circuits. You can watch it below.

There are a variety of components you can add to your design. You’ll find an integrated code editor and a debugger. You can even get to the serial monitor, all in your browser with no actual Arduino hardware. You can also build simple circuits that don’t use an Arduino, although the component selection is somewhat limited.

This could be great for teaching Arduino in classrooms or when you want to do some development in a hotel room. The layout is very visual, so if you are accustomed to reading schematics, you may not appreciate the style. In addition, the selection of components is somewhat limited (including only supporting the Arduino UNO, as far as we could tell). So for educational purposes, it is great. For breadboarding your next great Arduino-powered robot, maybe not so much.

If you remember Circuits123 (or circuits.io), this is the same underlying technology. They’ve just integrated it with Tinkercad. However, there doesn’t seem to be any real integration between the two other than they are on the same web page now. Perhaps in the future, they’ll let you drop components on the circuit that also show up in the 3D design (or, at least, with sockets or holders for those components).

However, having a simulated Arduino with a debugger could come in handy even if you don’t care about the circuit simulations. If you really want to do circuit simulation, it is hard to go wrong with LTSpice. If you really want it to be in your browser, there’s always Falstad.


Filed under: Arduino Hacks

Pinball Simulator Makes The Neighbors Happy

There are a lot of simulators out there if you want to try something out that would be otherwise impossible. Great examples are flight simulators for simulating the piloting of a fighter jet, or goat simulators for simulating the life of a goat who destroys a town. [Erland] wanted a pinball machine, but like planes and goats, found it was impractical to get a real one because it would probably upset his neighbors in his apartment. Instead, he set out to build a pinball simulator.

The cabinet is miniature-sized compared to a regular pinball machine so it can more easily fit in the apartment. It utilizes three monitors, a 24″ one in portrait mode for the main playing area, a 20″ one for the back screen, and a smaller one for the “dot matrix” style scoreboard. Once the woodwork was completed, a PC was put together to control everything and an Arduino was installed to handle the buttons and output USB commands to the PC.

Of course, we’ve featured many other pinball simulators before, but this one is no slouch when it comes to features either. It is very well crafted and the project is very well documented, and the miniature size sets it apart as well. However, if you want to go a step further with your pinball simulator, you might want to check out this augmented reality pinball system.


Filed under: toy hacks

Using RC Transmitters With Flight Simulators

It’s winter, and that means terrible weather and very few days where flying RC planes and helicopters is tolerable. [sjtrny] has been spending the season with RC flight simulators for some practice time. He had been using an old Xbox 360 controller, but that was really unsuitable for proper RC simulation – a much better solution would be to use his normal RC transmitter as a computer peripheral.

The usual way of using an RC transmitter with a computer is to buy a USB simulator adapter that emulates a USB game pad through a port on the transmitter. Buying one of these adapters would mean a week of waiting for shipping, so [sjtrny] did the logical thing and made his own.

Normally, a USB simulator adapter plugs in to a 3.5mm jack on the transmitter used for a ‘buddy box’, but [sjtrny] had an extra receiver sitting around. Since a receiver simply outputs signals to servos, this provides a vastly simpler interface for an Arduino to listen in on. After connecting the rudder, elevator, aileron, and throttle signals on the receiver to an Arduino, a simple bit of code and the UnoJoy library allows any Arduino and RC receiver to become a USB joystick.

[sjtrny] went through a second iteration of hardware for this project with a Teensy 3.1. This version has higher resolution on the joystick axes, and the layout of the code isn’t slightly terrible. It’s a great project for all the RC pilots out there that can’t get a break in the weather, and is also a great use for a spare receiver you might have sitting around.


Filed under: peripherals hacks, radio hacks