Archive | November, 2017

A two dollar programmable FM radio

07 Jan

A two dollar programmable FM radio

It's been ages since I posted anything on electronics, even though I keep playing to learn more. I also frequent dx.com quite a bit and a fun little thing I picked up was a $2 radio-curcuit-board. It's a fully programmable FM radio that is 11 x 11 x 4 mm in size. As usual with electronics from China, the website barely says anything about the product. You just have to buy one and see if you can make it work.

The circuit came without any documentation, but Google is your best friend. The datasheet was all in Chinese, but thanks to Google Translate I figured out that this circuit was very similar to many other implementations of the TEA5767 radio chip. These chips all have the same pin-density as ZigBee modules, so I soldered on some ZigBee-headers to make connecting it easier. As you can see from the picture above, my cables were all over the place. Below is a cleaned up sketch of how to connect the TEA5767 radio module from dx.com (click to view full size). The audio amp obviously goes in between the speaker and the TEA5767 output.

The TEA5767 can be controlled using either Serial or I2C, so it's really flexible. It's not very powerful, so you'll need an audio amplifier to hear anything. I used an Adafruit MAX98306 amp breakout that I had from a former project. I won't get any style-points for this setup, but I'm glad I got it to work almost right away. This instructable made the code part really easy. Using a 10k pot to control the frequency also highlighted that more than 10-bit resolution would be nice (for better precision) or maybe one should rather use an encoder? Good learning fun anyway. Here's a vid of it working.

Heated Build Platform for Ultimaker

19 Jun

Heated Build Platform for Ultimaker

Note: updated description available here! While this is written for the Ultimaker, it should also work the same for any RepRap printers with similar RAMPS electronics.

One thing I disliked with using a Makerbot was it's dependance on printing with ABS plastic. ABS comes from fossil fules and is thus a limited resource. PLA usually comes from Corn and is thus fully renewable and to some degree also biodegradable. This was one of my main reasons to get a Ultimaker in the first place, but then it dawned on me that the 60 degree celcius melting point for PLA was going to be a problem for many of my projects. I had to make my Ultimaker capable of using both plastics: PLA for prototyping and ABS for lasting models.

Why

When you are printing with PLA, all you need is some blue painters tape to print on. ABS however, won't stick to that. In addition - ABS requires that you keep the model warm while printing and ideally it should be allowed to cool off slowly to avoid cracks due to the material shrinking. How warm the heated build surface should be will vary a little based on the plastic, but I found these tables in the Makerbot Wiki a good reference. 110-120 celcius seems to make the ABS that I use stick well.

You can also use a heated surface for PLA, but then you keep it at about 70 degrees celcius. A nice plus when printing PLA on a heated surface is that it requires virtually no force to remove the model once the surface has cooled. What I needed was a Heated Build Platform (or HBP for short).

What and Where

How does one make such a thing? The RepRap wiki has many suggestions but after reading through all the links, there was one design that really appealed to me. It's basically a PCB that barely has any components, but rather lots of copper. When power is applied to the PCB, the copper turns hot - just like in an electric oven or a hair dryer. 

This PCB was designed by Josef Prusa and it's a perfect size for the Ultimaker (20 x 20cm). It also has a feature that I appreciate - it's made for 12 volt operation so no need to mess with AC electricity that could kill you! There are many similar methods used in various industries today and if I didn't want to use 230v, I'd probably get the SRFG-808 from this site (GBP 44).

Josef's design is called MK1 but the wiki also contains an alternate version here is a derivative version with a hole in the center. This one is called MK2. These both work the same, but there's really no need for the hole in the middle. This description should work for both though. After reading some warnings and sad stories from people that bought "cheap" PCB copies on Ebay, I decided to get a MK1 from a reputable supplier that would also give a little back to the creator of the PCB. I didn't find any good tutorial on how to set the heated bed up, so I figured that I'd write how I did it for others to find.

The nice thing about shopping from companies like Ultimachine is that they know what else you need. I also picked up a 100k Thermistor with PTFE sleeving from them to measure the temperature. I also picked up some 100mm Kapton tape for covering the print surface. You can also use thermistors with 10 or 200k resistance or a thermocouple based on AD595. Thanks to Daid's great Marlin Builder, you can adjust your Ultimakers firmware to reflect the correct hardware. Speaking of Daid - if you're not using his Cura software for your Ultimaker - you're missing out Big Time. To me it's been the difference between a good purchase and a bad one!

The Power Supply that comes with the Ultimaker cannot drive both the machine and a heated bed. Due to this, most others have gone the path of adding an additional power supply. Some have even replaced the existing one, but due to the limited space beneath the Ultimaker I had a hard time finding one that could both fit inside as well as provide a decent airflow to keep things cool. What I ended up getting was an external power brick that could deliver 12.5Amps of 12 volt. The PCB only pulls 10A maximum so I figured that would be sufficient. Having two power bricks isn't "sexy", but it does not require any big changes to the Ultimaker's stylish wooden body and it does not add more noise. Also - they had one at my local computer supply store, so I could just pick it up. It's a little pricey at GBP100 / $150 but I still like the solution.

So I had the heating element, a way to power it and a way to measure the temperature. Now I just needed a way to turn it on and off when required. I was thinking of building my own solution, separate from the Ultimaker. The Streacom PSU had both 5v and 3.3v so I could easily add an Arduino Mini to control the heated bed. I would need a screen or at least one 7-segmentd display, some buttons for control and with this I could even pimp my Ultimaker by letting this control some RGB LEDs. Yeah. That's what I'll do! I ordered a bunch of components from Adafruit and Sparkfun, but as I waited for these it started to annoy me that I couldn't combine this with the Ulticontroller.

I started digging and it turns out the Ultimaker PCB had lots of what was needed. There's a connection for the thermocouple and a PWM output with a solid MOSFET... I wonder if that couldn't drive a standard relay for a car? I picked up a 30 amp relay at my local car supplies and it worked like a charm with the 19 volt output of the Ultimaker. I got great help from this Instructable measuring the Relay. The relay cost $6.50 and I also got a nice socket for $4 that I could use for simple mounting and replacement (if required).

This is how the end result looks and below is a tutorial on how to do this yourself.

Bill of Materials

Here's the list of components I've used:

  • MK1 PCB. See RepRap wiki for suppliers. ($50 from Ultimachine)
  • 100k Thermistor ($2.75 from Ultimachine)
  • Streacom 150 watt external PSU ($150 at my local PC store)
  • 360 watt industrial type PSU from Ebay ($50 with shipping)
  • Relay + relay socket with cables. Make sure it's a 5-pin one, so it's both open/closed. ($10.50)
  • ATX 24 to 20 pin conversion cable ($8 at a local computer store)
  • 25 x 25cm plywood piece, 10-12mm thick, as flat as possible ($2 at a woodshop)
  • 24 x 24 cm sheet of 4 mm glass with 4 holes spaced 209mm apart ($30 at my local glass-shop)
  • A 4.7k resistor
  • A few 3mm o-rings (rubber gaskets) that fit the holes in the glass sheet
  • Four 4-6cm, 3mm bolts
  • Some 3mm nyloc nuts, washers and other spare parts that came with your ultimaker
  • Kapton tape

Tools

  • multimeter
  • basic soldering kit
  • Drill
  • Having an Ulticontroller is a huge plus for reading the temperature

Alltogether, the cost for my heated bed was about $150. I also could have saved a little by not getting holes made in the glass but rather use bulldog clips like Josef Prusa did. That would have saved a few dollars as well, so the total cost could have been as low as $100. Also note - these prices are from Norway ( = everything is expensive) so your bill will probably be lower than mine.

How

So - how to put this together then? It's not hard at all and I've also made some custom 3D parts to make it easy to mount the hardware.

1. Print the adjustment screw pieces

Printing these before removing the old build platform will save your fingers later on!

2. Drill 8 holes in the plywood square

Make 4 holes (3mm) that match the position of the adjustment screws of the original build platform. Then make 4 holes that match the position of the holes in the PCB. Make sure you drill all these very precisely or it won't fit.

3. Remove the old platform

Remove the acrylic and unscrew the screws. Save the screws as you'll use these later.

4. Mount the new adjustment screws

Take one long screw, one nyloc hex nut and one plastic screw-handle (eye-shaped) and put these together. These provide a solid adjustment screw for the bed and the screw-handle makes them much easier and precise to use than the hex-wrench. Once all four are put together, screw them into the delrin holes - but this time screw them in from the bottom. Using an electric screwdriver/drill is recommended. Tiresome!

5. Mount the PCB on the Plywood

For this, you can use the old "adjustment" screws. I put a hex-nut between the Heater PCB and wood, and another hex above to keep things in place. On top of this, I added a washer. In the picture below I've also added the springs from the old setup. Don't do this. It was just an experiment. O-rings are smarter.

 

6. Mount the Thermistor

It is nice to have a way to measure the temperature before you hook the Heater PCB to it's power. There are two things to do here. First you need to solder a 4.7k resistor on the Ultimaker's PCB. Unscrew the Controller PCB and take it out of the machine. The resistor should be added where it says R4 on the Controller PCB.

Next, make two wires that are about 70 cm long. These should be of the standard, thin type used in the rest of the machine. Guide the cables down through the rear, right cable duct. Connect these to the outer two pins on the connector marked "Temp 3" (as shown in this picture). Next, put the fan-thingie back on the Ultimaker Controller PCB. If you forget this, you'll easily destroy it.

Connect the other end of the wires to the Thermistor. I used a 2-pin terminal block as the thermistor can be hard to solder due to it's ability to withstand high temperatures. Now it's time to turn on the Ultimaker and test it! To do this, you'll need a custom firmware version. I assume you already use Cura for slicing and printing your models? Then you already know that Daid makes some great software! Making the custom firmware is really easy with his Marlin Builder script. Be careful to not adjust anything you don't know what is... Under "Heated bed temperature sensor", select the sensor you got. There are several 100k thermistors in the list, but if your isn't listed (or even marked in any way) just go with the "100k thermistor" option. If you have the Ulticontroller, check that one off the list as well and click the "Build Marlin" button.

At the top of the page there will now be a download link for a ZIP with the windows install file (that I used), as well as the .HEX file itself. Once the firmware is updated, it's time to test! If you have the Ulticontroller, you should now see another temperature reading and if you touch the temperature sensor, the display should change to reflect that you are (hopefully!) warmer than your surroundings. If you want to test it at higher temperatures, stick the thermistor to the printers extruder-head and set a new temperature with the Ulticontroller.

PS: Don't worry about the heat damaging the thermistor. It should be rated for more than 300 degrees and you should not go above 240 to avoid blocking your print head with burnt filament... Just test that the temp is fairly correct up to 110-120 as that's the highest you'll need to go.

7. Mount the relay

Solder a couple of wires (about 80 cm) to the heater PCB. According to this chart, these cables should be no less than 1.3mm thick to carry 10 amps safely. I used 2mm to be on the safe side, but that's probably not required. Guide the cables down through the rear, right cable duct as you did for the thermistor. Don't pull all the cable to the bottom as you'll want to be able to move the Build platform up and down without pulling the wires.

Next up is the Relay. I used an automotive relay since I know that they are made to withstand a lot of power and they are dirt cheap. Any relay rated above 10A(mperes) should be fine as long as the voltage is more or less the same as the 19v the Ultimaker will output. Autos use 12v and are rated for 30A so that should work for most relays.

Measure the relay according to these instructions and make a note of what color the different cables are and what they should do. If you got a relay like the one I got (5 cables), there will be_

  • Two cables where you apply power to close the relay (connected to the Ultimakers output)
  • The two cables that will be connected when the relay is closed (external power goes through here)
  • One unused cable

In the linked tutorial, the first two are referred to as COM and NO. On the relay that I was using, these are referred to as 86 and 85:

Between these, you should be able to measure a connection but the resistance should not be very high. Connect these to the Heated Bed output, close to your Ultimakers power jack.

On my relay (see below) the pin marked 30 is common and pin 87a is the normal position. When I measured these and found a fairly high resistance (as indicated in the tutorial). That meant pin 30 amd 87 should connect when the relay became energized. So by simply connecting one of the cables for the heated bed through pin 30 and 87, the Ultimaker would toggle power on/off as required.

8. Prepare the ATX connector

It's not much that you need to do with the power supply itself, but you'll need to tweak the ATX conversion cable a little. Start by cutting off the 24-pin side of it and then remove the wires you don't need. Since the PSU has some amperes to spare and it's easy to keep the 3.3 and 5v cables, I saved some of these in case I want to add an Arduino for some custom lighting or something. According to what I've read, the pins in the ATX connector are rated for 6A each, so to safely use 10A I connected two grounds and two 12 volt together. 

Yellow = 12v, red = 5v, orange = 3.3v, black = ground (ref)

9. Testing time

Make sure you re-attach the fan over the Controller PCB and then flip the Ultimaker over to normal position. Now you can test if you connected it correctly by setting the heated bed temperature to something above room temperature.

If you are using the Ulticontroller, just select the Heated bed from the menu. If you don't have the Ulticontroller, you will need something that can connect to the printer and send it commands. Both Printrun and ReplicatorG can do this. In Printrun, there's a separate window for entering commands directly. In ReplicatorG, you just make a new file, type the command into the gcode-tab and then send it to the printer as you would when printing. The command to send is:

M140 S70.0

This should set the temperture of the bed to something near 70 degrees. When the Ultimaker reads the Thermistor to be too cold, it will apply power to the Heated Bed output and close the relay. When the relay closed, I could measure a decent resistance from pin 30 to 87, but no longer from 30 to 87a. The connection was confirmed! My next step was connecting it all to the Heatbed PCB, place the thermistor on the Heated bed and test the complete setup.

Note: Since 1.5.4 of the electronics, the Ultimaker has a 55A MOSFET on the heater connection. This should be sufficient to switch the power to the bed directly, but I don't know enough about electronics to confirm this. Using a relay is within my scope of knowledge, it's totally clean and also separates the two completely in the case of an error. It would be great if someone wiser than me could comment if direct switching is now possible!

I tested thoroughly and measured with an IR thermometer what components became hot as the bed heated. On the tiny PCB that distributes and converts power became hot after 3 hours continous heating. It's the square, black component that becomes warm - about 70 degrees. I made a mounting bracket for attaching it to the bottom of the Ultimaker and on this one, I added screw-holes for a 20mm PC fan. These can be bought in any computer supply store. They operate at 12 volt and it keeps the ATX connector at room temperature even when the bed is constantly on for 10 hours or more.

10. Mount it all on the Ultimaker

Once you are sure the electronics work as intended, you can wrap up the build. First, secure the electronics in place beneath the Ultimaker. For this purpose I've made some more printed parts. Make sure that the holder for the ATX-plug-holder is printed in ABS and not PLA (so it handles heat better). You just slide this one onto the connector and screw in place a 20mm fan. Connect the fan directly to the 12v lines on the connector, drill the one missing 3mm hole under the Ultimaker and fasten the holder with some of the 3x10mm spare screws that came with the machine as well as some nylock nuts.

Next, mount the power jack. This requires some drilling to get perfect, but I'm quite happy with the result.

When this is in place and the cables have been adjusted a little, it doesn't look too messy beneath:

You can see the connections more clearly in this image (click for full rez):

I mounted the 4.7k resistor on some header pins to see if I could get more precise temperture readings by tweaking the resistor values. In the end, I ended up going with the 4.7k anyway so I should probably remove the headers and solder it permanently.

Put the plywood/pcb on to the adjustment screws. Cover the glass plate with kapton tape and put it onto the PCB. Adjust the height of the Heater PCB screws, so the top is flush with the glass surface. Add o-rings (rubber gaskets?) between the 3mm screw and the glass. This ensures that the glass lies steady, but still can expand a bit as it gets hot.

Next we need to make sure the bed is entirely level. The standard rule about being able to pull a sheet of paper between the print head and the surface applies. Move the print head around the entire surface to make sure it does not touch the glass/kapton surface.

Adjust the length of the wires for the Heater PCB and the Thermistor. Make sure to leave some centimeters of wire so that the platform can move all the way up/down without pulling the cables.

That's it. Set the temperature of the bed depending on your plastic type and print away!

The result

The Heated Bed works just as intended and I'm very happy to have it all working. Before doing this, I thought that the constant clicking of the relay would drive me crazy bt it's really no problem. The printer itself is so loud that it's merely a drop in the ocean. The setup has been working non-stop for almost two weeks now. For PLA printing, it's simply fantastic. Models stick like glue when the platform is at 70 degrees, but come loose very easily when the platform cools off.

For ABS, it works but it's not perfect. It takes about 10 minutes to get up to 100 degrees. This is decent, but quite a long time. To get to 110, it's even longer and I can just barely go beyond that. The thing is that I need the bed to go to 110 and maybe also 120 for the ABS to stick properly. Now, it works fine for models that have a large area of contact, but smaller models often come loose since the plastic isn't sticking well enough. Due to this I'm now experimenting with closing the gap around the build surface using high-temperature silicone. This looks good so far, but I'll update here once I get to test a little more.

Update June 23rd 2012:
Closing the gap around the Heater PCB gave no measurable effect! Have to say I'm a bit stunned by that one. It takes just as long to get up to temperature and it's just as hard to go higher. I guess that means that my Power Supply is too weak. I'll test this with a computer PSU and update here later.

Update July 25th 2012:
Tried with a 450 watt PSU (12V/16A) and found no noticable difference. Could it be that I need to bundle the two 12V lines? Thinking aloud: 12V * 16A = 192 watts. Multiplying this with two seems like an idea, but I'll need to find documentation on how this PSU (KDM-1UFX425) is built then. I don't want to start a fire...

Update 3 August 2012:
Turns out that my idea of maintaining some distance between the glass and the PSU wasn't such a good idea after all. When testing with a different PSU today, the glass cracked since the glass was bigger than the PCB and thus wasn't heated equally. I have a spare 20 x 20 cm glass that I'll fix to the PCB with bulldog clips like all others do. I have those already.

Update 5 August 2012:
Turns out I simply did not have enough power. Instead of using the 120 watt Streacom PSU, i will be using a 360 watt industrial type PSU (12V / 30A) that I got from Ebay for about $40 (plus shipping). You can see this PSU in the image below. The drawback of this one is that I sort of have to deal with 220 volt, but it's quite well protected so it's not scary in any way. I will also have to print some feet for the Ultimaker before mounting this permanently as it's a little too tall (5cm), but it'll fit nicely just behind the front of the machine. This PSU also has the extra power to drive LED's and such so I can now "pimp" my Ultimaker a little more wink

 

RGB LED - Common Cathode or Common Anode?

05 Mar

RGB LED - Common Cathode or Common Anode?

One of this things I initially found odd about electronics is how it's not really about the 5V plus and ground, but rather the difference between plus/minus. Some components like diodes and electrolytic capacitors will only allow power to flow one way, so direction matters when you're ordering your RGB LEDs. For my cube project, I've gotten some nice, diffused 10mm RGB LEDs but I didn't really pay attention when I ordered them, so when I started playing around tonight I was fumbling with what to apply to wich LED leg. So for future reference - here's the rule:

  • A RGB Common Anode LED should have it's longest leg (leg 2) connected to the 5V pin on your Arduino (Current sink)
  • A RGB Common Cathode LED should have it's longest leg (leg 2) connected to the ground pin on your Arduino (Current source)

In both cases, you'll connect the R, G and B legs of the LED to IO pins on your Arduino through some suitable resistor (200-330 Ohm) to not burn out the LED. So when should you get what version? Your Arduino can drive a couple of RGB LEDs, but you only have 7 PWM channels and you can't draw more than 40mA from each of these. If you want to drive more LEDs using for example shiftout, you'll need custom driver chips like the TPIC6B595N (that I've used before). This chip can only SINK power, so you should use it with Common Anode LEDs. In other words, a little research may be required.

Most of the tutorials you'll find out there are for Common Cathode RGB LEDs, but I eventually found one showing the Common Anode setup as well.

The economics of electronics

19 Feb

The economics of electronics

I loved doing my first LED cube prototype and I want to take it to the next step - towards a feature complete version. For this I will need a chip to hold the software and control two RGB LED's as well as the sensor that I'll be using for user input. I've looked at specialized PWM chips that can control the different channels of RGB LEDs but in the end it's both cheaper and easier to just use the chip that the Arduino platform is based on - the Atmel 328's.

If you buy more of these, the price improves a lot. If you order enough, you'll actually get it near half the price of just a single one and this seems to be a rule of thumb for electronics in general. This is the difference between mass production and one-offs. If you sell enough of anything, you can make a lot more money.

MintDuino on the cheap

So what do you need to make your own Arduino then? Some time ago I picked up a MintDuino from MakerShed. It's a fully working Arduino - delivered in an Altoids tin (pictured above). This version comes with a breadboard, but how much would it cost just to get just the electronic components used? The content of the MintDuino box is almost the same as this list on the Arduino site that tells what you need to build your own minimal version.

So - what would it cost to build this using todays prices from Mouser.com? Here's the list for 1, 10,100,1000 and 10k units:

  1 10 100 1000 10000
22pF capacitor 0.249 0.249 0.195 0.143 0.104
22pF capacitor 0.249 0.249 0.195 0.143 0.104
ATMEGA328-PU 3.05 2.95 2.52 2.30 2.15
16Mhz crystal 0.529 0.455 0.27 0.227 0.208
7805 regulator 0.652 0.563 0.49 0.276 0.220
10 uF capacitor 0.109 0.073 0.06 0.055 0.046
10 uF capacitor 0.109 0.073 0.06 0.055 0.046
220 Ohm resistor 0.02 0.02 0.02 0.01 0.01
220 Ohm resistor 0.02 0.02 0.02 0.01 0.01
10K Ohm resistor 0.02 0.02 0.02 0.01 0.01
5mm LED (red) 0.086 0.079 0.063 0.052 0.044
5mm LED(green) 0.086 0.079 0.063 0.052 0.044
Tactile switch 0.162 0.14 0.097 0.078 0.071
 
Total price in $ 5.34 4.97 4.07 3.41 3.07

* I've since learned that apart from the lower price the ATMEGA328P-PU uses less power, thus the extra P in it's name. These are about $2.5 extra a piece, but probably worth it given the lower power consumption.

So - if you manage to sell 10k units, these will cost 57% of buying a single one. I dunno the price of the breadboard and the printed Altoids-tin, but it would seem that Makershed has a decent profit from this. It's still worth the money to their customers since they don't have to source the components and it's a great little project - in a tin. Keep in mind that the list above is just the MCU and the power regulator bits. You'll certainly need a few more bits to actually make something, but it's still facinating that you could build an almost complete microcontroller for just $3.

I don't know for sure, but I think it's sort of a rule of thumb that with the added packaging and parts, most kitmakers should have at least a 100% profit on what they sell. In other words - if it seems to the end user that the parts are about the same price as they would have to pay themselves to make the same, they may just as well buy it from you. So to use the example above - $6 would appear to be cheap for $3 worth of components. You could probably make good money selling it for more such as the neat $13 Diavolino kit despite the fact that a fully soldered Arduino Duemilanove only costs $15.

UPDATE: by August 2013, the prices in the table above have improved a lot, so the ATMEGA above would now be almost a dollar less for volumes above 100.

LED cube electronics

In my case, I won't need the 5mm LED's and the tactile switch in the list above, but I'll need a few other parts. I'll need the tilt-switch to turn the cube on/off, two 10mm diffused RGB LEDs, coin cell battery holders and an input solution. I'm not sure if the vibration switch from Sparkfun will do the job, but I'm quite sure that I can solve it with some sort of touch-chip. These are fairly cheap, but they'll require more testing. Should be fun!

So with all the parts I'll need (apart from the PCB) the electronics for each cube would cost $11 if I make just one, $9.35 if I make ten or if the unlikely happens and I have to make 10k of these - the electronics will only cost $5.55 per cube. I doubt that'll ever happen, but it's still fascinating to do the maths. Plus - if it did - I'd probably outsource the whole thing. I just can't see myself solder even a hundred of these by hand...

They do look pretty though, don't they? wink

Making a Blinky cube

17 Feb

Making a Blinky cube

Inspired by various LED cube projects, I wanted to see how long it would take to prototype a small interactive toy. The basic idea is to make a plastic cube that displays beautifully diffused light and uses a simple way to turn on and off. Tapping the cube with a finger could be a good way to do this and it also makes it possible to start different "color cycle programs".

Making the cube

My friend Jim at VariousArchitects (VA) has this really nice Makerbot standing around in our office. It would be a shame not to play with it a little? Maybe I could even find a complete cube on Thingiverse?

Turns out that nobody had done something similar, so I had to make the model myself. Through the years I've played with different 3D programs and lately I've used Modo a lot. After fiddling a while in both Modo and Sketchup, Kyrre @ VA suggested that I try Rhino. My friends @ pivot.no have always been big Rhino proponents and after some initial fiddling, I really started to like the software! Poor Kyrre had me pestering him with noob questions all eve, but the result turned out quite nicely?

Breadboarding the prototype circuit

Next I needed to make a small test circuit to see that I could fit the electronics. The final version will use some sort of ATMEL chip, but since the hardware is still on it's way (switch from Sparkfun and RGB LED's from Evil Mad Science) I had to just throw something simple together that would show me how the LEDs worked with the materials.

Using my newly aquired knowledge about the 555 timer, I set up a small breadboard circuit that toggles two LEDs. I added a couple of 10k pot's so I could change the blink speed. Looks like this would work fine?

Making it smaller

I can't fit a breadboard in the cube, so I made a copy of the circuit on a little piece of perf-board that I thought would fit inside the cube. It took a couple hours to fit it all, but I only had one incorrect solder (the 555 was the wrong way, duhh) so it wasn't all that bad. It also turned out quite small.

The blue dials are the pot's that'll adjust the blink-rate and the black tube on the top is a tiny switch that'll turn the circuit on/off based on the physical orientation.

Putting the pieces together!

Kyrre had printed the bottom of the box that evening so when I came to the office the next day - all that was missing was the lid and some batteries for the circuit. While the lid printed, I mounted two 3V coin cell batteries together (the 555 needs at least 4.5 volts to run) using some Gaffa-tape and wait for the lid to finish printing. The lid required that the Makerbot made some "supports" - extra plastic that you remove when the print is finished. I'm amazed by how easily these supports came off and the pieces looked really good! Now it was time to fit it all together.

The result

Below you can see a video of the completed bits. The LEDs are not very visible inside the box while it's daylight but they look lovely when it's dark. The video is a little blurry since I just used my iPhone, but it shows the result quite well. Very happy with it given that it's only taken about 1.5 days to get this far! Makes me feel comfortable taking the project to it's next step - using RGB LEDs that can run different programs and turn on/off with just a tap.

Thanks a bunch to Kyrre for helping me with Rhino and the printing and to Jim for letting me play with his toy! I've also uploaded the 3D model to Thingiverse in case anyone needs something similar. I've also posted some more pictures of this on Flickr for anyone curious to see more.

 

Racing along with Make:Electronics

15 Feb

Racing along with Make:Electronics

Finally had a long day without other interuptions than snowboarding and dinner. Not shabby! Made the quiz-engine in Experiment 21 and even modified the layout so it was more user friendly. A tad annoyed that there's no breadboard-friendly SPDT-switch (single toggle between two states) in Make:Electronics Kit 2. I had some lying around, but it'd be nice if the kit was really complete and everything working. The two dead 5V relays yesterday were also annoying.

Experiment 22 was just a quick primer, but experiment 23 was a good reminder about how super-easy it is to use microcontrollers rather than IC's to solve a problem. While it's possible to represent a dice with 7 LED's using clever wiring, a counter chip and a NOR chip, it would take much more effort to take this to a complete LED dice kit. It's much, much easier to solve such tasks with a small computer like this one from SpikenzieLabs. It's still useful to see how this would be solved before, so I'll complete all the experiments as there's always something to learn from them.

Have also started to publish images of the finished and working experiments on my Flickr account as seeing pictures there saved me a couple times when I started out. A tiny effort that can help others a lot. Below is video's of todays projects.

Make:Electronics - Experiment 20

14 Feb

Make:Electronics - Experiment 20

Lot's of stuff to do other than play today, but I managed to finish experiment 19 - a "code lock" based on the 74xx series of chips. This part of the training is sort of a "repeat" in that I've read it so many times during school, however building circuits with it makes it a lot more fun. I couldn't complete the project entirely as the relays I got from Make didn't work at all (same for others) but the main part works like it should.

Really looking forward to tomorrow - I should manage at least two more experiments! :-D

Make:Electronics, experiment 18

13 Feb

Make:Electronics, experiment 18

Was able to spend about half the day on electronics today and did experiment 18 from Make:Electronics. Nice to learn about counter chips (4026) and 7-segment displays, but I really didn't want to do all the cabling for setting up 3 of these as I got the point. Hooking it up to a 555 timer went easy and I later added a pot and some resistors so I could adjust the speed just as I wanted. I also spent a lot of time just playing with components and measuring to see how things worked and how precise my meter was.

In the evening I got sucked up, browsing the Sparkfun and Seeedstudio sites for component bits I was missing and ended up ordering a bunch of stuff while I was at it. Anyone running an online electronics shop should learn from these. Having a "wishlist" feature made me order almost twice as much as planned...

Reading specs carefully before ordering...

Among the things I ordered were two RainbowDuino's from SeeedStudios. I already have two 8x8 RGB LED panels from them, but after a lot of browsing I realized that none of the chip vendors offer a good solution for driving these. I wonder why there's no I2C or SPI chips that do PWM for more than 24 channels? The best circuit I could find were the TLC5951 from TI and I would have to use eight (!) of these $5 SMD's just to drive one of the panels. Since they're SMD you would also have to make your own PCB, so it's much easier to just get the premade $25 solution from SeeedStudios.

Some time ago, I browsed the Sparkfun site and saw these awesome rubber buttons. I was SO bummed out when I got the shipment and realized that I had only ordered the rubber part - not the PCB, electronics, plastic covers or RGB LEDs. In a few days I'll have the complete 4 x 8 button pad here - at the total price of $136 and not the $19.90 that I initially thought. Now I'll just have to figure out what to use it for wink

Oh - and please do check out my brand new App - Arduino Companion!

Make:Electronics, experiment 15

07 Feb

Make:Electronics, experiment 15

Took a break from the app-project for a day with Make:Electronics. Experiment 15 builds on Experiment 11 where you make an alarm/siren using just transistors, resistors and capacitors. This part takes this a step further by adding reed-switches to detect a broken circuit (i.e. door opened) and then sound the alarm until the alarm is reset. Quite time consuming project, but loads of fun!

First you build the circuit on a breadboard, then you transfer it to a circuit board and finally you mount it in a box. Since I had taken apart the noisemaker circuit, I had to rebuild that first. I then added the new part - a relay that stays energized if the alarm is triggered. I then moved it all over to the circuit board, soldered up piece by piece, added power and - lo and behold - it worked on first try! Was a little proud there smile

Next up was mounting it in the case and that part certainly took longer than expected. I planned the layout in Illustrator, printed it out and stuck it to the box for drilling. I didn't have an awl, so I used a nail to punch indicator holes before drilling. This caused the case to almost crack, but I kind of saved it. Drilling holes and mounting components were quite easy, but on the next part I stumbled. Might be because it was too late at night (had such a blast that I forgot time!) but I couldn't make the circuit work as intended.

This morning I had another peek at it and I measured that the switch in the kit worked differently from the one in the book. Oh well. The cabling from the day before was a mess as well, so I wanted to clean it up. I added some header pins from my Arduino kits and some F/F breadboard cable for both the power socket and from the circuit board to the lid with all the switches & LEDs. Keeping things tidy like this made it so much easier to get things right. I guess hardware just like software - plan well and keep it tidy and you won't stumble.

The alarm is really retro. I remember my aunt having such alarms in her office 30 years ago. It's not really burglar-proof either as all you need to do is to cut the power, but I'm certain that the kids will have heaps of fun with it :-D

Make:Electronics, experiment 14

24 Jan

Make:Electronics, experiment 14

Changed my mind and spent most of of last week working on the app idea. Took a while to get the AIR performance to where I wanted it, but it’s really running fast now even on old devices. Didn’t do any Arduino stuff other than making a couple musical circuits/instruments based on light sensors with my son Walter. Simple, but fun stuff. I then took Monday off from app-making to finish up the first half of the Make:Electronics experiments. Have to say that this book is incredibly good for anyone that just want a solid introduction to electronics. Part of the process is to learn about the limits of components and it’s really fun and useful to fry some circuits.

Fiddled a lot on Experiment 11. I simply couldn’t get it to work. While Googling for an answer, I stumbled upon this picture for Flickr. Then I realized that picking a 570 Ohm resistor over a 570k Ohm will probably break the circuit. If you check out the reviews of the Make:Electronics book, you’ll find that they’re sort of divided into two - those that love hte book and those that feel that the instructions are inadequate. After realizing my own mistake, I now understand why a few of the reviews are incredibly negative. They probably made a similar error, but failed to find the culprit.

Experiment 14 is by far my favorite thus far. It’s shown in the video above. It’s not doing much - it’s just blinking / fading a LED. This would be incredibly simple to do with a Microcontroller like Arduino or a Picaxe, but I learned so much from playing with transistors (NPN and PUT) and capacitors while doing the preparing experiments that lead up to this. Soldering it all up on a protoboard and getting it to work on first try was also a kick!

Now it’s time to take a break from blogging though. Will spend the coming week at gotoAndSki Switzerland - the Coolest Geek Conference around!

GotoAndSki 2012!