Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Aurbo on January 18, 2008, 08:42:13 PM

Title: Looking for some guidance
Post by: Aurbo on January 18, 2008, 08:42:13 PM
Greetings

I'm looking at getting my class interested in beyond basic electronics and perhaps robotics challenges for those that show an interest.

Could someone recommend a very basic beginner robot that wont break the bank but will demonstrate some basic abilities.

I also have an electronics question that someone may have an answer to:  ( I think I'm learning slower than the kids some days)

http://www.kmitl.ac.th/~kswichit/Led/schematic.pdf (http://www.kmitl.ac.th/~kswichit/Led/schematic.pdf) contains a 5 led segmented clock that looks pretty simple overall to build for a 10th grade project.   in particular the ability to drive the circuit with SER, SRCLK and RCLK, which I think would make a perfect example of how a PIC IC could operate. As well as a class project for the year's end to replace the dead clock in the gym.

I have several 18F4620's 18FL4525's and some 16F627A's that the kids are learning PIC programming on. Could someone comment on whether the PIC's could replace the LED drivers and Darlington Array's all together? and if thats not possible, can someone recommend an IC that would be able to drive the 5-led segments with one of the PIC's keeping the time OSC?

Regards
Steve D
Title: Re: Looking for some guidance
Post by: SmAsH on January 18, 2008, 09:03:51 PM
Hi Steve.
have you checked out admins tutorials? they're very helpful and easy to use.
the $50 robot: http://www.societyofrobots.com/step_by_step_robot.shtml (credit to admin)
the $40 robot: http://www.societyofrobots.com/member_tutorials/node/59 (credit to Pratheek)
the $50 robot uses a microcontroller of which you would need to purchase a programmer $25-$200.
the $40 robot does not. anyways check the tutorials out and just ask if you need anything.
if your class isnt that advanced tho you can start by explaining the basics of sensors, l.e.ds, photocells,line following etc... most of the stuff on this site is really easy to make and understand. hope this helped


~smash
Title: Re: Looking for some guidance
Post by: Aurbo on January 18, 2008, 09:23:09 PM
Thanks for the quick reply on the budget robot..

I believe the  http://www.societyofrobots.com/member_tutorials/node/59 (http://www.societyofrobots.com/member_tutorials/node/59) would be the right level.

Looks like plenty of donator parts from the kids R/C vehicles could come into play on this.


Now if I can get that clock to work.. its becoming an obsession.. =)

Cheers
Steve
Title: Re: Looking for some guidance
Post by: SmAsH on January 18, 2008, 09:32:07 PM
lol have fun.

~smash

ps:are you a teacher or a class member?
Title: Re: Looking for some guidance
Post by: Aurbo on January 18, 2008, 10:12:14 PM
Its midnight.. on a Friday and I'm searching the web looking for robotic projects for my students and hopefully a solution to my timer circuit quandry..   I guess that makes me the teacher..  ;D

First year teaching basic electronics after 12 years of teaching machine shop classes.  Not much interest in either these days from the kids it seems.

