Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: PIC Programming, USB LCD and other questions...please make some suggestions!

  1. #1
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default PIC Programming, USB LCD and other questions...please make some suggestions!

    OK, this is going to be very complicated-just bear with me! I'm a half good PIC microprocessor programmer, and i've got some ideas that i want to impliment with the aid of a PIC programmer. I know that when the PC is off, the only power is a 5V line going into the motherboard which allows for the push to make button to work. Brilliantly, the PIC microprocessor can run on a 5V line, so i can have the PICs powered up while the PC is off. Which is good, because i want certain functions to be avaliable when the PSU isn't active. Alright, time to dive right in...

    PIC 1:
    Pic 1 is going to control a door in the case, which opens up to reveal the fan speed controllers. All the case fans are going to be hooked into a single controller, with the CPU fan hooked up to the motherboard as usual. The case fans will be controlled by the buttons behind the door, but wll start up at medium speed. The Fans are going to be connected to the PIC, which is going to produce a voltage output with some sort of Analogue to Digital relay circuit, that is the fan speed is controlled by the PIC. The fans are going to have 10 speeds, and an LED matrix will display which speed the fans are currently going at. The Door will open on startup, and after shutdown, i want the door to close. I'm doubting the 5V will be enough to power the motor after shutdown, but anything's possible i guess. There's also going to be an emergency in port, in case the temp gets too high, turning all the case fans onto full blast. Pin count here is 5 pins for the LED matrix, 1 pin for the emergency in, probably 4 pins to control the door, and another pin which is high when the computer is powered up, and low when the computer is powered down. So i'll need 11 GPIO pins, which is ok-there are 13 GPIO pins on the 16 bit PIC.

    PIC 2: Pic 2 is going to drive 2 temperature sensors. It's going to take a temperature signal from the CPU and from the case, and it's going to display in on two analogue counters on the front of the case. This means that on power down, the analogue counters get reset-so i want to have the analogue counters reset either on startup, or when the CPU powers down. As far as i know, the only way to do this is to reset it using the 5V line, when the PIC detects that there isn't any Power going to the motherboard, i.e. the PSU is powered down. This will require another 16bit PIC i think, as well as having an emergency out line to send to PIC1 should the temperature of the CPU or the case rise to an unacceptable level. If it continues to rise too far, then the PIC will send a power-down signal to the motherboard, which should only cut in when there's a major temp increase-this wouldn't really be necessary because the mobo probably shuts down at a certain temp, but all the same, what's important is that this PIC and the other both have functions that need to work from the 5V line, and i'm not particularly looking forward to mucking about with it. Although the worst that could happen, realistically, is that that i can't get the PSU to boot up. When that happens i've spend all my money setting this up for it not to work.

    Theory 1:
    I want to also include a LCD display, probably a 20 by 4 character display, and run it from the USB port pins on the motherboard, so that i can send data to display down the USB port. I don't know if this is possible or not. I'm hoping it is, because if it isn't, then it puts a major bummer on my case mod.

    What i need are ideas. Has anyone ever used PICs for this sort of thing? Any ideas about how to run my display? I would really like to know if there's a signal the motherboard sends out when shutting down, so i can perhaps get a 'dont power down the PSU till you get this line high' sort of line, which will give me time to close the fan controller doors and reset the analogue counters.

    I know that this is as clear as muck, but what i need is someone to tell me if there's any fundamental flaws in my ideas, and if anyone knows anything about programming an LCD character display through the internal USB, i'd appreciate it greatly. I'd also appreciate any suggestions on how to get all this together-when i've got some of this sorted out i'll try and run up a sort of circuit diagram. I've got a book-PIC microprocessing, Bates-so i'm all set up for how to use the PIC, as well as having done a course in microelectronics. I've never used the PIC outside of the circuit tester though, so this is my first foray into actually using the PIC for something useful. I don't want to waste my time and money if i'm going to screw it all up, so i want to know from a like-minded group what they think of this.

    -Dave

  2. #2
    High-tech Redneck crazybillybob's Avatar
    Join Date
    Jun 2005
    Location
    Currently Homeless
    Posts
    1,028

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    Dave,

    I'm just learning pics (Still picking out a cheapy burner and reading up on it's assembly code If you’ve got any good places to look let me know!).
    As For opening doors and ports and what not. Look into Servo's (the type used on R/C planes, cars, and boats) they can run on 5V and there pulsed so the current draw should be low. There are 20x4 line LCDs that work VIA usb (matrix orbital, crystal fontz, just to name a couple). Now the one thing I can see as an issue is the fans. Those fans are going to draw way to much current for the standby line, and will toast the pic if you try and drive them with it as most pics have a total output (when driving all ports @ once) of 100mA ea. Most fans are looking to eat 500ma or more ea. Your going to need a driving circuit for them maybe opto couple the PWM signal to FET amplifier or you could use a Darlington pair transistor amp to deliver the current and voltage needed.

    for temps there are several IC that can do most of the work for you (that way you only need a few IO lines and not a whole 16bit PIC) Like the DS1620 uses I2c communications to send temps. If you don't want to use I2c then 2 Pics will work as well.


    It looks like a good Idea, and allot of work but Fun and a neat effect in the end.

    Crazybillybob

  3. #3
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    Thanks for that, i hadn't thought of that. That is, the servo motors for the door. The fans are going to run off a sort of relay circuit, at least that was my initial plan-they aren't going to be a part of the delicate PIC circuit. Somehow i need to find a way to control the speed of the fans in the fan circuit through some clever device which i havn't thought up of yet. I was just going to have the fans power up on the PSU boot, but have some sort of electronic variable resistor in place that the PIC controls. Sound like a plan, or an idiot talking? Thanks for the hint about the Matrix orbital, i'd seen them before but they look expensive. I was looking for a more component LCD module and driver than a finished drive plate product, and i don't want all the buttony things and remote crap that come with the matrix. I'll have a look though and see if i can spot anything that suits.

    -Dave

  4. #4
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    Whoop! Just found the perfect display! Thanks CBB!

    But damn...it's expensive at like £60....

    Oh, and there's a website that cuts the crap and gets to the basics of PIC microprocessing, although it's actually a website about that Real Robots magasine robot. My brother was building it, and apparetly there's a PIC burner in the handset, that you can use to burn some PICs. I'm not expecting that to be great, but i'm expecting it to be cheap if you know someone who, like Adam, has got all the magasines and not bothered to build it, or manages to lose a vital part.

    I love the fact that in this case the vital part is in fact half the components of the controller.

    I'm looking at the Maplin burner kit, at £29 you can just solder it yourself, and that's you. Although i don't know what software this comes with, try and get a burner with MPASM IDE i think it's called, or something like that-it lets you program chips in C and assembler. Although at Uni they had disabled the C part of the program. Probably just as well considered the pass rate or the Assembler course-i think 80% of the class were trying to cheat and write in C.

    Anyway, thanks for the pointers-those Servos look like they are my ticket to doorville.

  5. #5
    High-tech Redneck crazybillybob's Avatar
    Join Date
    Jun 2005
    Location
    Currently Homeless
    Posts
    1,028

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    You can find the Bare displays for $5us if you look (this on is 2x20) www.bgmicro.com
    here's a 20x4 //www.mini-itx.com then
    or
    www.watercoolingshop.com (last 2 were in Brit Pounds)
    the Serial interface boards run about $30us but they all are over your Rs232 port www.matrixorbital.com or www.kronosrobotics.com or
    www.seetron.com.

    Then you can build your own (based on a PIC uC)
    www.hackaday.com


    Hope that gives you some lower cost options.

    Crazybillybob

    Let me know if I can help with anything.

  6. #6
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    I'm looking at that PCB for 20 char. Display...looks like it might be worth a shot, although i'd need to get someone to actually burn the board for me. Problem is that i don't think my Mobo has a pin output for serial, although im sure it does for USB, so i could keep everything internal...i'll keep looking. If it comes down to it, it'll be worth paying extra to get it to look just right, you know?

    Thanks for the pointers, hope to be on here soon with a kick-ass mod journal...

  7. #7
    Administrator OvRiDe's Avatar
    Join Date
    Dec 2005
    Location
    Tulsa, OK
    Posts
    4,586

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    I'm not sure if you have seen this thread or not, but it has some information that maybe be similar to what your are talking about when it comes to your display. The LCD that is discussed is a 40X2 LED backlit LCD. (There is a link to it on BGMicro). There are pictures of it in the posts. Also there is a link to a Hack-A-Day article with schematics for a Fast Serial Interface based on PIC controller along with the PIC code to make it work. Apparently this board will also work with Serial to USB adapter. I wanted to attempt to build the fast serial version but I do not have access to a PIC burner either..

  8. #8
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    I don't know if you guys have Maplin Electronics in the US, but there's one near to me (one advantage of living near the biggest commercial city in Scotland) and it's selling a USB interface module. It's just a board that interfaces with the USB port with plenty of output and input lines. It it has enough output lines and input lines, then this could be a good thing, it might be able to interface properly with a LCD display. Thanks for the link, i'll have a look at that USB serial interface-it might be the answer to my prayers.

    Servo motors are pretty expensive, and the door i want to open's going to be tiny-i was thinking about changing it to a tiny 3V motor or something and hooking up a little gearbox, with a contact that closes when the door is fully open and stops the motor. Then when the case powers down, i can just do the same thing in the opposite direction. The problem is it's going to take a couple more pins to set that up unless i do something really clever. The main problem is it's a sliding door. I've been thinking about mechanisms, and i think a sort of rack and pinion idea would be the way to go-any feedback on this would be appreciated. Thanks!

    -Dave

  9. #9
    Paradox Sausage DaveW's Avatar
    Join Date
    Nov 2005
    Location
    Scotland, UK (NOT England)
    Posts
    5,550

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    I've also had another crazy idea. I've got an old digital camera that doesn't work properly, anyone know how easy it would be to take the LCD screen out of that and use it? It's a graphic display, but in theory the interface is allready there...nah, that's just fantasy stuff, right? ...right?

  10. #10
    High-tech Redneck crazybillybob's Avatar
    Join Date
    Jun 2005
    Location
    Currently Homeless
    Posts
    1,028

    Default Re: PIC Programming, USB LCD and other questions...please make some suggestions!

    Quote Originally Posted by DaveW
    Servo motors are pretty expensive, and the door i want to open's going to be tiny-i was thinking about changing it to a tiny 3V motor or something and hooking up a little gearbox, with a contact that closes when the door is fully open and stops the motor. Then when the case powers down, i can just do the same thing in the opposite direction. The problem is it's going to take a couple more pins to set that up unless i do something really clever. The main problem is it's a sliding door. I've been thinking about mechanisms, and i think a sort of rack and pinion idea would be the way to go-any feedback on this would be appreciated. Thanks!

    -Dave
    Dave,
    We don't have Maplins here in the states (I wish we did, It's getting harder to find retail electronics parts and equipment here...The internet is our friend!)

    As for Servo's being expensive....? you can pick up a new one on Ebay for $12-15us for a standard size, less for smaller. And some of the UK guys sell them even cheaper! and you can run it on 1 I/O line (supply 5V and Gnd from Rails, and you just need the signal from the PIC) you only need a few oz so a standard will be more then enough. Now for the Sliding doors take a look @ Crimson Sky's Doom 3 Mod He used some parts from an old CDrom drive to make a Roll up (think Garage door) blast window, and a Clamshell Air lock (the air lock is driven with a servo) , this should give you some more to think about at least in designing the moveing parts of the doors.

    As for the LCD from the Digi.....More work than it's worth! You'd have to figure out how to drive it as most camras don't use a standard protocall to control the screens (ie not VGA or USB or Serial). You could pull it and see if it has it's own control chip, then look around to see if some one has an interface board (the interface boards to make say a laptop lcd work on your pc VGA are $200-$500 US...not very practical when a new 15" desktop LCD is $199 and will fit in the same places with a bit of modding!)

    Keep the Ideas flowing!!

    Crazybillybob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •