Rasberry Pi Analog Input Using Only Passive Components

The Raspberry Pi is a very capable device whose hardware has been pushed to the limit in all sorts of interesting ways. But even the most ingenious of experimenters have to agree on one point; it doesn’t possess an analog-to-digital converter. If you want analog inputs you will have to buy or build them.

[Mincepi] has done just that, but not as you might expect by adding an integrated circuit on one of the Pi’s interfaces. Instead the circuit [Mincepi] is using consists only of passive components, measuring the time taken to discharge the parasitic capacitance of one of the Pi’s inputs from logic 1 voltage to logic 0 voltage through a resistor into the voltage to be measured. This is a long-established approach to A to D conversion, one that was achieved back in the day with purpose-designed timers as microprocessor ancillaries.

The problem is that the Pi does not have a timer peripheral, so [Mincepi] has used the shift registers that form part of the Pi’s SPI and PCM inputs to perform this task on two channels. A sample rate of 100kHz and 6-bit resolution is claimed, with enough voltage range for a 1V peak-to-peak audio signal to be sampled.

Of course, simplicity does not guarantee a good ADC, and this circuit does not perform very well. It is noisy, non-linear, and as [Mincepi] puts it, probably sensitive to temperature. And though [Mincepi] talks in detail about the software to drive it, none is forthcoming. To quote: “It doesn’t include code since I’m in the process of writing a proper sound device module. My previous code was a simple character device, but it worked just fine, and served to prove the concept.

We really want this to work, even if it’s not the best ADC ever. So we eagerly await the sound device module, and look forward to more news from the project.

This may be the simplest of simple ADCs we’ve yet featured here on Hackaday, but it’s not the first we’ve seen. There is this one using a comparator for example, or this one using a flip-flop. It is the essence of creative electronics to eke a function from a component that was never meant to be, please keep them coming!

Milling PCBs With An Off-The-Shelf CNC

There’s a lot of little things that can go wrong before you get great results out of a process. We like to read build logs to learn from the mistakes made. [Marc Liyanage] bought a Nomad CNC machine from Carbide3d, and after a bit of learning has gotten some very nice PCBs out of it.

The first trip up he encountered was not setting the design rules in EagleCAD to check for gaps too small for his router bit. After he sorted that, and worked around an issue with Carbide not supporting R values for curves; instead opting for IJK, he made a nice TQFP to DIP break out board.

The next board was a more complicated double-sided job. He cleverly had the machine drill two holes all the way through the PCB to give him a space for two alignment pins. Unfortunately this didn’t work out exactly as planned and he had a slight misalignment with some of the via holes. It looked alright and he began assembling. To his dismay, the clearances were off again. It was a bit of deja vu for us.

We’ve made lots of boards on a CNC machine, and can attest to the task’s finicky nature. It’s certainly quicker than the photoresist technique for boards with lots of little holes. It will take someone quite a few tries before they start having more successes than failures, but it’s very rewarding.

Floppy Drive Hides SD Card Reader

[gilmour509] posted a thorough gallery of a new custom-built computer and case made to look like a 1995 IBM Aptiva. While the whole build is impressive, the most clever part involves a 3 1/2″ floppy disk that hides an SD card and works like a regular USB flash drive when inserted into the floppy drive.

He makes use of the fact that floppy disk edge card connectors have the same spacing as SD cards. Add in a hacked USB card reader, some careful cutting and assembly, and [gilmour509] has a very convincing floppy drive with gigabytes of space.

When inserted the light turns on and windows recognizes the drive.

The best part is that with everything put together, the floppy disks and floppy drive look completely unmodified. He even made the file explorer icon show a floppy drive.

The faux-Aptiva gallery includes the full build, but skip to about 2/3 down to see the floppy SD card section.

Continue reading “Floppy Drive Hides SD Card Reader”

This Hourglass Flips Itself

Once upon a time, [Mike] bought an hourglass for his sister. He intended to build it into a clock and give it to her as a gift, but life and other projects got in the way. Fast forward a couple of decades to the point when it all came together and [Mike] had everything he needed on hand to build a beautiful wooden clock that automatically flips the hourglass over.

Every 60 minutes, the bulb, which is situated inside a handcrafted maple ring, rotates 180 degrees to restart the flow of sand. Whatever number is at the top of the outer wheel denotes the current hour. The digit for the next hour is always at the five o’clock position relative to the current hour. This works out because the pockets on the outside of the bulb’s ring share a 5:6 ratio with the gear teeth on the outer ring. Confused? Watch the time-lapse video from [Mike]’s that shows it in action.

[Mike] was determined to build this clock using only things he already had on hand, like a cheap digital watch to keep time and a car window motor to rotate the hourglass. He hacked a USB port into the watch so he could use the hourly chime function to trigger the motor through a quad op-amp. The motor runs until it is triggered to shut off optically—a pair of slits cut into the gear that moves the hourglass pass over a sensor. [Mike] built a beautiful box to hold the guts from a nice piece of walnut and spared no detail in the design.

There are a ton of build pictures on the projects site and an in-depth video tour of the clock, which is embedded after the break. Whether they are designed to amaze or confuse, we love a good clock build around here. If you’re into hourglasses, we featured a digital version not too long ago.

Continue reading “This Hourglass Flips Itself”

A Lucky Antenna

Antennas come in all shapes and sizes, and which one is best depends wholly on what you are doing with it. A very popular choice for sending video from drones is the cloverleaf antenna. It is circularly polarized which is an advantage when you have a moving vehicle. It also reduces multipath interference.

A cloverleaf contains three closed loops spaced at different angles. The antenna works well for transmitting but isn’t ideal for receiving. It is also difficult to tune after building it. However, for the right job, it is a good performer. [Vitalii Tereshchuk] shows how he made a cloverleaf antenna that fits a WiFi router.

Continue reading “A Lucky Antenna”

Paydar: What It Was Like To Battle Bots In 2002

Most people remember when Battle Bots was a big thing, but few of us got to live it as seen in this gallery. Every now and then, someone posts something more amazing than usual in the comments. When [Wolf] was studying at IUPUI they somehow convinced a professor to let them build a scary dangerous robot maiming device for their final project. It’s a cross-disciplinary project — even the medical students may get to participate.

Spike vs hours and hours of work.
Spike vs. hours and hours of work. Victory: spike.

Their bot, unfortunately, got taken out by some spikes after attempting to get a spinbot before it started spinning and got them. If you look closely at the 2002 Comedy Central Battlebot opening you can see the smoke pour from their robot as they try to escape the fatal spikes.

The robot itself is a three wheeled design. The two wheels across from each other drive the robot, and the third steers. There is a very cool encoder mechanism for the steering wheel that is worth checking out. The main drive motor is a hefty 15HP electric forklift motor current limited to 300amps. The robot never got a weapon thanks to slow mechanical engineers, but a motor like that can turn most chunks of metal into deadly weapons.

Battle Bots is making a comeback in some ways. Word’s still out if it will ever go back to it’s prime, or if something more insane will replace it.

Trash Can CNC Gets A Stepper Upgrade

[HomoFaciens] is back at the bench again and working on improvements to his cheap and simple CNC machine.

The video below will no doubt remind you about previous versions of [HomoFaciens]’ CNC builds, which we’ve covered in depth. With an eye to spending as little as possible on his builds, most parts are recovered from e-waste, with a fair amount of Dumpster diving thrown in. For this upgrade, the salvaged brushed DC motors with their signature gap-toothed encoder disks are replaced with genuine bipolar steppers. The primary intention of his build is to learn (and teach) as much as possible, so he spends a good amount of time going over steppers and their control – how to determine phase wiring, how to wire up the not-salvaged-but-still-cheap drivers, directional control, and half-stepping. The mechanics are decidedly dodgy, but there are clever expedients aplenty – we especially like the oil cup fabricated from a brass tube and a bolt with a hole drilled in it. Everything just works, and the results to expense ratio is hard to beat.

While we appreciate the upgrades here, we’re still keen to see how junky his other trash can CNC can get. And we’re still waiting on the paper clip and cardboard challenge.

Continue reading “Trash Can CNC Gets A Stepper Upgrade”