Cheers
Steve
Title: Re: Looking for some guidance
Post by: SmAsH on January 18, 2008, 11:12:24 PM
oh well for easy to medium circuits i reccomend www.electronics-lab.com/projects (http://www.electronics-lab.com/projects) thats got some really good projects. that even i can do. im 12 ;D also what year/grade are you teaching?


~smash
Title: Re: Looking for some guidance
Post by: paulstreats on January 19, 2008, 03:38:02 AM
Hi Aurbo,

I have succesfully driven these 7 - segment http://www.maplin.co.uk/module.aspx?ModuleNo=2154&doy=19m1 (http://www.maplin.co.uk/module.aspx?ModuleNo=2154&doy=19m1) Displays directly from a pic.(note: they arent a 12 volt model. You wont drive the 12 volt model from a pic unfortunately)

Your best way to do it is using one of the 8bit digital i/o ports but only connect 7 pins to the 7 seg display.

something like this in code(c):

unsigned char display1(10);
display1[0] = 0b01110111; // display char 0 on display
display1[1] = 0b00010001; // display char 1 on display
display1[2] = 0b00111110; // display char 2 on display

etc.......

A lot of these modules have an additional led which acts as a decimal place or a dot in either the bottom right or left of the display.

you could use the last bit of the port to control this

0b10000000 ; //use this bit to control the dp


then to set the port

PortD = display1[0] // will set the port up for the char0 to be displayed.


//The 7segment will have to be connected to the correct port pins for this.

The idea is to predefine EVERYTHING since different commands take different times to complete their cycles on pics so eventually your clock time will start going slow/fast. If everything is predefined then you reduce this error rate.
There are realtime clock modules available that will keep the time for you which you can communicate to and retrieve the time through i2c protocols, this would eliminate this error altogether
Title: Re: Looking for some guidance
Post by: Aurbo on January 19, 2008, 09:39:54 AM
Thanks for the replies,

smAsh;
Grade 9 introduction to electronics, first year instructing. prior to that 12 years grades 9 ,10 and 11 machine shop/millwright

paulstreats;
Thanks for the info, I too have successfully driven a small 7segment led's directly from a 16F627A, it works fine, But what I am trying to do with with project to drive each segement a,b,c,d,e,f,g,dp as an individual line of 5 to 7 led's layed out to look like a 2 foot tall "7segment" digit.

The code you posted would be the same for either as the layout would replicate a 7segment unit.

Most 7 segment led units have a forward voltage of 3-7mA per segment making them fine for direct drive off the pic.

the "7segment led" I am creating would have a forward voltage nearing 100-120mA, Its looking like this is going to require some sort of "high voltage line driver", I just dont know which to try.

Regards
Steve
Title: Re: Looking for some guidance
Post by: paulstreats on January 19, 2008, 10:53:11 AM
You could just use mosfets or transistors, you might be able to find a packaged ic with 8 or so in the package like the darlington ic's
Title: Re: Looking for some guidance
Post by: paulstreats on January 19, 2008, 11:36:38 AM
This is the darlington ic array that is commonly use with mcu's (it has built in ttl level diode protection)


ULN2803 DIP

having 8 input/output pairs should be ideal for you

Title: Re: Looking for some guidance
Post by: Aurbo on January 19, 2008, 12:21:57 PM
Thanks,  reviewing the datasheet for the 2803.  hopefully this will work.

Cheers
Steve
Title: Re: Looking for some guidance
Post by: paulstreats on January 19, 2008, 12:33:26 PM
If you have an non generic email address (like from the school you work at) You might be able to order a couple of free samples from www.microchip.com instead of wasting any money
Title: Re: Looking for some guidance
Post by: Aurbo on January 19, 2008, 12:55:32 PM
Thanks

We use Microchip for free samples at the school, they give us 50 uC's of our choice each fall for the grade 9 class.

They look at it as prospective future customer support..  the kids go on to use Microchip products in the grade 10 and 11 Electronics class projects.  Those chips are bought for each class with schoolboard/student funding.

on the ULN2803 note:

What is your opinion on the UDN2981  It looks like may provide a larger 500mA carrier that would ~ 25 leds @ 20mA each which would be serious overkill but still alllow the possiblities of a double line led segment to make the digits more robust.

Cheers
Steve
Title: Re: Looking for some guidance
Post by: paulstreats on January 19, 2008, 06:45:38 PM
Dont see why it wouldnt work for you.


As ever, You can but try......
(especially when 30 students wouldnt have to try)
Title: Re: Looking for some guidance
Post by: SmAsH on January 19, 2008, 06:55:15 PM
lol theres always hope for free stuff
Title: Re: Looking for some guidance
Post by: ed1380 on January 19, 2008, 07:23:13 PM
lol theres always hope for free stuff
please do not order samples unles you know what they do without looking it up on google
Title: Looking for some guidance
Post by: SmAsH on January 19, 2008, 10:17:54 PM
yea there are some people who ruin it for everybody and just order everything they can get even if they dont know what theyre called! they really piss me off.
Title: Re: Looking for some guidance
Post by: Aurbo on January 20, 2008, 10:03:32 PM
Trying to get back on track..

PIC18F6420 + 7 digits created out of 5 led's in series to create each segment.

Ok  using a Pic.. the max voltage it will handle is 5VDC.. 

Each segment of my a-g led units will be closer to 12VDC

2.2v x5leds=11VDC , so using 12VDC will give me plenty of power to light up a segment.

Now if I'm using RA0 output to drive segment "a" through a ULN2003 darlington array IC to multiplex the 7 digits,  I'll need to use a common cathode for digit0-digit6,  those can be handled with output pins RB0-RB7

The way I read all this.. RB0-RB7 will be on the receiving end of 12 volts.. not good!

As this project only needs 7 digits, and the common cathodes require 7 outputs,  could I use a ULN2803 to output the Common Cathodes through to isolate the 12VDC completely from the PIC..

Please correct me if I'm wrong..

Title: Re: Looking for some guidance
Post by: paulstreats on January 21, 2008, 09:14:06 AM
The common cathodes can go direct to gnd
Title: Re: Looking for some guidance
Post by: HDL_CinC_Dragon on January 21, 2008, 11:03:13 AM
I dont really know a solution to your problem but
Most 7 segment led units have a forward voltage of 3-7mA per segment making them fine for direct drive off the pic.

the "7segment led" I am creating would have a forward voltage nearing 100-120mA, Its looking like this is going to require some sort of "high voltage line driver"
You mean forward current :) Voltage and Current are quite different :)
Title: Re: Looking for some guidance
Post by: Aurbo on January 21, 2008, 03:00:29 PM
Correct,,   Forward voltage..

