Shoutbox

Playing around with a microcontroller - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: General Chit Chat (/forumdisplay.php?fid=14)
+----- Thread: Playing around with a microcontroller (/showthread.php?tid=73256)

Playing around with a microcontroller by Mike on 04-03-2007 at 12:27 AM

My father brought me a MC68HC908GP32 microcontroller so that I can spend my Easter holidays with something "productive", and today, with help from my brother and father, we did this:

We lit a led and then added another one!
Pics:
http://mike.thedt.net/images/temp/DSC00275.JPG -- One led only
http://mike.thedt.net/images/temp/DSC00277.JPG -- Two leds

I know, lighting leds isn't such a hard thing to do, (even with a microcontroller), but for me it's a begging. :P

I used to do this last summer, but didn't got far away. I was still doing various things with leds.
Now, I have forgotten almost everything from what I knew (that little knowledge anyway... :P).

I still don't understand most of the things, but let's hope that I will in the near future... :P


RE: Playing around with a microcontroller by CookieRevised on 04-03-2007 at 01:49 AM

(y)

so now you can start making your own "someone messaged you" led blinker ;)

(assuming you can control the PIC via the RS232 port? otherwise you could output a signal to the RS232 port or even centronics (parallel) port (but be very carefull with that since you could blow up your parallel port and PIC with that if done wrong) and wire that to one of the input legs of the PIC...

:D


RE: Playing around with a microcontroller by Mike on 04-03-2007 at 08:46 AM

quote:
Originally posted by CookieRevised
so now you can start making your own "someone messaged you" led blinker (Smilie)
Good idea (Y)
But I still don't know how to send data to it. :(
I can currently only light a led :P

quote:
Originally posted by CookieRevised

(assuming you can control the PIC via the RS232 port? otherwise you could output a signal to the RS232 port or even centronics (parallel) port (but be very carefull with that since you could blow up your parallel port and PIC with that if done wrong) and wire that to one of the input legs of the PIC...
Yes, it is controlled via RS232 (you can see this on the pictures), but it's not "pure" RS232 since it is connected to a USB-to-RS232 converter.
RE: Playing around with a microcontroller by Mike on 04-04-2007 at 07:37 PM

I made the leds blink :D
Check out the (poor quality) video! : http://mike.thedt.net/temp/MOV00280.3GP


RE: Playing around with a microcontroller by duck! on 04-04-2007 at 07:41 PM

quote:
Originally posted by Mike

I made the leds blink (Smilie)
Check out the (poor quality) video! : http://mike.thedt.net/temp/MOV00280.3GP
Lol, cool :cheesy:
*duck wishes he could do that
RE: Playing around with a microcontroller by prashker on 04-04-2007 at 07:49 PM

quote:
Originally posted by CookieRevised
(y)

so now you can start making your own "someone messaged you" led blinker ;)

(assuming you can control the PIC via the RS232 port? otherwise you could output a signal to the RS232 port or even centronics (parallel) port (but be very carefull with that since you could blow up your parallel port and PIC with that if done wrong) and wire that to one of the input legs of the PIC...

:D

aka

Mike thats cool
RE: Playing around with a microcontroller by Nagamasa on 04-05-2007 at 05:04 AM

quote:
Originally posted by SonicSam
quote:
Originally posted by CookieRevised
(y)

so now you can start making your own "someone messaged you" led blinker ;)

(assuming you can control the PIC via the RS232 port? otherwise you could output a signal to the RS232 port or even centronics (parallel) port (but be very carefull with that since you could blow up your parallel port and PIC with that if done wrong) and wire that to one of the input legs of the PIC...

:D

aka

Mike thats cool
Sam, refund your pre-order for the LED thingy!!
RE: Playing around with a microcontroller by Mike on 04-07-2007 at 04:53 PM

New program: http://mike.thedt.net/temp/MOV00303.3GP

Nothing really new...

It is supposed to be one of those which are in the streets that tell you to stop or go (don't know the English name for it :$)


RE: Playing around with a microcontroller by Nathan on 04-07-2007 at 05:00 PM

Traffic lights?

And nice - i've got 2 of these things around the house but I've never used them :P
* Nathan goes to find them


RE: Playing around with a microcontroller by Mike on 04-07-2007 at 06:00 PM

quote:
Originally posted by Nathan
Traffic lights?
Doh, of course, silly me... :$ :P
RE: Playing around with a microcontroller by marissa on 04-08-2007 at 04:07 AM

heyyy. i found one of these in my garage, mines um.. obviously smaller than yours but i was like :o MIKE HAS ONE OF THESE!

i dont know what the fuck it does though :p

http://img.photobucket.com/albums/v383/marissaok/IMG_5919.jpg


RE: Playing around with a microcontroller by Mike on 04-08-2007 at 11:18 AM

quote:
Originally posted by marissa
heyyy. i found one of these in my garage, mines um.. obviously smaller than yours but i was like :o MIKE HAS ONE OF THESE!

i dont know what the fuck it does though :p

http://img.photobucket.com/albums/v383/marissaok/IMG_5919.jpg
This is where you put all the electronic stuff. For example: leds, resistors, buttons, etc.
(I guess that) you can't do much without the microcontroller (which is on the green board)
I know, my explanation sucks :P I suppose Cookie can explain better :P


--------

I made a small change to the traffic lights project: http://mike.thedt.net/temp/MOV00307.3GP
The two new lights are for the pedestrians :D
RE: Playing around with a microcontroller by Mike on 04-10-2007 at 10:52 AM

I also made this the same day I posted the previous post, but I didn't post it.
http://mike.thedt.net/temp/MOV00332.3GP

Nothing new again. I just used 8 small red leds this time :)


RE: Playing around with a microcontroller by CookieRevised on 04-10-2007 at 05:45 PM

quote:
Originally posted by Mike
This is where you put all the electronic stuff. For example: leds, resistors, buttons, etc.
(I guess that) you can't do much without the microcontroller (which is on the green board)
I know, my explanation sucks :P I suppose Cookie can explain better :P
You've explained it good though...

Such boards are also known as testing-boards or practice-boards. The proper term is breadboard.

Such boards allow you to make test cases without the need to solder wires and making real PCBs (=printed circuit board... eg: your motherboard is a big PCB consisting of multiple layers). As you can see from Mike's photos, you just need to stick the components in a cell on the board to make connections.

They are great for small experiments and for learning practices since you can change stuff around and connect whatever you want and restart over again if needed.

Once you have the proper hardware set up, you can design a PCB layout and make/print and etch a real PCB.

I bet Wiki has an even better explaination... searching...

EDIT:
http://en.wikipedia.org/wiki/Breadboard
http://en.wikipedia.org/wiki/Printed_circuit_board


--------------------

quote:
Originally posted by Mike
I also made this the same day I posted the previous post, but I didn't post it.
http://mike.thedt.net/temp/MOV00332.3GP

Nothing new again. I just used 8 small red leds this time :)
!disco inferno! :zippy: :banana: :zippy:

--------------------

quote:
Originally posted by Mike
I made a small change to the traffic lights project: http://mike.thedt.net/temp/MOV00307.3GP
The two new lights are for the pedestrians :D
small (but dangerous.. for the pedestrians :D) thingie: the green light for the pedestrians jumps on green the same time the car light jumps on red. There should be a delay between them...

Next exercise with this: add a push button: as soon as the button is pressed a delay happens, then the car lights jump on yellow, then on red and the pedestrians lights go on green (for a shorter time than in a normal sequence)... This will simulate the button pedestrians can use on lights to quickly cross the street.

if you have a infrared diode, you can add that too: only start the pedestrian request for green light when the pedestrian pushes the button and when there is no traffic: if the infrared beam isn't interrupted for, lets say, 5 seconds... (this also teaches the use of logic gates, in this case the AND gate)

Next exercise: add a circuit (can be a rocker switch) which when broken sets car lights on flashing yellow. The switch will simulate a shortcircuit or power failure in the system. eg: traffic lights out of order...

;)


PS: if you have Lego, build a real crosspoint :P


------------------------------------------------------

EDIT: for those who don't have a real breadboard but still want to experiment and play around with one: Java breadboard simulation:
http://www.cs.york.ac.uk/netpro/bboard/jbreadboard.html
RE: Playing around with a microcontroller by Lou on 04-10-2007 at 09:29 PM

quote:
Originally posted by CookieRevised
EDIT: for those who don't have a real breadboard but still want to experiment and play around with one: Java breadboard simulation:
http://www.cs.york.ac.uk/netpro/bboard/jbreadboard.html
That looks pretty sweet!
RE: Playing around with a microcontroller by Weyzza on 04-11-2007 at 07:24 AM

Hah.. breadboard...

Do I miss it?
No, not at all :cheesy:


RE: Playing around with a microcontroller by Mike on 04-11-2007 at 01:00 PM

quote:
Originally posted by CookieRevised
small (but dangerous.. for the pedestrians (Smilie)) thingie: the green light for the pedestrians jumps on green the same time the car light jumps on red. There should be a delay between them...
You are right :P
Well, that's how the book I'm reading wanted me to do it :P
quote:
Originally posted by CookieRevised
Next exercise with this: add a push button: as soon as the button is pressed a delay happens, then the car lights jump on yellow, then on red and the pedestrians lights go on green (for a shorter time than in a normal sequence)... This will simulate the button pedestrians can use on lights to quickly cross the street.

if you have a infrared diode, you can add that too: only start the pedestrian request for green light when the pedestrian pushes the button and when there is no traffic: if the infrared beam isn't interrupted for, lets say, 5 seconds... (this also teaches the use of logic gates, in this case the AND gate)

Next exercise: add a circuit (can be a rocker switch) which when broken sets car lights on flashing yellow. The switch will simulate a shortcircuit or power failure in the system. eg: traffic lights out of order...

Nice ideas you have.
I should consider them :)
RE: Playing around with a microcontroller by Mike on 04-12-2007 at 01:49 PM

I rebuilt the traffic lights circuit and added a button for the pedestrians.
Video here: http://mike.thedt.net/temp/MOV00356.3GP

The reason I added that blue led is because:
1) I wanted to know if I actually pushed the button
2) Because I have never seen a blue led before, and wanted to test it
3) Because it is sexy :P


RE: Playing around with a microcontroller by Nathan on 04-15-2007 at 10:28 PM

awesome


RE: Playing around with a microcontroller by NanaFreak on 04-15-2007 at 10:35 PM

nice (H)


RE: Playing around with a microcontroller by Mike on 08-11-2008 at 07:29 PM

I decided to experiment again after one and a half year and this is what I've done: http://mike.thedt.net/temp/MOV01540.3GP (sorry for the quality)

It's something simple but, this time, instead checking if a button is pressed, I've used interrupts to do it which means that the processor can do other things than constantly checking wether a button is pressed or not :)


RE: Playing around with a microcontroller by andrewdodd13 on 08-11-2008 at 09:25 PM

I wants me one of those. I love toying about with stuff like that.

@Cookie - how cheap is it to get PCBs printed?


RE: Playing around with a microcontroller by CookieRevised on 08-12-2008 at 12:25 AM

Depends on the quality of the board you wanna get (different materials), the layers you need (usually only one layer though, more is very expensive), the amount of sides, solder masking, tooling, the amount and size of tracks (though only sometimes, depends on how they are made), etc...

Making them yourself is very possible, but it involves some craftmanship, a lot of patience and some chemical know-how (or a very good how-to book would do too), and above all a lot of trial and error...

Or you could get them made by companies which make prototype boards in very small quantities for you, like http://www.eurocircuits.com/ or http://www.pcb-pool.com/. They are still relative cheap and you don't need to bother with all the labor, burns, sweat, toxic stuff, and trials gone wrong...

eg: a double sided board of 100mmx160mm, plated through and partial hot air levelling and tooling (which is already more than what you'll ever need if you're a beginner), is €50 according to PCB-Pool. But a single sided 100x100mm, not plated through, not tooled, not masked, plain and simple, is just around 25 euros. For that kind of money I cba to try and make one myself tbh.

See google "make PCB boards" for tons of info. Also, the local libary is a gold mine of information regarding this ancient hobby.

;)



PS: Note that an experiment board (like the one Mike is using) can be bought very cheap in almost all local electronic shops* as kits, including needed materials and components to make your own experiments, just as Mike did.

* that is electronic shops, thus not electricity shops (although some have them) or household equipment shops. But the kind of shops were you go to buy a bunch of resistors and transistors and those kind of things...