Just a simple quick guide on transformerless supplies.

Use: For low voltage, low power projects 50mW-80mW max, low cost applications

Safety:

  • NOT ISOLATED FROM MAINS! This power supply is not isolated from mains, anything drawing current from the power supply has the potential to be live.
  • FIRE! everything electrical has the potential to start fires so always ensure that the project is constructed to withstand over current and transient voltages.

Theory:

The circuit is fairly simple, just let a zener diode do all the work in terms of voltage/current regulation. Although just placing a zener diode across the mains would let the smoke out of the component so the current has to be limited. The current limiting is achieved by placing in series a capacitor/inductor that will provide an impedance. A diode is also used to ensure that the ground of the power supply doesn’t go high every half cycle. Finally a resistor in series with the capacitor is placed to limit the in rush current when power is applied, a fuse to prevent over current, varistor for transient voltages and a 1M resistor across the capacitor to eliminate EMI effects.

Parts:

  • F1: Fuse around 500mA – 1A
  • R2: Varistor 275v 2500A MOV
  • B1: 1A Bridge Rectifier
  • R1: 47R – 200R 1Watt
  • CX1: 0.22uF Cap
  • D1: 5.6v Zener Diode 1A
  • C1: 470uF Electrolytic Cap

Variations: The version above will supply about 15mA but if you need less than 8mA the bridge rectifier can be replaced by a single diode between the -ve pole of C1 and the bottom of Z1

I take no responsibility for the use of this circuit. The reader should be aware that when working with mains voltages every precaution should be taken as the voltages you can come in contact with are deadly.


I needed a method to mount my camera on my bicycle so I could record video whilst I rode. The obvious place to mount the camera is on the handlebars. Here is a quick guide on a simple camera mount for bicycles that works quite effectively and secures your camera.

Parts:

  • Camera
  • Scrap piece of wood, mdf or plywood about 6mm thick is good
  • Zip ties
  • Old tripod or a bolt that fits the tripod mount on the bottom of most cameras
  • Spray paint for colour

Step 1:

Cut the wood to fit nicely over the top of the goose neck and just a bit wider. I cut mine around 100mm x 150mm, although I would in hindsight make my shorter.

Step 2:

Nail another piece of scrap to the bottom of the rectangle of wood so that when the platform is on top of the gooseneck it sits level. I used 12mm plywood scrap to level it off, you might need to sit your camera to see how it looks out the lense.

Step 3:

Having pull apart an old tripod for the screw that attaches the camera to the stand or having found an alternative, drill two holes at the end of the platform. The first being large enough to fit the whole threaded bolt through and the second just above to allow just the non threaded part through. This will allow you to stick the bolt through the hole and then slide it across so it won’t come out when not screwed into the camera.

Step 4:

Drill 6 more holes so the platform can be zip tied to the goose neck as shown in the pictures.

Step 5:

It is also useful to have a piece of rubber where the camera will sit on the platform as this will help you tighten the camera to the platform.