If the Common Cathodes go straight to ground, where do I inject the 12Vdc to handle the digits and keep it isolated from the ULN2003 and PIC?


Cheers
Steve
Title: Re: Looking for some guidance
Post by: paulstreats on January 21, 2008, 06:12:41 PM
look at figure 6.3 on this website to see how the darlington should be attatched

http://www.cs.uiowa.edu/~jones/step/example.html (http://www.cs.uiowa.edu/~jones/step/example.html)
Title: Re: Looking for some guidance
Post by: Aurbo on January 22, 2008, 02:37:48 PM
Using a MAX 7219, and the http://pdfserv.maxim-ic.com/en/an/AN1196.pdf  Figure2.

I can make use of the larger 5 led per segment, 7 segment digits  using 12Vdc to power the Digits and 5Vdc to power the MAX and uC.

Just need to work out the Vcascode  value..  I dont quite understand that one.

Cheers
Steve
Title: Re: Looking for some guidance
Post by: Aurbo on February 13, 2008, 01:46:56 PM
Here is my latest build.

The 595 is a combined standard 595 with ULN 2003 combined. This will give plenty of room to drive the digits.

All I'm missing is a quick test code to latch through the 595 and light up each segment of each digit in order.  Not worried if its not the pic in the schem. I just need to find ANY basic code that will do a check of the segments in each digit.. I can use the code with the students to port if over to the PIc of their choice.

Might anyone happen to have a quick test code along those lines?

Cheers
Steve

(http://users.eastlink.ca/~lsjdupuis1/images/CountDown41.bmp)
Title: Re: Looking for some guidance
Post by: Aurbo on February 14, 2008, 03:01:18 PM
Looking for a recommendation on which language to start with and what software/programmer to buy

Cheers
Steve
Title: Re: Looking for some guidance
Post by: Rebelgium on February 14, 2008, 05:18:50 PM
language definitely C. There are lots of choices for programmers, make sure it's an ICSP programmer zo you don't have to take out and plug in the PIC in the programmer every time.
Title: Re: Looking for some guidance
Post by: paulstreats on February 14, 2008, 05:46:15 PM
if you swap to using pic18f series then you can use the free student version of microchip C18 instead of having to pay for a commercial one - since you are teaching students this is a perfect scenario
Title: Re: Looking for some guidance
Post by: Aurbo on March 28, 2008, 03:40:17 PM
Has anyone taken a poke at this project?

http://www.sixca.com/eng/articles/clock/ (http://www.sixca.com/eng/articles/clock/)

Looks simple and should be simple,  the BC557 is symboled incorrectly but otherwize it should work.

I have tried this project a few times but cannot get the thing to work. Only difference I did was use an 18S20 and a 16F628A.

Any suggestions?

Regards
Steve