[Michael Kohn] sent in a link to the set of projects he’s been working on lately. The Java Grinder is a project that converts Java code for use on microcontrollers. This actually started back in 2009, when he mentioned that the project was worthless because there were already a ton of Java virtual machines out there. But if he had really thought that he’d never learn anything. We’re glad [Michael] picked this back up and made something out of it.
The image above shows the proof of concept. It’s a box bouncing around the Nokia 6100 screen. He wrote the animation in Java, and used his grinder to turn the code into dsPIC assembly, which was then compiled and flashed onto the microcontroller. That’s not all, he’s also coded a Mandelbrot set generator or the same hardware. As it stands he can also produce assembly code for use on MSP430 chips.
This kind of exploration is great for the brain. We see it as a natural extension of the learning you acquire from Nand2Tetris which walks through the essential text The Elements of Computing Systems. If you’re not familiar, that’s a trip from building your first logic gate, which you plunk together with others to build an ALU, then start coding all the way up to a virtual machine to run on your simulated hardware.
Video of the bouncing box and Mandelbrot set is below.
Continue reading “Java Grinder Spits Out dsPIC and MSP430 Assembly Code”
We love a good line-following robot project and this really hits the spot. It’s got sharp edges, gobs of solder bridging, and look at all those jumper wires! Despite its appearance it puts in a performance that won’t disappoint.
It uses a dsPIC33 to read from half a dozen analog sensors on the bottom of the board. We’re not all that familiar with the chip’s features, but [Exapod] says it’s got an auto-scan feature he uses to read the sensors. This allows him to sample with 12-bit resolution from all six of them at about 30 kHz. No wonder the thing is so responsive in the demo video embedded below. The track he’s using is just some white printer paper with a fat circuit of black electrical tape placed in a somewhat squiggly pattern.
This is also a fun challenge with toys. Here’s one that hacks a hexapod to follow the lines.
Continue reading “Protoboard line following robot”
The good [Doctor Iguana] has been working on a pair of robots which communicate with each other using mRF24J40MA wireless transceivers. This presents a challenge in debugging, as he really didn’t have an easy way of monitoring those communications. His solution was to build his own base station which lets him use a computer to monitor what each robot is saying.
He spun his own board for the project. USB connectivity is provided by an FTDI chip, the FT232RL. This converts the USB communications in to serial for the dsPIC33 microcontroller. The FTDI chip comes with a fairly fine-pitch, but the footprint can still be fabricated using toner transfer if you’re fairly familiar with the process. [Dr. Iguana] took some close-up images of the unpopulated board which might make you a little nervous with the soldering iron. The other end of the board hosts the same Microchip wireless module as he used in his robots.
After a bit of rework (noted on the photo labels) he got this up and running. Now he can capture all of the wireless communications and see if problems are due to the sender or the receiver.
[Debrah] is taking his next project out to the garage. He built his own CAN bus reader using a dsPIC.
The nice thing about working with Control Area Network is that it’s a universal standard found on every modern production line automobile. And because of this, the chip you need in order to communicate using that protocol will cost just over a dollar. [Debraj] chose the MCP2551, which comes in several different 8-pin packages. There is even an application note tailored for use with the dsPIC33F family.
The project is running on both 5V and 3.3V rails. This complicates things just a bit, but a level converter makes sure that there’s no communications problems between the chips. A four line character LCD acts as the output during the tests (you can see this in the clip after the break) but he’s already got a second version which looks quite a bit better on the dashboard.
What else can be done with this hack? Well, we’ve seen a method used to read control buttons from the steering wheel before. It all depends on what data your vehicle is transmitting and one way to find that out is to build some hardware and start logging the packets. Continue reading “Tinkering with ODB II and the CAN bus”
[Debraj] wrote to us describing a project he recently completed – a simple, compact spectrum analyzer using a 16-bit dsPIC microcontroller.
The analyzer is fed an analog signal, which is passed through a large resistor followed by an opamp. A DC offset is then applied to the signal, after which it is passed through a software-programmable gain amplifier before being fed into the dsPIC’s analog input. A Fast Fourier Transform calculation is done using code provided by the PIC’s manufacturer once 128 samples have been collected. The results are then displayed on the attached LCD in real-time.
If you get a chance, take a look at the video embedded below for a walkthrough and demonstration of his analyzer. [Debraj] says that the analyzer was built to measure harmonics in his home power lines, but for demonstration purposes, he has used a simple function generator instead.
If you’re interested in seeing some other spectrum analyzers, be sure to check out these items we featured in the past.
Continue reading “dsPIC-based spectrum analyzer”
[Nulluser’s] Zipit was fine, but it couldn’t go anywhere on its own. Adding some motors and a microcontroller fixed that issue, and now he’s got a little robot called the Zipitbot. That’s a dsPIC board on top which communicates with the Zipit over an I2C bus. Four servo motors provide plenty of power to the wheels,with some extra battery packs nestled between them.
Since the Zipit is running Linux, and already has WiFi hardware, it’s not too hard to add Internet control. With this in mind there’s a webcam on the front to broadcast a video feed for use when controlling it remotely. See a couple of videos of this hack after the break.
Continue reading “Zipitbot”
Here’s a 2-channel Oscilloscope for your Android phone. It uses a base module driven by a dsPIC for signal processing. From there, an LMX9838 Bluetooth module broadcasts the data to the phone so that the waveform can be displayed. [Yus] ported some Python code he had been using over to a set of Java and XML files in order to get it working on Android. This was actually the first time he worked with the SDK… we’d say he’s a quick learner. See it in action after the break.
Continue reading “Android oscilloscope”