Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

help for a project

  • 29-06-2004 10:20pm
    #1
    Registered Users, Registered Users 2 Posts: 179 ✭✭


    Hello all

    I'm trying to build something. I want to put 8-10 leds onto it and have these flash on randomly. I want to able to adjust the spead it moves between them at, and intervals of no flash. It was suggested I'd need a PLC (programmable logic controller), which costs a bit. Are there any suggestions, can a cheap and simple circuit be put together for this. Any help greatly appreciated

    Patjunfa


Comments

  • Closed Accounts Posts: 1,376 ✭✭✭joc_06


    simplest is a 555 timer and an rc netwrok for time delay.

    after that a microcontroller and write urself some code.

    very simple stuff


  • Closed Accounts Posts: 914 ✭✭✭Specky


    If you want them all to twinkle in a random-ish looking patter you could grab yourself a counter/timer chip (something with a built in oscillator) and connect that on to a driver, then connect the LEDs onto the various outputs. By intermingling LEDs from different stages of the counter in a random-ish pattern you'll get something that looks kinda random-ish. Stick a trimmer on one of the resistors of the counter's oscillator and you've got yourself the twinkle rate control.

    Alterntively (and more fun) get yourself a demo board for some little microcontroller or other that incorporates LED outputs (most of them do) and write a bit of twinkle code.

    Method (1) involves spending a little money then doing a bit of work before you see any results.

    Method (2) involves spending a little bit more money but you can start on your project immediately. You also may learn something about microcontrollers and embedded software development that would probably provide more career-advancification potential than stringing together a couple of chips (says one who spent much of his youth stringing together chips....there weren't any microcontrollers back then.....)


  • Closed Accounts Posts: 1,669 ✭✭✭DMT


    /me gets flashbacks of multiplexers and D-Type flip-flops tbh...


  • Closed Accounts Posts: 914 ✭✭✭Specky


    I know....mention flip flops to kids these days and the next thing you know someone brings up thongs, then the conversation goes right down hill....


  • Closed Accounts Posts: 1,376 ✭✭✭joc_06


    Originally posted by Specky
    there weren't any microcontrollers back then.....)

    u must be old - the 8051 has been aroung for 30 years now.


    u can get a basic PIC development board from either www.farnell.com\ie or www.radionics.ie for about 50 quid. Download mplab - free ide and some app notes off the microchip.com site and you'll be away in a hack....


    The possibilities for hobby projects are endless and u may even get a job out of it eventually.


  • Advertisement
  • Closed Accounts Posts: 914 ✭✭✭Specky


    u must be old - the 8051 has been aroung for 30 years now.


    Yes I am unspeakably old...so will not speak of it.

    30 years old? mmm well, technically maybe but really microcontrollers didn't start to find applications until around the time of the Z8. They didn't really begin to find wide commercial useage until around the time of the Hitachi 6303, and they didn't really land in the mainstream until the first PICs came along. There's a big difference between something being around and something finding serious commercial application.

    The move towards free development tools and in-circuit programmability has really made life easier for everyone in the last few years. Prior to that the cost of in-circuit emulators to do any serious development placed most micros outside of the budget of the average hobbyist and made businesses very conservative in their choice of controller for new projects. That's really changed in the past few years and you have to acknowledge the part Microchip have played with their ludicrously vast PIC product range. Whether you like the PIC or not is another topic....but that's not to say that I don't use PICs in a number of our products....

    There are lots of 8051 variants still out there (it's actually seen a bit of a resurgeance in the past few years) but they're mostly a bit pricey in my view and the development tools for these often aren't free.

    It's nice to think there may actually be people out there who still do hobby projects...are there??? I started building things when I was 8 years old.


  • Closed Accounts Posts: 1,376 ✭✭✭joc_06


    Originally posted by Specky
    Yes I am unspeakably old...so will not speak of it.

    but that's not to say that I don't use PICs in a number of our products....

    It's nice to think there may actually be people out there who still do hobby projects...are there??? I started building things when I was 8 years old.

    what line of work are u in? im real good at all things micro and im looking 4 a job!!

    I still do some hobby stuff - last was avr-mobile phone - sms control of apps.

    Im moving onto fpga's tho as pics and the like are just not powerful enuf and i dont have the cash for a full asic run.


  • Registered Users, Registered Users 2 Posts: 447 ✭✭cerebus


    Originally posted by joc_06
    i dont have the cash for a full asic run.

    What - you don't have the ~$1M US needed for a 90nm maskset lying around? :)


  • Closed Accounts Posts: 1,376 ✭✭✭joc_06


    Originally posted by cerebus
    What - you don't have the ~$1M US needed for a 90nm maskset lying around? :)


    no .13 micron cmos - bout €100k, less depending on your dept grants etc


  • Registered Users, Registered Users 2 Posts: 179 ✭✭patjunfa


    Wow, thanks for all the response. I'm well out of touch with electronics these days, and will prob need to get help for the project. But idea's and details very helpful to create options. I want to build a martial arts training aid, with lights to flash randomly, which I can react to. Possibly incorperating certain combinations of lights. As a next stage possibly put some sensors and a way to evalute reactions.

    I thought a 555 would come into it, but how to do it, being v out of touch as I am. Microcontrollers and PIC development boards and rc networks sound practical, but being unfamilar with them I'm not sure how to search, get more info, turn it into realistic plan. If anyone has an idea with some detail, I could suggest it to my friend who has engineering experince, (who suggested PLC's) and see if theres another route to go. It sounds like it should be simple enough and relatively inexpensive.

    Sounds like there are people out there with a wealth of experience behind them. My only real background in this is from 15-20years back, playing with my zx81 spectrum, tinker with alarms, radios, and projects involving components considered extinct now. I'm only 28 by the way. Unskilled as I am, I've no fear of learning stuff, picking up a soldering iorn and blagging experience, or collaberating and learning from those with experience.


    All ideas and replys v much appreciated


  • Advertisement
  • Closed Accounts Posts: 914 ✭✭✭Specky


    it can be pricey getting into the FPGA scene too really when you take into account the cost of good quality software for designing and simulating. Thank holy Jebus for JTAG though, wiggler cables are cheap and in-circuit programmability lets you get it wrong almost as many times as you like.

    If you're looking for powerful microcontrollers at reasonable prices have a look at the new Zilog stuff. Loads of features, pretty decent development tools and not too badly priced.

    'fraid we don't have any jobs going at the moment joc.


  • Registered Users, Registered Users 2 Posts: 447 ✭✭cerebus


    Originally posted by joc_06
    no .13 micron cmos - bout €100k, less depending on your dept grants etc

    I'm interested to hear where you can get something fabbed in 0.13u with those kind of NRE costs!

    Most typical figures I've seen are somewhere between $400k - $600k for the masks. Any more information you can share?

    (Maybe when you refer to "dept grants" you're talking about academic/university fab access programs? These do tend to be cheaper...)

    Anyway, just curious!


  • Closed Accounts Posts: 914 ✭✭✭Specky


    I want to build a martial arts training aid, with lights to flash randomly,

    Really does sound like a job for a micro. You could use a plc but in my opinion that would be a bit of a "sledgehammer/nut scenario"....and wouldn't be anywhere near as much fun. I mean, you could do it quite easily with a PC. All you'd need would be some LED drivers that you could connect to the printer port and a bit of code to flash them in random order and at random intervals. I presume because of the application you are intending hitting the light when it comes on? Well wire in a few microswitches behind the punch/kick pads and you can measure reaction times and hits/misses....again, if you use a pc you could multiplex the led drive and switch input and get them all working through the printer port then display lovely graphs and "motivational expressions" on the screen to show how you're doing with the exercise...record people's training profiles over time....etc etc (jeez you could almost make a business out of this...except that someone else probably already has?? maybe??

    Anyway...the basic model sounds like you could string it together from one of the many PIC or AVR or whatever demo boards you can buy from farnell or RS. If you design a hardware solution to the problem (ie a 555 or a counter/timer based thing or whatever) then it will only do what it does...design a micro based solution and you can change it without having to re-design and re-build it.


  • Closed Accounts Posts: 1,376 ✭✭✭joc_06


    Originally posted by cerebus


    (Maybe when you refer to "dept grants" you're talking about academic/university fab access programs? These do tend to be cheaper...)


    Nail on the head there- last ic done was sept 02 - it muxed analog + digital sigs for a special display and was fab'd in luxembourg as i recall


  • Closed Accounts Posts: 14,483 ✭✭✭✭daveirl


    This post has been deleted.


  • Closed Accounts Posts: 2,313 ✭✭✭Paladin


    Umm for a really really cheap circuit, write the program on your pc in some language (C probably easiest) and hook a board of LEDs to your serial port and voila (simple board of leds and R's should do the job). Did it during 2nd labs in college.

    Might not be what you are after though. A little "too" engineering maybe :)


  • Closed Accounts Posts: 914 ✭✭✭Specky


    Parallel port (as I suggested earlier) yes, but serial port would be a bit restricting as you've only got a couple of outputs (you can't really use the data output because you can't set it "high" or "low"....ok...you could repeatedly send data but...)

    So you've really only got two hardware handshake output lines to play with on a 9 way D type.


  • Registered Users, Registered Users 2 Posts: 179 ✭✭patjunfa


    With the parell port idea what kind of board of LEDs would I get? something that has a connection for a parrell port cable? anything else on the board?
    I checked for microcontroller development kits on the zilog site and found Z8F08200100KIT (Development Kit) for only $40. It says it has a c compiler. Is this just like a wee programable computer with limited functions? looks like it'd almost fit the bill, just not sure this one has the 8-10 outputs I need

    all the suggestions much appreciated by the way:)


  • Closed Accounts Posts: 914 ✭✭✭Specky


    With the parell port idea what kind of board of LEDs would I get? something that has a connection for a parrell port cable?

    You might not be able to get something off the shelf....or then again maybe you can.

    I'd have a bit more of a google around for things on "using PC parallel port for I/O", there's been lots of magazine articles and the like I've seen in the past on this subject so you may be able to pick something up.

    Look up the pinout of the parallel connector, you'll see it's 8 data lines and a bunch of strobes and status lines. From that you should (may) be able to work out what you need to do to interface it to a standard I/O board (you can get off the shelf relay or opto-isolator boards that you can use to drive your LEDs...I wouldn't recommend trying to run the LEDs directly from the port) then all you'll have to do is make yourself a custom cable with the necessary data and strobe lines included.

    I'm trying to remember what the Zilog prototyping board has on it but I can't...usually these demo boards do have a little prototyping area on them though, and all you need is an 8 bit latch/driver. UCN5801 is very easy to drive or the ULN2003 (think that number's right....) then connect your LEDs onto the outputs and bob's your uncle....but you'll need 2 if you want between 9 and 16 outputs.

    ...oh and don't forget current limit resistors in line with the LEDs (use hi-efficiency leds for reduced current (about 10mA instead of about 20mA), volt drop over a LED is about 2v so to run the LEDs from 5v you need 5v-2v/10mA = 300ohms...say 270ohm resistors. If you want to use high brightness LEDs or run from a different supply you'll need to re-calculate)


  • Closed Accounts Posts: 2,313 ✭✭✭Paladin


    Parallel port (as I suggested earlier) yes, but serial port would be a bit restricting as you've only got a couple of outputs (you can't really use the data output because you can't set it "high" or "low"....ok...you could repeatedly send data but...)
    Sorry, I didnt actually read all the replies but you are of course correct, Parallel port would be better than serial :)


  • Advertisement
  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    I made what you did once. I used a counter. BUt a microcontroller would be best or why not use the parallel port on your PC and write a program there to control it. Anyway a counter will probably be the simplest/cheapest.


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    If you are using the parallel port be careful. if you have windows 2000 or newer parALLEL PORT PROGRAMMING CAN TURN INTO A NIGHTMARE.

    fIND A COUNTER IF YOU CAN.. tHATS WHAT iUSED TO DO THE SAME EXACT JOB. :cool:


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    Check out:
    http://www.uoguelph.ca/~antoon/gadgets/bfflash2.htm

    Big list:
    http://www.discovercircuits.com/L/lite-flash.htm

    Try:
    http://www.allaboutcircuits.com/vol_6/chpt_7/6.html

    Using 555s and other oscillators to do what you do is just not possible. You would need to build oscillators with freqs of less 1Hz which is impossible due to stability.

    All you need is a counter, possibly some gates and also 8 LEDS and 8 resistors(560 Ohm might do ya depending on voltadge used).


  • Registered Users, Registered Users 2 Posts: 179 ✭✭patjunfa


    Thanks,
    great ideas

    I much prefer the idea of a microcontroler anyway. The Boards in those links look very possible, especially the last one. I'll let you know how I get on,
    Any ideas on lights? Obvious is LEDS. Only drawback is if I had it outside it might not be very visable in daylight, or if viewed from a side angle. might just use a few of them


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    You can get high intensity LEDs. You could try driving as much current as possible into them by using buffers (6 on the 74hc4050 IC) and low value resistors. You could also consider using tricolour LEDs. Look very cool.. They have 3 legs, middle one is usually cathode/ground. The other two legs produce different colours. One leg produces green, the other leg red and two together produce yellow. Therefore you get 3 different light colours or no light out of a single LED. I bought mine from www.electronelec.co.uk. You can also get 6 or 12v bulbs but LEDs will be fine if you get big high intensity ones and buffer them and use as low a value reesistor as possible from your calculations.

    Dont be trying to light LEDs directly from microcontroller pins. They can usually only source and sink(a bit better) a few milliamps. This means that you wont light the LEDs very brightly plus if you use too low a value of resistors your microcontroller will be history. Solution: Use buffers-74HC4050 IC. Data sheet available from www.farnell.com


  • Closed Accounts Posts: 914 ✭✭✭Specky


    Using 555s and other oscillators to do what you do is just not possible. You would need to build oscillators with freqs of less 1Hz which is impossible due to stability

    that's not true. You can't do it accurately but that wouldn't be important for this project.
    All you need is a counter, possibly some gates and also 8 LEDS and 8 resistors(560 Ohm might do ya depending on voltadge used).

    That's about as useless a statement as I've seen in a forum.
    You can get high intensity LEDs. You could try driving as much current as possible into them by using buffers (6 on the 74hc4050 IC) and low value resistors.

    There are considerably more appropriate driver devices than a hc4050....and driving all your LEDs from the regulated 5v supply that's also powering the processor adds unecessarily to the capacity required from the 5v supply. You've much better off using open collector/open drain driver devices sinking current from the unregulated side of the supply. LEDs don't care if the power is a bit dirty and you sure as hell won't notice.
    You could also consider using tricolour LEDs. Look very cool.. They have 3 legs, middle one is usually cathode/ground. The other two legs produce different colours. One leg produces green, the other leg red and two together produce yellow. Therefore you get 3 different light colours or no light out of a single LED. I bought mine from www.electronelec.co.uk.

    .....and the price of fish is what? Oh my mistake...this obviously has absolutely nothing to do with the price of fish.
    Dont be trying to light LEDs directly from microcontroller pins. They can usually only source and sink(a bit better) a few milliamps. This means that you wont light the LEDs very brightly plus if you use too low a value of resistors your microcontroller will be history. Solution: Use buffers-74HC4050 IC. Data sheet available from www.farnell.com

    Not strictly true. Many devices have high current sinking outputs, many also have programmable open drain outputs which can be used to sink a fair bit of current. High efficiency LEDs only require around 10mA for full brightness and this application (if you've read the previous posts in the thread) would appear to only require one to be lit at a time. So technically, with the right micro and the right setup you could quite happily drive LEDs directly without damaging anything. However, for this application, in which the "lights" are likely to be wired some distance from the controls I think drivers (even opto-isolators) could be more appropriate to protect the micro from any real-world nastyness that might find its way onto the cabling.

    You trying to get your post count up by any chance...... :p


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    Specky you are a very very sad person. Get a life my friend. Im sorry if I offended you.


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    Looking through your other posts specky....you probably are a geek with glasses in real life too...I think that you have "issues". There is councelling for people like you.


  • Closed Accounts Posts: 914 ✭✭✭Specky


    Oh Finnpark, your incisive intuituition and razor-like critique of my entire Boards input are simply too overwhelming to deny.

    I shall simply crawl into a corner and die a small, sad death befiting of such a small, sad individual as I obviously must be.

    Thank you for pointing out my utter worthlessness. I, and all others who read your posts can only bask in the glory of your exalted words.

    :rolleyes:


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,581 Mod ✭✭✭✭Capt'n Midnight


    back to the original question
    get an op amp or something to amplify noise (from a zener diode or antenna or photo detector)
    use a capacitor as a DC block
    put it through a low band pass filter with a time constant of a second or so
    and then get a bargraph driver LM3914 (or 3915) to display random lights.


  • Registered Users, Registered Users 2 Posts: 384 ✭✭mrhappy42


    pay 45 dollars...connect some led's and write some dirt quick VB code...finished.

    http://www.winfordeng.com/products/crd155b.php

    Or just take your z80 out of the cupboard, dust it down and connect some led's...


  • Closed Accounts Posts: 1,541 ✭✭✭finnpark


    All very good ideas!! :) But he is a beginner I think. I like the bargraph idea allthough it is a bit crude I think. But it is the simplest idea I heard yet. No code no expense and simple to do. :D

    The other idea of using an interface card and Visual Basic seems over the top. Plus didn't he say he wanted it outside also? A computer may be out of the question. If you were going to use a computer I would think the serial/parallel port would be simpler and cheaper. :)


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,581 Mod ✭✭✭✭Capt'n Midnight


    simpliest way would be a program to make Numlock / Scroll lock / Caps Lock flash on/off KLocks (6KB)
    Batch file to continuously flash all Lock indicator lights:-
    
        @echo off
        :: Turn all lights on
        klocks +n +c +s
        :top
        ping 127.0.0.1 -n 2 >nul
        :: Toggle all lights
        klocks !n !c !s
        goto :top
    


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,581 Mod ✭✭✭✭Capt'n Midnight


    http://freshmeat.net/projects/ieee1284java/

    About:
    ieee1284java is a Java library for accessing the parallel port using the libieee1284 C library and the Java Native Interface.


Advertisement