Posts with «555» label

The Best of Both Worlds: Arduino + 555 Should Confuse Commenters

Hardly a week goes by that some Hackaday post doesn’t elicit one of the following comments:

That’s stupid! Why use an Arduino when you could do the same thing with a 555?


That’s stupid! Why use a bunch of parts when you can use an Arduino?

However, we rarely see those two comments on the same post. Until now. [ZHut] managed to bring these two worlds together by presenting how to make an Arduino blink an LED in conjunction with a 555 timer. We know, we know. It is hard to decide how to comment about this. You can consider it while you watch the video, below.

On the plus side, there probably is a use case for this. The LED will blink with absolutely no intervention from the Arduino. You could put the Arduino in deep sleep, if you wanted to and that LED will still blink. With a little work, you could probably adapt this idea to any number of circuits out of the 555 playbook, like a PWM generator, for example.

There’s almost nothing a 555 can’t do. If you want to see what’s under its expressionless face, this teardown is an interesting read. We just hope the comment section doesn’t overload like a Star Trek computer being asked by Captain Kirk to compute every digit of pi.

Filed under: Arduino Hacks
Hack a Day 03 Mar 03:00

Primer on Servos Hits All the Basics

Servos are pretty basic fare for the seasoned hacker. But everyone has to start somewhere, and there’s sure to be someone who’ll benefit from this primer on servo internals. Who knows – maybe even the old hands will pick up something from a fresh perspective.

[GreatScott!] has been building a comprehensive library of basic electronics videos over the last few years that covers everything from using a multimeter to programming an Arduino. The last two installments delve into the electromechanical realm with a treatment of stepper motors along with the servo video below. He covers the essentials of the modern RC-type servo in a clear and engaging style that makes it easy for the newbie to understand how a PWM signal can translate into positional changes over a 180° sweep. He shows how to control a servo directly with an Arduino, with bonus points for including a simple 555-based controller circuit too. A quick look at the mods needed to convert any servo to continuous rotation wraps up the video.

If [GreatScott!]’s video whets your appetite for more, be sure to check out [Richard Baguley]’s deeper dive into servos. And when you’re ready to put your new-found knowledge into practice, maybe a nice project would be to convert a hobby servo into a linear actuator.

Filed under: classic hacks, misc hacks

Various 1 Hz Oscillator Methods


During the fun and enjoyment of experimenting with electronics there will come a time when you need a nice 1 Hz oscillator to generate a square-wave signal to drive something in the circuit. On… off… on… off… for all sorts of things. Perhaps a metronome, to drive a TTL clock, blink some LEDs, or for more nefarious purposes. No matter what you need that magic 1 Hz for – there’s a variety of methods to generate it – some more expensive than others – and some more accurate than others.

A few of you may be thinking “pull out the Arduino” and yes, you could knock out a reasonable 1 Hz – however that’s fine for the bench, but wild overkill for embedding a project as a single purpose. So in this article we’ll run through three oscillator methods that can generate a 1 Hz signal (and other frequencies) using methods that vary in cost, accuracy and difficulty – and don’t rely on mains AC. That will be a topic for another day.

Using a 555 timer IC

You can solve this problem quite well for under a dollar with the 555, however the accuracy is going to heavily rely on having the correct values for the passive components. We’ll use the 555 in astable mode, and from a previous article here’s the circuit:

 And with a 5V power supply, here’s the result:

As you can see the cycle time isn’t the best, which can be attributed to the tolerance of the resistors and capacitor C1. A method to increase the accuracy would be to add small trimpots in series with the resistors (and reduce their value accordingly by the trimpot value) – then measure the output with a frequency counter (etc). whilst adjusting the trimpots. If you’re curious about not using C2, the result of doing so introduces some noise on the rising edge, for example:

So if you’ve no other option, or have the right values for the passives – the 555 can do the job. Or get yourself a 555 and experiment with it, there’s lots of fun to be had with it.

