Although we see a lot of MATLAB use in industry and in academia, it isn’t as popular in the hacker community. That’s probably due to the cost. If you’ve ever wondered why companies will pay over $2000 for the base product, you might enjoy the video of a webinar covering using MATLAB and Simulink (a companion product) to program the CPU and FPGA on a Zynq Zedboard. Not interested because of the price? If you aren’t using it for commercial purposes, it isn’t as bad as you think.
MathWorks is one of those companies that likes to market by virtually giving away products to students with the hope that they’ll adopt the same tools when they land jobs in industry. Their flagship product, MATLAB, is well-entrenched in the labs and offices of big corporations. We’ve often thought that MATLAB is sort of what FORTRAN would look like if it had been developed in the last 20 years instead of 60 years ago. It is true that a base license for MATLAB is over $2000. However, if you aren’t using it for commercial purposes, and you can’t score a student license, you can get a personal license of MATLAB for about $150. The extra modules are also similarly reduced in price. If you are a student, the price drops to about $100, although many schools have licenses students can use at no cost to them.
If you watch the video from [Noam Levine], you’ll see you get your money’s worth. If you are wanting to configure the FPGA directly, this isn’t for you. But if you just want to accelerate a program by pushing DSP or other algorithms that can benefit from hardware assistance, MATLAB makes it very easy.
Continue reading “MATLAB And Simulink For Zynq”
The picture above looks like a standard four-wheel drive (4WD) touring car. As one looks closer, a few strange things start to pop out. Where’s the motor? 4 electronic speed controls? What’s going on here? [HammerFET] has created this independent drive R/C car (YouTube link) as a research platform for his control system. The car started off life as a standard Schumacher Mi5 1/10th scale Touring Car. [HammerFET] removed the entire drive system. The motor, differentials, belt drive, and ESC all made for quite a pile of discarded hardware.
He replaced the drive system with 4 Turnigy brushless outrunner motors, installed at the chassis center line. To fit everything together, he had to 3D print new drive cups from stainless steel. The Mi5’s CVD drive shafts had to be cut down, and new carbon fiber suspension towers had to be designed and cut.
The real magic lies in [HammerFET’s] custom control board. He’s using an STM32F4 ARM processor and an InvenSense MPU-6050 IMU which drone pilots have come to know and love. Hall effect sensors mounted above each motor keep track of the wheel speed, much like an ABS ring on a full-scale car.
[HammerFET’s] software is created with MATLAB and SimuLink. He uses SimuLink’s embedded coder plugin to export his model to C, which runs directly on his board. Expensive software packages for sure, but they do make testing control algorithms much simpler. [HammerFET’s] code is available on Github.
Since everything is controlled by software, changing the car’s drive system is as simple as tweaking a few values in the code. Front and rear power offset is easily changed. Going from a locked spool to an open differential is as simple as changing a value from 0 to 1. Pushing the differential value past 1 literally overdrives the differential. In a turn, the outer wheel will be driven faster than it would be on a mechanical differential, while the inner wheel is slowed down. Fans of drifting will love this setting!
[HammerFET] is still working on his software, he hopes to implement electronic torque vectoring. Interested? Check out the conversation over on his Reddit thread.
Continue reading “Independent Wheel Drive R/C Car”