Suck's Electronics
#1
Posted 25 November 2011 - 05:52 PM
I just wanted to update you on my current electronics project.
A couple of days ago I bought a PIC programmer.
It came as a kit, so it took me a while to build it.
I had quite some problems with it, because the cable to connect it to my PC had to be very special, and there didn't come one with the set, nor could I buy one anywhere. So I had to make my own cable.
But about an hour ago, I got it to work.
What it does:
With this thing you can program a microchip, which you can then use in any circuit you can think up.
Microchips are rather cheap, and they can give the same result as an arduino.
Right now I'm still trying to figure out how to program it.
I also have some parts being shipped here for a LED-cube.
I wanna make one myself, I thought up many cool tricks for it too.
So yeah, I'll give you an update when I have one!
Ps: I know, this might not be very knex-related, but it might lead into something that is!
-Suck.
#2
Posted 25 November 2011 - 08:38 PM
Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.
#3
Posted 26 November 2011 - 01:08 PM
But I read you can program it, so I became interested, because I like programming
( language basic untill now).
So what is a PIC programmer?
#4
Posted 26 November 2011 - 03:00 PM
I've always wanted to make or at least see an LED Cube. I hope you can do it!
Thanks! I'll make sure to give you guys some pictures and videos when it is done!
I just can't see what is that green thing used for.
But I read you can program it, so I became interested, because I like programming
( language basic untill now).
So what is a PIC programmer?
Haha, you were wrong there. The "green thing" aka a circuitboard, is there only to program a chip, which you can then take out and put it in a machine or a something. An arduino is practically just a chip with some easy connectors on it.
Another thing:
For the ledcube, I am still trying to figure out what the right size is.
I bought 300 leds, so the maximal size I can build is 6x6x6 leds.
As for the pins: I have some inventive way of using the electronics which allows me to use only a small amount of pins for a lot of leds. I have to use multiplexing in my code for that.
The formula for how many pins I need is the following:
pins = width(in leds) * dimensions.
since it is a cube, it has 3 dimensions, which leads to:
4x4x4 cube: 12 pins
5x5x5 cube: 15 pins
6x6x6 cube: 18 pins
There are some ways to save even more pins, which can be done from 6+ leds width.
That way I can save 3 more pins on the 6x6x6 cube. This does make the electronics a lot harder.
The chip I will be using has only 16 output pins, so I think the 6x6x6 cube is something I should rather not try.
But I don't know whether I'll build a 5x5x5 cube or a 4x4x4 cube.
A 4xcube saves me half of the leds, but with a 5x5x5 you can make much cooler movements.
Also, a 5x5x5 cube has a center-led, which also allows cooler movements.
But the programming on a 5x5x5 cube will be much harder.
So yeah, what should I do? Should I use the remaining 3 weeks it takes for the parts to ship to program an awesome code for the 5x5x5 cube, or should I take the easy way?
Edit: Oh, and 1 more thing: Never start using PIC programmers unless you are willing to spend days and days of googling and finding out how to get it working. It is really a lot of work, and therefor I recommend arduino to all of you, arduino is open source and there are way more tutorials online.
-Suck.
#5
Posted 26 November 2011 - 05:50 PM
v That would be cool...
Member of a few physics experiments; Orchestrator and/or Copyist for a few musicals.
#6
Posted 26 November 2011 - 07:15 PM
There is also this other thing I am thinking about... does it have to be a cube? Or would it also be cool if I would build like a 5x5x9 thing?
#7
Posted 28 November 2011 - 05:07 PM
It could be pretty cool if you could make a 3D-like text screen or something.
Also, the difference with PIC and Arduino is that the latter has circuitboards that allow you to use the microcontroller without any additional things.
PIC is indeed cheaper, but not meant as an introduction to basic electronics and microcontrollers.
However, PIC has the advantage that if you know how it all works, you can make very compact circuit boards.
#8
Posted 17 December 2011 - 08:11 PM
The ledcube will probably be controlled with Arduino after all. The coding for 125 leds is pretty big, and a PIC doesn't have much space. I might do some coaster-automation with this thing though. I'll see.
#9
Posted 22 December 2011 - 02:37 PM
A LOT of electronics. And for a very cheap price.
Overview:
100 transistors for €3,00 and 25 resistor-arrays for €1,00
4 IC's and some DC plugs, 10 for €1,10
Some IC-footers €1,00 for 13
300 leds for €5,55, yeah, that is cheap stuff!
40x 40pins female headers for €2,00 (!!!)
50x 40pins male headers for €1,90 (!!!), supercheap once more.
Also bought some DIP switches and voltage regulators. The regulators weren't deliverd though.
And that is why electronics do not need to be expensive at all
#10
Posted 26 December 2011 - 06:52 PM
This way of coding is way more complicated, but pretty fun to do.
What I made is a program for a LED-sign.
;******CONSTANTS****** STATUS equ 03h TRISA equ 85h TRISB equ 86h PORTA equ 05h PORTB equ 06h COUNT1 equ 20h COUNT2 equ 21h CMCON equ 1Fh REPEATS equ 22h W equ 00h ;******PORTS******* bsf STATUS,5 ;Go to Bank 1 MOVLW B'00000000' ;Set all PORTB to outputs MOVWF TRISB MOVLW B'11111111' ;Set all PORTA to inputs MOVWF TRISA MOVLW B'11010111' ;Load options for the PIC MOVWF 81h bcf STATUS,5 ;Go back to Bank 0 ;***PIC settings** MOVLW B'00000111' ;Turn the Comparator module off MOVWF CMCON _BODEN_ON EQU H'3FFF' ;Some other settings _BODEN_OFF EQU H'3FBF' _CP_ALL EQU H'03FF' _CP_75 EQU H'17FF' _CP_50 EQU H'2BFF' _CP_OFF EQU H'3FFF' _DATA_CP_ON EQU H'3EFF' _DATA_CP_OFF EQU H'3FFF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _MCLRE_ON EQU H'3FFF' _MCLRE_OFF EQU H'3FDF' _ER_OSC_CLKOUT EQU H'3FFF' _ER_OSC_NOCLKOUT EQU H'3FFE' _INTRC_OSC_CLKOUT EQU H'3FFD' _INTRC_OSC_NOCLKOUT EQU H'3FFC' _EXTCLK_OSC EQU H'3FEF' _LP_OSC EQU H'3FEC' _XT_OSC EQU H'3FED' _HS_OSC EQU H'3FEE' __CONFIG _BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _XT_OSC GOTO Program ;***Main loop*** Program CLRF PORTB ;Turn all leds off MOVLW D'10' MOVWF REPEATS Label1 CALL INVERT ;Invert all leds: If they were on, they will go off and vice versa DECFSZ REPEATS,1 ;Do that 10 times GOTO Label1 MOVLW D'5' MOVWF REPEATS CLRF PORTB Label2 CALL UPDOWN ;Now let the leds go night-rider style DECFSZ REPEATS,1 ;Do that 5 times GOTO Label2 MOVLW B'00101010' ;Now turn the leds alternately on MOVWF PORTB MOVLW D'30' MOVWF REPEATS Label3 CALL INVERT ;Invert all leds DECFSZ REPEATS,1 ;Do this 30 times GOTO Label3 CLRF PORTB ;Turn all leds off COMF PORTB,1 ;And immediately invert this MOVLW D'10' MOVWF REPEATS Label4 CALL DELAY_ROUTINE ;Let them stay on for a while DECFSZ REPEATS,1 GOTO Label4 goto Program ;And go back to the beginning ;***UPDOWN routine**** UPDOWN BSF PORTB,0 Point1 BTFSC PORTB,5 GOTO Point2 RLF PORTB,1 BCF PORTB,0 CALL DELAY_ROUTINE GOTO Point1 Point2 BTFSC PORTB,0 return RRF PORTB,1 BCF PORTB,7 CALL DELAY_ROUTINE GOTO Point2 return ;*****ONOFF routine**** INVERT COMF PORTB,1 CALL DELAY_ROUTINE CALL DELAY_ROUTINE return ;***Delayloop**** DELAY_ROUTINE MOVLW D'255' MOVWF COUNT2 DEL_LOOP1 MOVLW D'255' MOVWF COUNT1 DEL_LOOP2 DECFSZ COUNT1,1 GOTO DEL_LOOP2 DECFSZ COUNT2,1 GOTO DEL_LOOP1 return GOTO Program END
I'm gonna add some more features, but so far I think it is going pretty great.
I have also been experimenting with inputs, and that is working out fine too.
Maybe I will automate a coaster with this later on.
#11
Posted 27 December 2011 - 05:29 PM
-snip-
Totally worth it because of the prices, but I love the service in the store at my town. Besides, the guys know me there, so having a chat is always nice.
Nope, you can't convert me yet
The programming language reminds me of Basic or Pascal...
SSCoasters Administrator
Read The Forum Rules(smart)
#12
Posted 30 December 2011 - 04:46 PM
So, there is this project I have been working on. It is a driver for a light-sign (like on Looping Star). It is standalone, features 12 outputs (500mA each) and is very compact.
I might sell these, if enough people are willing to buy.
Here are some pics of the result:
I will add a testvideo soon, but I have already tested it and it is functional!
#13
Posted 30 December 2011 - 05:14 PM
SSCoasters Administrator
Read The Forum Rules(smart)
#14
Posted 21 January 2012 - 08:53 AM
Well, atleast I got 1 comment;)
So here is the testvideo I promised, maybe my awesome Dunglish will get some more comments.
#15
Posted 21 January 2012 - 09:24 AM
Btw, this is just about the speed I want for the one I ordered. And now I edit this post I came to my senses and realised that I got loads of A's left on my 5V line but not so much on my 12V line I need to do some calculations first before I order, though
SSCoasters Administrator
Read The Forum Rules(smart)
#16
Posted 21 January 2012 - 09:30 AM
#17
Posted 21 January 2012 - 09:33 AM
SSCoasters Administrator
Read The Forum Rules(smart)
#18
Posted 21 January 2012 - 10:33 AM
I would really like to buy one if you can get the output voltage at 12 V. Any idea about the price so far ?
#19
Posted 21 January 2012 - 11:01 AM
For those of you who are interested:
Give me the following specifications of what you want it to do:
*How many channels do you want it to have? (1-13)
*Do you want it with voltage regulator, so it can handle voltages from 5-25 Volts?
*Do you want the blue screwterminals for or are you ok with regular headers?
*Do you have any special requirements? For instance: Do you want an on/off switch or a speedcontroller or a button to switch through different programs?
*Are you going to solder it yourself, or do you want me to do it for you?
*Do you want a specific program for it, or are you okay with the default program? (Note: I have not yet finished this program, but I will post a video soon)
If not: Post the program you wish to have like this:
Based on this, I will make up a price for you.
Note: I have practically no profit on this. So don't expect me to have everything done within a day.
#20
Posted 23 January 2012 - 05:32 PM
You have a pin, connected to a header, and connected to a capacitor which is connected to ground. You will have 1 header at each side of the header that is connected to the pin. 1 of those is 5V, one of those is GND.
There are 3 states to be read: Not Connected, GND, and 5V.
First you want to read the NC state. You do this by setting the pin to output first, and then driving it high. After that, you set it to input. If you read high, you will go to the next step. Which is setting the pin back to output and drive it low. After that you set the pin to input and if you read 0, you know that it is not connected.
The other states are fairly simple. Read the pin, if it is low it is connected to ground, if it is high it is connected to 5V.
So what can I do with this, you may ask. Well, I can use this to give you multiple possibilities for your programs. For instance, 1 program with only 6 outputs, 1 program with 8, and 1 with 12. Or 3 programs that have a completely other sequence. This means that you will have a 3-in-1 light-sign driver!