Using a GPS receiver module

A variety of GPS modules have a one pulse per second output (PPS) and this includes my well-worn EM406A module (as used in the Arduino tutorials):

With a little work you can turn that PPS output into a usable and incredibly accurate source of 1 Hz. As long as your GPS can receive a signal. In fact, this has been demonstrated in the April 2013 edition of Silicon Chip magazine, in their frequency counter timebase project. But I digress.

If you have an EM406A you most likely have the cable and if not, get one to save your sanity as the connector is quite non-standard. If you’re experimenting a breakout board will also be quite convenient, however you can make your own by just chopping off one end of the cable and soldering the required pins – for example:

You will need access to pins 6, 5, 2 and 1. Looking at the socket on the GPS module, they are numbered 6 to 1 from left to right. Pin 6 is the PPS output, 5 is GND, 2 is for 5V and 1 is GND. Both the GNDs need to be connected together.

Before moving forward you’re probably curious about the pulse, and want to see it. Good idea! However the PPS signal is incredibly quick and has an amplitude of about 2.85 V. If you put a DSO on the PPS and GND output, you can see the pulses as shown below:

 To find the length of the pulse, we had to really zoom in to a 2 uS timebase:

 Wow, that’s small. So a little external circuitry is required to convert that minuscule pulse into something more useful and friendly. We’ll increase the pulse length by using a “pulse stretcher”. To do this we make a monostable timer (“one shot”) with a 555. For around a half-second pulse we’ll use 47k0 for R1 and 10uF for C1. However this triggers on a low signal, so we first pass the PPS signal through a 74HC14 Schmitt inverter – a handy part which turns irregular signals into more sharply defined ones – and also inverts it which can then be used to trigger the monostable. Our circuit:

 and here’s the result – the PPS signal is shown with the matching “stretched” signal on the DSO:

So if you’re a stickley for accuracy, or just want something different for portable or battery-powered applications, using the GPS is a relatively simple solution.

Using a Maxim DS1307/DS3232 real-time clock IC

Those of you with a microcontroller bent may have a Maxim DS1307 or DS3232. Apart from being pretty easy to use as a real-time clock, both of them have a programmable square wave output. Connection via your MCU’s I2C bus is quite easy, for example with the DS1307:

Using a DS3232 is equally as simple. We use a pre-built module with a similar schematic. Once you have either of them connected, the code is quite simple. For the DS1307 (bus address 0x68), write 0x07 then 0x11 to the I2C bus – or for the DS3232 (bus address is also 0x68) write 0x0E then 0x00. Finally, let’s see the 1 Hz on the DSO:

Certainly not the cheapest method, however it gives you an excellent level of accuracy without the GPS.


By no means is this list exhaustive, however hopefully it was interesting and useful. If there’s any other methods you’d like to see demonstrated, leave a comment below and we’ll see what’s possible. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Various 1 Hz Oscillator Methods appeared first on tronixstuff.

Tronixstuff 31 Jul 14:07
1 hz  555  74hc14  astable  clock  clocks  digital  ds1307  ds3232  em406a  gps  logic  pps  timebase  tronixstuff  ttl  tutorial  

555-Based Dimmer 3D Circuit

I built this 3D, freeform circuit as a test project. I've seen a few lately and love the way they look, and after making this circuit, I'm excited about this method as an alternative to point-to-point soldering or etching for small, one-off boards.

It's a dimmer circuit: a 555-timer-based PWM generator driving a high power MOSFET.  I kept it simple and focused on a method, not on making anything particularly fancy.

I edited a schematic for a board I'd built earlier, adding a scrounged 10k audio potentiometer with switch.  The parts list was short:
  • 10k potentiometer with switch,
  • 2 2-pin screw terminals (input and output),
  • NE555 8-pin chip,
  • fat npn MOSFET like a TIP120,
  • 2 1N4148 diodes,
  • 2 capacitors: .1uF and 1uF,
  • 330 ohm resistor
The first step was the Eagle board layout.  With air-wires I moved things around for a while to get things close, and routed and rerouted a few times before figuring out a some guidelines:
  • Put the major components where you want them first,
  • Pack the rest of the components in paying attention to keeping traces short.
  • Small 2-lead components can fit later, with one lead overlapping its signal, the other reached by a branch made from its lead.
  • Lay out a few long traces that hit the most pins and cover the most ground first.  Try to get those traces in a straight line or aligned in an L- or S- or U- arrangement, more or less.
  • Avoid branching, unless the branch can be a component's lead.
  • Small kinks and zig-zags are OK and may be built with straighter wire segments later, with pins bent to get where they need to be. 
  • Don't think much about top/bottom layering and about crossing lines.  There will be room to cross a wire here or there.  Try not to cross, but you can worry about top and bottom later.
Then on to building, which breezed by.  Pre-bent wires made it a straightforward, by-numbers sort of thing, and I used the components' leads instead where I could,  reducing the number of parts.  Building notes:
  • Print out a sheet to see the circuit different ways, running the same sheet through the printer, taking advantage of the print options:
    • Aligned top center, scale 2 or 3 (what will fit), with all layers drawn.
    • Aligned lower left, scale 1, with all layers,
    • Aligned lower right, scale 1, just the traces.
    • Note: also print scale 1 mirrored versions too, of all layers and traces only, to see things from the bottom, which is how things are soldered.
  • In the trace-only print-out, number the longest traces to make wires for them.
  • Strip a length of stripped solid-core wire for each long trace.  Bend them to shape with pliers, clipping to length, using the trace-only print as the pattern.
    • Small kinks in the pattern don't generally need to be bent-- wires and pins will bend during soldering.
  • Clip leads after soldering, unless it has to butt up as a T.  It's easy to clip after soldering, and wires can shift during soldering.
Here's a video walk-through of the circuit:
Jeff's Arduino Blog 01 Nov 21:56
555  eagle  layout  

Hacking a floating RGB LED decorative ball

Knowing that I’m always happy to get something new and glowy, my wife brought home a cheap “floating pool light” that she found on sale for roughly $10. This is a large white floating ball that has LEDs inside and cycles through different colors. Meant to be put into a pool for neat effects, we found it to be much more interesting just used around the house.

However, it was a bit too bright and cycled colors too quickly for our taste. It was actually somewhat distracting when we were just trying to sit and have a few beers late at night on our patio. This gave me a perfect excuse to tear it apart and start hacking… like I wasn’t going to do that anyway.

What I found inside was extremely simple. There’s a single un-marked chip that holds the different display modes (there were 3 display modes: warm, cool, and white). The LEDs were arranged in an array of Reds, Blues, Greens, and Whites (half marked yellow).

My goal was to make this a little more tolerable as mood lighting, so I needed to draw up a plan. I have an arduino sitting here from the redbull contest, so I figured why not hook it up to that? It would allow full PWM control of the channels and I could do some pre-programmed sequences if I wanted.

This was ridiculously easy. All I needed to do was solder leads on to each of the LED channels. There are already great tutorials on how to run PWM from the arduino and a couple quick additions would give me direct controls over each channel via potentiometers. So problem solved right?

Well, sort of. It really bugs me that there’s an entire arduino there just for some PWM. I can go buy the components to do 555 timer PWM circuits if all I want is PWM. Then again, if I compare the price, that free arduino is a much cheaper solution than buying 2xcaps, 1×555, 1xtransistor, and assorted resistors and diodes, especially if consider that I’d have to buy it all in triplicate.

Ultimately if I wanted to just leave this as PWM control on each channel, I’d opt for the 555 circuit. What else is there to do with a glowing ball? Simple notification system? Sound reactive? Give me some ideas.

Filed under: Ask Hackaday
Hack a Day 08 Sep 20:01
555  arduino  ask hackaday  led  rgb