Finished! After testing it is strong enough to take bit hits, big enough to shake the flash open and still leave the camera attached to the bike just be careful not to over tighten the screw into the camera as you will thread it :( .


Lab Notes

04Sep08

The importance of notes is integral to the success of a project. Find below a good set of note guidelines from an incredibly influential think tank.

Lab Records

Good science and good record keeping go hand in hand. We expect members of the B Labs research community to carefully document all experiments, computer simulations, calculations and any other research activities: good records are a springboard for future research and publication, and minimize potential problems if questions arise about experimental results. Lab notes are critical in the documentation needed for products, and in support of patent claims.

It is essential that you keep lab notes. All entries should be thorough enough for someone else to read and understand exactly what you did and why you did it. Details about experimental set up and protocols should be included.

You can keep your lab notes either manually in a lab notebook or in electronic form. However, make sure that you carefully follow the general and medium specific guidelines listed below.

General guidelines:

  1. Make sure that all entries are properly dated.

  2. For each physical sciences experiment, enter the following information:

    1. Purpose — The reason for why you did the experiment. List co-investigators and their roles.

    2. Equipment — A list of the specific equipment involved.

    3. Protocol — A detailed description of the experiment’s design and how you performed the experiment. List starting values. For example, include the temperature, the equipment settings, who supplied the samples, etc. If an outside supplier has supplied material, list it in as much detail as possible the first time you reference it. If you use a procedure from the literature (i.e., a reference from a paper), list it.

    4. Observations — Preserve the raw data you get as the experiment proceeds. Label it. If a computer is taking the record, make a printout and attach it to your notebook.

    5. Results and analysis — Enter any plots and or calculations you do. If you use an equation to calculate some value, write down the equation. Finally, enter your analysis.

  3. For each computer simulation or calculation, list the purpose and computers used to run the experiment. Annotate any computer code you write and describe the function of every subroutine and procedure, so that it is easy for other people to see what you are doing. If you use publicly available code in any section, list that as well. Keep all raw data generated by the simulation, labeled with the date and time the simulation was run. Backup all data and analysis files.

  4. If you are a theorist, keep detailed records in your lab notebook of all ideas, calculations and plots.

  5. If you make an invention, describe it in writing, and have someone else witness it, understand it and sign it, with that day’s date. This will help resolve patent disputes, should they ever arise. This needs to be done on paper even if you choose to keep electronic lab notes!

Manual notes guidelines:

  1. Obtain a Laboratory Notebook from ****

  2. All entries should be legible.

  3. Use a notebook with numbered pages.

  4. Title each notebook and number it for easy reference. List the days, months or years it covers prominently.

  5. On the inside cover, include your name and contact details.

  6. In the first few pages, include a running table of contents with page numbers so that you can look up a particular experiment/ research topic easily. Whenever you start a new experiment or move to a new topic, update the page of contents.

  7. Errors should be crossed out with a single line and not blacked out. They should remain readable and a part of the record. Include a comment on what went wrong, and if you repeated the experiment. This will allow you to go back later and remember what you did.

  8. If possible, include print-outs (graphs, etc.) by taping them to the notebook. If this is too cumbersome, create a separate folder where you keep the extra material. In the notebook, reference the extra material; on the graph or print-out, include your name, the date of the experiment, and the page number of the notebook in which the record appears.

Electronic notes guidelines:

  1. Keep you notes in common file formats such as plain text, pdf, html, xml, and doc. Make sure that the formats you use can be read by future generations of the software. For long term record keeping, use the simplest possible formats.

  2. Make sure that all data is regularly backed up. Do not keep your notes solely on a laptop. Check with your computer support people that there is a disaster recovery plan.

  3. Use a reasonably organized file and folder structure that makes it easy to find data by topic or date. Make cross references or include hyperlinks.

  4. Include your name in all files.

  5. Never erase earlier notes. Only add new notes. Keep in mind that you are building an archive.

  • Ideally, use a version control system such as cvs to automatically date and archive your notes.

  • Couple of weeks ago I wanted to add a display to one of my pic projects so I headed down to jaycar and purchased a simple LCD module. 3 screens later I’ll share the do’s and do nots on these screens and hopefully form a good howto on these babies.

    Models covered: QP5515, QP5517, QP5518, QP5519, QP5520. Stay away from the mini version unless you have a ribbon cable clap, jaycar don’t.

    Step 1: Connections

    This is a vital step :) . Messed up logic connections aren’t going to damage this unit but power connections are important!!! Look at the datasheet because connections do differ between different models, but usually pin1 = 5v and pin2 = 0v, GET THIS ONE RIGHT!

    LCD Connections

    1. 5v                   -> Pin1 ;Power
    2. GND                -> Pin2 ;Gnd
    3. GND ->10Kpot -> Pin3 ;Contrast Adjust
    4. RS                   -> Pin4 ;Register Select – Instruction/Data
    5. GND                -> Pin5 ;Write/Read
    6. E                     -> Pin6 ;Write Enable
    7. GND                -> Pin10-7 ;4LSB data
    8. Data7-4          -> Pin14-11 ;4HSB data

    Definitions

    1. Power. On these modules this powers the controller, backlight(if app) and LCD screen so don’t worry about that A & K crap in some of the data sheets its already been done for you.
    2. Ground. 0volt
    3. Contrast Adjust. This must be hooked up if anything is to be displayed on the screen as it completes the LCD circuit. A 10kpot gives good adjustment and can be replaced by a single resistor at a later stage. The LCD isn’t too fussy, I’m just using a 100k pot I had laying around . When you turn on the screen you should see some square boxes along the top row if you have the contrast set correctly.
    4. RS. This pin tells the LCD whether we are writing an instruction(clear screen etc..) or a character(A B C 123 etc..)
    5. R/W. Tells the LCD controller whether we are reading or writing to LCD memory. We will only ever be writing to memory so we can set this to gnd.
    6. Enable. Setting this to high informs the LCD controller that our data is ready to be read
    7. Data0-3. Used in 8bit communication mode. Will be set to gnd in our configuration for consistency.
    8. Data4-7. Data lines.

    Note: Making all these connections on a breadboard or the like can be time consuming and the LCD is sensitive to heat and static. So I suggest buying a 2 x 16pin header from jaycar also (they didn’t have 14pin ones when I was there) and some ribbon cable and connector. Solder one to the screen and one to some prototyping board with some dip legs so you can have the screen off the bread board and lots of room to make connections. The headers legs just aren’t wide enough to make it across the center of my breadboard thats why I made a little prototype attachment

    .

    Blown: If your power line is shorted to ground I’m sorry but that screen is now rubbish, there may be a way to repair it but for the meantime its broken, time to get a new one.

    Step 2: Software

    The LCD controller is based upon a Hitachi 44780 LCD controller (Datasheet http://www.datasheetcatalog.org/datasheets/400/81271_DS.pdf) and there are heaps of example code out there on how to get the thing running. Perhaps later I will post mine but for the mean time I will just leave some hints and notes how how to best get it working.

    First you need to run the initialisation sequence. Follow the steps in the datasheet with gaps of around 100ms inbetween the first 3 instructions and 10ms in between the following pairs of instructions. Choclabs have some good example code here for PIC but its all assembler in the end http://www.choclab.eu/mtorrens/Files/LPM01-4bit.asm

    If your having trouble I found it to be my Enable signal. The best sequence is as follows, set your data out and RS then call a function that puts E high, few nops, then low, so it pulses the enable line. We want the enable pulse to last about 1uS(thats heaps) whilst the data is stable.

    E        _________________—————-________________________

    Data  ______________—————————-______________

    RS    ______________—————————-______________

    where high in both Data & RS is to demonstrate that the line is stable and containing values, they may be of another value.

    Once the initialisation has finished the data is going to be sent in pairs(4bits then 4bits), there doesn’t need to be a delay between 4bit pieces longer than 1uS, but once both instructions have been sent a delay of 1mS is needed before the next instruction.

    The LCD controller does produce a busy flag whilst it is processing an instruction which is raised at the end of a data pair. You can use this to determine when to write to the screen but it will require an extra connection to RW to enable reading from the screen and the time savings will be minimal/of no real use when your first starting. I suggest just waiting 1mS after a data pair is sent until you are familiar with the unit.

    Step 3: Troubleshoot

    Its unlikely you will get this baby working first time so don’t be disheartened. It took me a few nights to get mine going. Just check the cables, make sure the screen is getting the signals. Keep the supply voltage around 4.7-5v and use example code on the web but make sure your pin assignment is the same as theirs and adjust as necessary.


    Scope Case

    31Aug08

    My Scope is stored under the house in my workshop which is lacking shelve space and bench space and its used for wood work, electronics and bicycle repair. Its not a good environment for measurement equipment and there was a good chance the scope would be damaged, so instead of paying for a scope case I decided to build my own.

    Using some scrap plywood sheet I had left over from something else, I ruled up the dimensions for a simple box that would fit the scope entirely in the bottom of the case with the handle just reaching the top. I made the lid 10cm deep so I could put a little compartment in there to hold probes and scope accessories.

    I put the box together then went to clark rubber and purchased some acoustics foam(looks like lots of pyramids), liquid nailed the inside of the box and stuck it in. I used some tacs on the edges to tac down the foam so it wouldn’t come loose and it makes it look kinda professional.

    Next I purchase 2 large hinges and 2 small hinges, 2 for the case lid and 2 for the compartment lid. Attached those then attached some case latches to the front.

    Spray painted a tag on the front and then gave it a coat of enamel.

    This makes a great little case that can be kicked around on the floor of the work shop and it will keep the scope nice and safe. The foam can be expensive so try and find a friend would is in shipping they have similar stuff and will give it to you for free :D although the acoustics foam is very thick and will protect your scope well.

    Tips: Measure, measure measure. The foam is thick and wont give too much, you will want the scope floating on the inside being supported by the foam, not making to my contact with the plywood  or the shocks will still be transferred to the scope from the case.  On the same note you don’t want the scope bouncing around inside either. So take your time and measure it up!


    Having worked with a few different oscilloscopes but never actually owning one I thought the decision on which model/make was right for me would be a relatively easy one.

    When I first started looking I was working with a few tektronix models, mainly one from the 3000 series and a very handy and simple monochrome oscilloscope from the 1000 series a few years back.

    Well after discovering the prices of tektronix I decided to go with a more reasonably priced brand(GW) as this was my first venture into the oscilloscope market and in all likely hood I wasn’t going to be doing anything crazy in the workshop at home.

    I picked up my GDS-1062 for around $900 including GST and delivery from Emona Instruments. They were nice enough and have been around for twice my lifetime so if something goes wrong support wouldn’t be an issue.

    The GDS-1062 is part of the base model line from Goodwill Instek and definitely won’t disappoint. From the moment you pull it out of the box you will find that the oscilloscope is ready to go.

    Dimensions: Major selling point for myself was the form factor of this scope. It is 310(W) x 142(H) x 140(D)mm which gives it the same face as many oscilloscopes but it is very shallow, making it perfect to move around. I have been using it in different parts of my home and its is very handy having something small enough to fit on a desk next to a pc screen keyboard and mouse without too much trouble. Of course this comes at a price, you can find much higher resolution on deeper models for the same price.

    Resolution: The biggest factor when buying an oscilloscope is how accurate will I need my scope to be? Well I have found that the GDS-1062 is accurate enough to easily work with audio and single triggers on the nS scale. It also seems to handle abnormalities in signals responsively and without hours of adjustment. Also a common feature to all the base models is 4k memory length per channel and I feel as though more memory is needed before a higher sampling frequency can be utilised making the 100Mhz model a little redundant.

    Math Features: Thoughts about maths functions didn’t occur to me when making the purchase of this scope, but since I have used some of the powerful tools this scope possesses it will definitely be on my list to inspect next time. It has the basic add, subtract, multiply etc.. but the FFT is by far the most useful. It is easy to setup and quickly gives you an idea of what frequencies are currently passing into your scope, helping identify noise components or design flaws. The scope also features a measure button which when pressed displays on the side key information about the current signal, this is great works perfectly and saves alot of time when repetitively making the same basic measurements.

    Display:When I first came across the GDS-1062 I felt that the colour display was overkill for my requirements, and that I was paying for something that I didn’t really need and this directed me towards monochrome screens. After working with the scope for a while I have found that the colour screens do make a huge difference and an instrument is only as useful as how much you actually use it. So for the same reason I would go for a small form factor I would look for a colour screen, it makes using the scope easier and more enjoyable. The display isn’t a cheap colour display either, with good colour and clarity, which rarely shows any blocky elements in the signal.

    The Rest: The scope also has an SD slot so you can put in a memory card and record waveforms, this is extremely useful and saves alot of time in trying to reproduce a wave that you had yesterday. The scope also comes with two reasonable probes (1x and 10x) which can be colour coded(little rings around the probes) to match the signals on the colour display, which is confusing if your lazy and plug them into the wrong channel and useful if your not. The probes meet the accuracy requirements of the scope and actually feel quite durable, I don’t feel the need to replace them.

    Conclusion: For a first time buyer who is going to have a use for a scope regularly I think one can easily justify the cost of this scope. It provides a good base for most electronic work and won’t disappoint. One feature I have found that I would enjoy is an in built logic analyser. Some scopes now come with this feature and it would be great to have when working with logic instead of using the single trigger function.

    Screen Captures