Category: electronics

  • My first E-bike

    Last time the government gave me a significant amount of unexpected money I bought a sporterized mac 90 (a semiautomatic ak-47). This time I decided to join a different revolution. With a projected cap of $1200 I asked a friend to help me pick parts for converting a Yamaha 850 tripple to electric.

    He remembered a conversion that he had helped with and now I have a complete but currently non running conversion of a 2003 Suzuki Bergman 650

  • Transit Tracker Rebuild: Making Due With What You Have.

    Most of this week has been devoted to finishing the house network setting up a workspace in the garage and using it. One of the things I have been trying to get off of my plate was to rebuild the transit tracker that we use to tell us when the next max is going downtown. In order to network from the house to the garage I have to navigate a super creepy crawl space and not get spider bitten or set up a wireless bridge. One of the OpwnWrt devices we bought to evaluate seemed perfect. The TP-Link TP-WR740.

     

    Getting the OpenWrt operating system on the router is pretty much a matter of uploading the new firmare ( http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/generic/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-factory.bin) using the routers web based interface. Accessing the serial port required some surgery.

     

    Once the serial was connected to the 4 pin connector I tested it with my ftdi.3.3v serial cable. Then I tried to see if the 3.3v tx signal was strong enough to be read by a sparkfun 5v serial lcd board I had on the bench. It wasn’t. If i had the parts for the 3.3v-5v boards i had fabbed last month (in particular the 74ahc125) then I would be done. So I looked around for what I could find. One of the documents I found on this was an app note from microchip called “3V Tips and Tricks” (http://ww1.microchip.com/downloads/en/DeviceDoc/chapter%208.pdf). As I was looking through it I went out to the garage and tried to see what I had that I could use. In a box labeled “chips and dips” I found a bunch of lm393 comparators that I had been packing around for over 10 years.

    So I soldered an lm7805 to the dc coming in and the ground-plain started breadboarding.

    I got no love from the resistor values provided by microchip so I put a pot in place opened a minicom connection to the serial on the router, held my hand on the g key, and rotated the pot until I got ggg’s on the lcd. Then I continued until I stopped getting characters. Then I centered the pot in between those places pulled it out and measured it with a multimeter. Which gave me the circuit below which I wired up bug style and embedded in hot glue.

     

    There was still a little work to do. The OpenWrt luci system takes up a lot of space but makes trying things very easy. The command line tools aren’t bad but luci comes with most of the stock images which is ok. The thing that forced me to build a custom image was that the fact that the serial port starts up at 115200 baud rate and my lcd module didn’t support that. To make matters worse sending the boot messeges at 115200 created serial sequences that would corrupt the lcd module.

    To get the baud rate to 9600 required me to:

    • Upload the OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2 to one of my linux machines.
    • Find and replace parts of the Makefile where the console baud rate was hard coded. (target/linux/ar71xx/image/Makefile)
    • “make image” with the correct target and any packages I wanted installed.

    I also commented out the install luci part in the .config file at the top of the tree and added the trimet.lua script to a /scripts directory and which was magically added to my custom image (though not were I expected it to be).

    make image PROFILE=TLWR740 PACKAGES="nano coreutils-stty coreutils-nohup monit lua luasocket" FILES="myscripts"

    This created several images including one called bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin
    to install it i scp’d it to the /tmp/ partition of the router sshd into it and as root ran the command.

    root@fatlink:~# sysupgrade -v openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin

    where as the router flashed the image and rebooted.
    A little tweeking on the startup scripts and we were done.

    IMG_1545

    The transit tracker code from my previous post runs while the router is still doing its job as a hub and a wireless router.

    Not bad for 20 bucks and what we had on hand.

    References:

     

     

  • Our Favorite Solderin Iron


    The Weller 25 Watt Marksman Soldering Iron (model # SP23L)

    Local Sources:

  • Resources for the Newly Inducted

    Now that you’ve taken the plunge into microcontrollers, here are some good resources to help you with your first project.

    Books
    • Getting Started in Electronics by Forrest Mims
      A good resource if you have zero experience with electronics.
    • Physical Computing: Sensing and Controlling the Physical World with Computers by Dan O’Sullivan and Tom Igoe
      Covers all the common use cases for kinetic sculpture and other art applications. The example code is being updated for Arduino-compatible microcontroller boards by Don as Errata for Physical Computing.
    • Practical Electronics for Inventors by Paul Scherz
      If you have some basic understanding of electronic principles, this is the book for you.

    I would also recommend Forrest Mims’ Engineers Mini Notebooks, as they have lots of common circuits that you can use for a variety of projects.

    Sites

    If you have other sites or books or other resources that have been helpful, post them to the comments and (eventually) I’ll add them to this list.

  • Slicing up Maple Bacon

    I had been itching to do more Eagle projects since I took Laen’s class, so Don tasked me with a variation of the Maple Mini to use with a Gainspan module. It is rather large, but the surface mount parts are large enough to do at home on a hotplate. In fact, the board is designed just for at-home assembly. The project is called Maple Bacon, since the finished product should be as thick as a slice of Sweet Briar Farms maple bacon.

    This was my second attempt at a large-scale Eagle project, so any comments or critiques would be appreciated. You can watch or fork my repo at github.com/soycamo/maplebacon.

    Happy holidays!

  • The other open source (ITS THE Meta-DATA STUPID)

    I wish I had seen Ladyada’s blog about getting off the fence about kicad before she closed comments to it. I just ran up kicad on my mac and its still not ready for prime time. The worst part of it is that the designs that are in kicad are stuck in kicad.

    It scared me, because I thought that if adafruit adapted kicad as apposed to eagle as it has been, it would mean is that adafruits designs would no longer be open to people who are not using kicad. For those of us who use the automation, meta data, and well developed shared libraries of eagle this is a great loss.

    Especially when the very tools which are missing from kicad make it easy to convert eagle designs to kicad or any other platform. A gerber is not the same as having the parts list, schematic and the plethora of other meta data that sharing a design really entails. It is the source code of a design.

    If I give you an eagle schematic file you are free to improve upon my design or export it to the cad software of your choice. If I gave you a set of gerbers you are stuck with my design but are perfectly capable of shipping them off to the cheapest asian fab you can find.

    Since kicad locks this data away and does not allow you to export the design and its meta data I am going to argue that it is not really open source. Unless I can recreate a different design or change the usb processor or the package of the parts outside of kicad or at least all 3 major platforms (ie on a Macintosh) in my opinion kicad projects are not open source at all.

    I know the joy of open source is that its my fault for not donating countless man-months of time debugging and adding features like eagles ULP and usability on OSX. But I don’t care because in EDA the design is the source. Cadsoft paid and continues to pay its software engineers to create a professional cad system which allows the open sharing of design and metadata and then offeres it to us for free.

    While the kicad community has been very quick to capitalize on eagles exposure of the communities shared source and libraries, very little has been done to make sure that we are not stuck with a single design platform that is not nearly as well developed.

    Even worse, as people who we look to consistently for reference designs like ladyada turn to kicad, those of us who want to use and share designs can look forward to manually rebuilding them.

    I thinks its a damn shame.

     

     

     

  • Focused workshop: Artbots 30 May 10 — PNCA ($35)


    In this workshop we will be taking our dorkboards and using them to create a simple machine that draws. The focus will be on hands on problem solving.

    What you will get.

    • A servo and a geared motor with paper feed.
    • A motor driver board.
    • Misc parts.

    What to bring:

    • A dorkboard, teensy or other arduino capable board.
    • A soldering iron.
    • Some basic tools (esp wire cutters, x-acto knife)
    • superglue
    • A hot glue gun.
    • foamcore or cardboard.
    • $35 or a copy of your rsvp / paypal reciept.

    Where:

    PNCA — 1432 NW Johnson St, Room 205

    When:
    Sunday May 30nd from 1 to 5pm

    How do I rsvp?

  • Making Pigs Fly — Object Space, Spokane 07-11 June 2010 ($105)

    An introduction to physical computing for artists and musicians.

    What:

    This workshop is an opportunity for 15 to 25 people to spend a week working on the fundamentals of integrating micro-controllers into the arts. At the end of the week participants should be able to build and program their own Arduino compatible micro-controller system and use it to interact with the physical world using motors servos lights relays and switches.

    The workshop will be structured with a hands on approach. The theory being that we learn best by doing. The first two days will be devoted to building and programming the base platform and using it to control various devices. The remaining 3 days will be a lab devoted to incorporating the new tools into actual pieces. The cost of the course is $105 and includes the materials listed below as well as 5 days of hands on instruction.

    What you will get.

    • A Benito usb to serial programmer
    • A Dorkboard! (an Arduino clone) Kit
    • An introduction to the Arduino and microcontrollers in an artists setting
    • A servo and a geared motor with paper feed.
    • A motor driver board.
    • Misc parts.
    • Help when you need it
    • To know that what you built worked at least once
    • Ideas

    What to bring:

    • A laptop (there will be some (not many) loaner systems available)
    • A soldering iron (20-30W Pencil type)
    • A standard usb cable (A->B)
    • Some basic tools (esp wire cutters, x-acto knife)
    • superglue
    • A hot glue gun.
    • foamcore or cardboard.
    • A copy of your rsvp / paypal reciept.
    • Ideas.

    When:

    June 7th through June 11th from 1-5pm.

    Where:

    Object Space Gallery:

    1818 1/2 E Sprague, Spokane WA

    How do I rsvp?

  • My Sample Design for Fabrication Workshop.

    At the eagle for fabrication workshop on sunday I started with a design that Thomas Lockney threatened to build about 2 years ago called the Low Fi Arduino Guitar Pedal.

    (http://www.instructables.com/id/Lo_fi_Arduino_Guitar_Pedal/)

    It was simple enough to get through the necessary parts of eagle that I was teaching and while it wasn’t perfect It beat the hell out of Craig Anderton’s circuits in terms of clarity and probability of actually working. To discuss from an over view perspective creating parts I decided to add the 1/4″ jacks from another great dorkbotpdx project from Hans Lindauer.

    Once I got the library part together for the 1/4″ jack I had to rearrange things quite a bit but there was still pleanty of room. The next step was to add a power connector and a regulator. The idea is to be able to mount the resulting board in one of the cheapo danelectro pedels that I have around like this

    In order to get the board to work out I had to create a new package for the potentiometers but I managed to get it all to fit on the board without resorting to surface mount components.

    I will post the library example latere this evening.

  • 3 ways to 3 volts

    I have a few devices that I need to interface to either the benito or another avr board that run at 3.3v. one is an ethernet interface, one is a bluetooth modem and then there are the x-bees.

    One Way: Simple Voltage Divider.

    When looking for interface examples for the xbee I found a site that started out with a circuit from maxstream and then once everything was working tried a resistor based voltage divider. This is how I got my first set of x-bees running via the ftdi chips.

    One thing that this circuit didn’t do for me was to provide a decent pull-down for the reset. The 2 transistors on the right of this circuit are an attempt to do just that.

    Another Way: Run everything at 3.3v

    If you look at the datasheet for the atmega168 you will find the following diagram.

    Looking at this you can see that 16mhz may or may not be in the operating range at 3.3v. But if you drop the crystal down to 8mhz you are good for sure. You may have to change a few things but it is doable.

    The Ever Illusive Third: Buffers.

    The idea of adding another layer at each interface between boards can have you asking for some Tzatziki and falafel to go with the PITA. There are buffers which are designed specifically for this. Many of the odd, many of them expensive. But there are also many families of buffer which are “tolerant” of a range of voltages outside of their supply. One of the buffers I checked out was the 74abt126 which is a tri state buffer. (I was looking at that because with the tristate buffers you can actually do a two way buffer by selecting the direction). I am not entirely certain that the 5v receive side is kosher with these.

    The other buffers I am looking at with 5v tolerant i/o are the 74lvc125 and 74lvc126. These are 3.6v native parts with 5v “tolerant” io.

    Since I ordered the wrong series of parts last group order I will have to wait a week to check this out.

    See Also.