It never fails — we post a somewhat simple project using a microcontroller and someone points out that it could have been accomplished better with a 555 timer or discrete transistors or even a couple of vacuum tubes. We welcome the critiques, of course; after all, thoughtful feedback is the point of the comment section. Sometimes the anti-Arduino crowd has a point, but as [Great Scott!] demonstrates with this microcontroller-less boost converter, other times it just makes sense to code your way out of a problem.
Built mainly as a comeback to naysayers on his original boost-converter circuit, which relied on an ATtiny85, [Great Scott!] had to go to considerable lengths to recreate what he did with ease using a microcontroller. He started with a quick demo using a MOSFET driver and a PWM signal from a function generator, which does the job of boosting the voltage, but lacks the feedback needed to control for varying loads.
Ironically relying on a block diagram for a commercial boost controller chip, which is probably the “right” tool for the job he put together the final circuit from a largish handful of components. Two op amps form the oscillator, another is used as a differential amp to monitor the output voltage, and the last one is a used as a comparator to create the PWM signal to control the MOSFET. It works, to be sure, but at the cost of a lot of effort, expense, and perf board real estate. What’s worse, there’s no simple path to adding functionality, like there would be for a microcontroller-based design.
Of course there are circuits where microcontrollers make no sense, but [Great Scott!] makes a good case for boost converters not being one of them if you insist on DIYing. If you’re behind on the basics of DC-DC converters, fear not — we’ve covered that before.
Continue reading “The Pros and Cons of Microcontrollers for Boost Converters”
One way to understand how the 555 timer works and how to use it is by learning what the pins mean and what to connect to them. A far more enjoyable, and arguably a more useful way to learn is by looking at what’s going on inside during each of its modes of operation. [Dejan Nedelkovski] has put together just such a video where he walks through how the 555 timer IC works from the inside.
We especially like how he immediately removes the fear factor by first showing a schematic with all the individual components but then grouping them into what they make up: two comparators, a voltage divider, a flip-flop, a discharge transistor, and an output stage. Having lifted the internals to a higher level, he then walks through examples, with external components attached, for each of the three operating modes: bistable, monostable and astable. If you’re already familiar with the 555 then you’ll enjoy the trip down memory lane. If you’re not familiar with it, then you soon will be. Check out his video below.
Continue reading “Learning The 555 From The Inside”
There’s something to be said for the feel of controls. Whether it’s the satisfying snap of a high-quality switch or the buttery touch of the pots on an expensive amplifier, the tactile experience of the controls you interact with says a lot about a device.
[GreatScott!] knows this, and rather than put up with the bump and grind of a cheap rotary encoder, he decided to find an alternative. He ended up exploring hard drive motors as encoders, and while the results aren’t exactly high resolution, he may be onto something. Starting with a teardown of some old HDDs — save those magnets! — [Scott!] found that the motors fell into either the four-lead or three-lead categories. Knowing that HDD motors are brushless DC motors, he reasoned that the four-lead motors had their three windings in Wye configuration with the neutral point brought out to an external connection. A little oscilloscope work showed the expected three-phase output when the motor hub was turned, with the leading and lagging phases changing as the direction of rotation was switched. Hooked to an Arduino, the motor made a workable encoder, later improved by sending each phase through a comparator and using digital inputs rather than using the Nano’s ADCs.
It looks like [GreatScott!]’s current setup only responds to a full rotation of the makeshift encoder, but we’d bet resolution could be improved. Perhaps this previous post on turning BLDC motors into encoders will help.
Continue reading “Scrap a Hard Drive, Build a Rotary Encoder”
A fully stocked freezer can be a blessing, but it’s also a disaster waiting to happen. Depending on your tastes, there could be hundreds of dollars worth of food in there, and the only thing between it and the landfill is an uninterrupted supply of electricity. Keep the freezer in an out-of-the-way spot and your food is at even greater risk.
Mitigating that risk is the job of this junkbox power failure alarm. [Derek]’s freezer is in the garage, where GFCI outlets are mandated by code. We’ve covered circuit protection before, including GFCIs, and while they can save a life, they can also trip accidentally and cost you your steaks. [Derek] whipped up a simple alarm based on current flow to the freezer. A home-brew current transformer made from a split ferrite core and some magnet wire is the sensor, and a couple of op-amps and a 555 timer make up the detection and alarm part. And it’s all junk bin stuff — get a load of that Mallory Sonalert from 1983!
Granted, loss of power on a branch circuit is probably one of the less likely failure modes for a freezer, but the principles are generally applicable and worth knowing. And hats off to [Derek] for eschewing the microcontroller and rolling this old school. Not that there’s anything wrong with IoT fridge and freezer alarms.
Continue reading “Junkbox Freezer Alarm Keeps Steaks Safe”
Can you buy a working radar module for $12? As it turns out, you can. But can you make it output useful information? According to [Mathieu], the answer is also yes, but only if you ignore the datasheet circuit and build this amplification circuit for your dirt cheap Doppler module.
The module in question is a CDM324 24-GHz board that’s currently listing for $12 on Amazon. It’s the K-band cousin of the X-band HB100 used by [Mathieu] in a project we covered a few years back, but thanks to the shorter wavelength the module is much smaller — just an inch square. [Mathieu] discovered that the new module suffered from the same misleading amplifier circuit in the datasheet. After making some adjustments, a two-stage amp was designed and executed on a board that piggybacks on the module with a 3D-printed bracket.
Frequency output is proportional to the velocity of the detected object; the maximum speed for the sensor is only 14.5 mph (22.7 km/h), so don’t expect to be tracking anything too fast. Nevertheless, this could be a handy sensor, and it’s definitely a solid lesson in design. Still, if your tastes run more toward using this module on the 1.25-cm ham band, have a look at this HB100-based 3-cm band radio.
Continue reading “The Right Circuit Turns Doppler Module into a Sensor”
In these times when we try to squeeze out extra clock cycles by adding more cores to our CPUs and by enlisting the aid of GPUs, [Ido Gendel] thought it would be fun to go in the exact opposite direction, supply a clock to the ATtiny85 that cycles only once per day, or at 0.000011574Hz. What application could this have? Well, if he could do it in seven instructions or less, how about turning on an LED at sunset Friday evening, to indicate the start of the Jewish Shabbat (Saturday), and turn it off again at sunset Saturday evening.
Notice the subtlety. A clock that cycles once per day means you can execute at most one instruction per day. Luckily on AVR microcontrollers, the instructions he needed can execute in just one cycle. That of course meant diving down into assembly code. [Ido] wasn’t an assembly wizard, so to find the instructions, he compiled C code and examined the resulting assembly until he found what he needed. One instruction turns on the LED and the instruction immediately following turns it off again, which normally would make it happen too fast for the human eye to register. But the instruction to turn it on runs on Friday evening and the very next instruction, the one that turns it off, doesn’t run until Saturday evening. Do you feel like you’re in a science fiction story watching time slowed down? Freaky. A few NOPs and the jump for the loop take up the remaining five cycles for the week.
For the source of the clock he chose to use an LDR to detect when the light level dropped at the end of the day. The problem he immediately ran into was that clouds, bird shadows, and so on, also cause drops in the light level. The solution he found was to widen the light and dark range by adding a TLV3702 push-pull output comparator and some resistors. [Ido] gives a detailed explanation of the circuit in the video after the break.
Continue reading “Saturday Clock: An 0.000011574Hz ATtiny85 clock”
When a job can be handled with a microcontroller, [devttys0] likes to buck the trend and build a circuit that requires no coding. Such was the case with this “Clapper”-inspired faux-AI light controller, which ends up being a great lesson in analog design.
The goal was to create a poor man’s JARVIS – something to turn the workshop lights on with a free-form vocal command. Or, at least to make it look that way. This is an all-analog circuit with a couple of op amps and a pair of comparators, so it can’t actually process what’s being said. “Aziz! Light!” will work just as well as any other phrase since the circuit triggers on the amplitude and duration of the spoken command. The AI-lite effect comes from the clever use of the comparators, RC networks to control delays, and what amounts to an AND gate built of discrete MOSFETs. The end result is a circuit that waits until you finish talking to trigger the lights, making it seems like it’s actually analyzing what you say.
We always enjoy [devttys0]’s videos because they’re great lessons in circuit design. From block diagram to finished prototype, everything is presented in logical steps, and there’s always something to learn. His analog circuits that demonstrate math concepts was a real eye-opener for us. And if you want some background on the height of 1980s AI tech that inspired this build, check out the guts of the original “Clapper”.
Continue reading “Faux-AI Clapper Almost Seems to be Listening”