logo elektroda
logo elektroda
X
logo elektroda
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #121 5194606
    elektromen
    Level 10  
    can someone give something for totally green?
  • ADVERTISEMENT
  • #122 5205728
    witm1212
    Level 11  
    Hmm .. and what does it mean "for completely green"?
    I started the game not long ago and I use the design of this watch to learn all the programs needed to build it. In order to do it, I had to get to know the protel and so far the bascom, make the platesetter and master the production of the double-sided PCB for smd. I had to buy a suitable soldering iron and learn how to solder small things (I bought 603 leds by accident). And now I'm learning the basics of ASM and C because the author of the project wrote a program in C (unfortunately the attempt to "slim down" by kicking the graphics modes gives ~ 23kB of code so far, which is unacceptable for my Atmega16 - I also mistook the proc). My pre-written batch goes through the bascom demo, but it allows you to display only simple hints, but the synchronization after many battles is now working correctly :) . Now I am struggling to put the character generator in the eprom, and I will not fit in any way - and the program memory is not enough (bascom limit to 4kB). Certainly it will end up with switching to C or rewriting in assembly language - great material for learning about the construction and handling of a slingshot.
    Oh, a question for the author: why didn't he use hardware TWI to power the drivers ?? and is connecting the 33 led to this pin is dictated by some aspect? the gear to the other side would simplify the PCB by two jumpers ..
    to sum up - more willingness, although the project is not easy (at least for me)
    greetings
  • ADVERTISEMENT
  • #123 5206192
    elektromen
    Level 10  
    for totally green, it means for a person who has recently been interested in electronics and actually only looks at projects and has never touched a soldering iron of capacitor resistor plates, LEDs, etc.
  • #124 5240129
    mb1988
    Level 12  
    Hello everyone

    witm1212 wrote:
    Oh, a question for the author: why didn't he use hardware TWI to power the drivers ??

    I think the main reason was that these drivers are not communicating on the I2C bus :) . The control of the 33 LEDs with this pin was not dictated by any serious reasons. Just like that, the question of freedom, I had to hook up somewhere. If someone uses my schematics, please check if the board has a 10k resistor pulling the SQW line of the RTC under the VCC, because I'm not sure if I updated the board. And if someone has already made a PCB, there is no tragedy because, fortunately, the path system allows you to solder this resistor without dedicated pads (I did it).

    Regards
  • ADVERTISEMENT
  • #125 5267941
    formatyk
    Level 13  
    A very nicely made watch. I want to do it myself.

    What are DDB files for?
    and what is the size of the graphics, from the source I suppose some 192 x 80, but I don't know if I'm counting well?
  • #126 5271030
    mb1988
    Level 12  
    Hello.

    DDB files are Protel database files.

    As for the size of the graphics, the matter is as follows: on the radius of the plate there are 32 blue LEDs, which gives us 63 (!) LEDs in the diameter. What you see in the source is a converted 63x63 px monochrome square bitmap. The conversion consists in cutting a circle inscribed in the square. Since the propeller spins with a resolution of 240 steps per revolution, and we need 4 bytes to display one ray, we get the total size of one displayed frame: 240 x 4 = 960 bytes.
  • #127 5274072
    witm1212
    Level 11  
    Hello,
    I made the plate, and the fact with the timer interrupt is a problem because there is no pull-up. Unfortunately, in order for the RTC to unlock, I have to put more than 7V on the stabilizer and test the 15V power supply and pull to the 15V line (because the resistor can be soldered there conveniently) is probably a bit risky (is the line working as an interrupt input not pulled up internally?). Is it not possible, however, to use hardware TWI? or SPI? (only bare ASM commands?) because sending 4 bytes to drivers takes about 350 clock cycles! Unfortunately, my work has been suspended because I was building solar collectors and the plate is waiting for an improved model of power brushes (this is my serious problem). If someone is interested in it, I will throw in the initial program in BASCOM + ASM where I came to the implementation of the graphics mode. Everything together with the fonts fits into the demo version.
    Question: Can't the natural capability of AVR be used to support clock quartz and power saving modes? and with (I assume that it is possible) to use the hardware TWI, it would not be possible to get rid of the external quartz and go on the internal 8MHz?
    Could ULN amplifiers be used instead of drivers ...? or directly control leds from the port? (it's only a 5us impulse?).
    greetings.
  • #128 5306263
    bojlihal
    Level 2  
    Hi!
    I would like make the clock.
    I havn't find in Hungary MBI5170 IC but there are MBI5168 or MBI5169.
    Will it run properly with 5168 or 5169 ic's?

    Thank You!
  • #129 5306809
    mb1988
    Level 12  
    Yes, it will. Although these are different models the protocol is still the same.
  • #130 5337745
    bojlihal
    Level 2  
    Hi!
    Finally I built the clock, but it isn't work.
    Sucessfully write the program in atmega, but the led's isn't light.
    I use MBI5169CP ssop packaging.
    I spent a lot of time the clock and I would like use.
    Please help me!

    Dodano po 1 [godziny] 22 [minuty]:

    Hi!
    I discovered contact problem at atmega I fix it and the leds are light.
    But something wrong.
    I replan the board with ssop packaging and I extend the board and I use 1206 packaging LED's.
    Is it the wrong?

    Some picture:
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0006_www.kepfeltoltes.hu_.jpg
    [/url]
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0007_www.kepfeltoltes.hu_.jpg
    [/url]
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0008_www.kepfeltoltes.hu_.jpg
    [/url]
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0009_www.kepfeltoltes.hu_.jpg
    [/url]
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0013_www.kepfeltoltes.hu_.jpg
    [/url]
    [url=]
    http://kepfeltoltes.hu/view/080713/PIC_0017_www.kepfeltoltes.hu_.jpg
    [/url]
  • #131 5408861
    Sinistra
    Level 14  
    Hello, congratulations on the project, I can say that this is my favorite topic on the electrode: Spectral clocks. I have a question: how were the individual LED drivers connected? in series via UART or each separately? If it is at all possible to connect them separately ...

    Added after 23 [minutes]:

    okay sorry i found it.
    I was not logged in and couldn't see any links.
    but it still intrigues me: when you connect the controllers in series via SDI SDO, I read in the note that some time is wasted on it, is it not a problem for flashing?

    Oh, great admiration for mbi data transfer, and for writing this in general all . Regards.

    Added after 2 [minutes]:

    And also: at the bit level, how is the data transferred via mbi to the controllers? is it sending 8 bit words to them continuously, no other commands?

    sorry for all these questions, but i'm only learning ...

    Added after a few days:

    Ok, I know that too, but it took me a few days to study it. even more admiration ...

    you can learn a lot from these codes, that is thanks to the author :-)
  • #132 5573349
    krzykoz
    Level 12  
    Hello!
    I read the topic carefully and I am full of admiration for the author. It is true that I did not have time to view the program files and I do not have time for making the clock yet, but I wonder how the bitmap conversion is done?
    I imagine you have to convert 2D graphics stored in Cartesian system, which is XY to vector, right? How is it done? Do you take an angle and collect information about which bits are set and unplaced on the axis of this vector, and then translate that 1: 1 into a led ruler?

    Thanks for the answer, best regards.
  • #133 5619923
    mb1988
    Level 12  
    Exactly. The program positions 63x63 pixels in the middle of the bitmap. Then, by hooking the tracer at this point, I check whether the given bit is lit for a given angle (iteration every 1.5 degrees which gives 240 steps) and the appropriate distance from the center (0, 1, ..., 31). In this way, we cut a circle inscribed in it from a square bitmap.
  • #134 5624543
    Sinistra
    Level 14  
    I have one more question for the author,
    as is already known, I try to make such a watch, and learn more right away, but when I made a test chip, there were three st16cp05 processors, each controlling 16 LEDs, and I connected everything as it should be, I compiled the program:

    [code:1:24c2c192ea]
    #include
    #define F_CPU 10000000
    #define __OPTIMIZE__ s
    #include
    #define set_clk PORTB |= 0b00000001
    #define clr_clk PORTB &= ~0b00000001
    #define set_data PORTB |= 0b00000010
    #define clr_data PORTB &= ~0b00000010
    #define set_le PORTB |= 0b00000100
    #define clr_le PORTB &= ~0b00000100
    #define set_oe PORTB |= 0b00001000
    #define clr_oe PORTB &= ~0b00001000

    unsigned char linia [48]={0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,};


    int main()
    {
    DDRB = 0xff;
    PORTB = 0;
    signed char x=0;

    while(1)
    {
    set_clk;
    set_le;
    set_oe;
    clr_clk;
    for(x=48;x>=0;--x)
    {

    set_clk;
    if(linia[x]>=1)
    {
    set_data;
    }
    if(linia[x]
  • #135 5624890
    mb1988
    Level 12  
    I think the basic mistake you made is that you are trying to latch the data into a register with the falling edge of the clock, not as the documentation does, with the rising edge. This code should correctly display the contents of the array:
    #include  
    #define F_CPU 10000000 
    #define __OPTIMIZE__ s 
    #include  
    #define set_clk PORTB |= 0b00000001 
    #define clr_clk PORTB &= ~0b00000001 
    #define set_data PORTB |= 0b00000010 
    #define clr_data PORTB &= ~0b00000010 
    #define set_le PORTB |= 0b00000100 
    #define clr_le PORTB &= ~0b00000100 
    #define set_oe PORTB |= 0b00001000 
    #define clr_oe PORTB &= ~0b00001000 
    
    unsigned char linia [48]={0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,}; 
    
    
    int main() 
    { 
    	DDRB = 0xff; 
    	PORTB = 0; 
    	signed char x=0; 
    	 
    	clr_le; 
    	set_oe; // wyłączamy prąd diod - można, ale nie trzeba
    	clr_clk; 
     
    	for(x=48;x>=0;--x) 
    	{ 
    		clr_clk; 
    		if(linia[x] == 1) 
    		{ 
    			set_data; 
    		} 
    		else 
    		{ 
    			clr_data; 
    		} 
    		set_clk; // i tutaj zatrzaskujemy dane w rejestrze
    				 // zboczem narastającym
    	} 
    	
    	set_le; // zatrzaskujemy
    	clr_le; // dane w latchu
    		   
    	clr_oe; // włączamy prąd diod
    	
    	while(1);
    
    } 


    In order to save space, think also to code the state of 8 LEDs on one byte.

    PS
    Quote:
    ... I connected everything as it should be ...

    Assuming something like this is also a serious mistake: P.
  • #136 5625796
    Sinistra
    Level 14  
    It's perfect,
    I do not know how to thank, because I did not get to these "timing diagram" and "truth table".
    Oh and as for clr_oe, set_oe, I leave it on because it does not flash when changing when the clock sends information.

    Thanks again, it doesn't display exactly.

    Added after 13 [minutes]:

    As I already know how to do this, I drew a small array of arrays with a smiley face, and it works fine when (in my case) the LED plate is moving (because my test circuit isn't spinning). here is the code:
    unsigned char linia [8][10]={
    {0,0,1,1,1,1,0,0,0,0},
    {0,1,0,0,0,0,1,0,0,0},
    {1,0,1,0,0,1,0,1,0,0},
    {1,0,0,0,0,0,0,1,0,0},
    {1,0,1,0,0,1,0,1,0,0},
    {1,0,0,1,1,0,0,1,0,0},
    {0,1,0,0,0,0,1,0,0,0},
    {0,0,1,1,1,1,0,0,0,0}
    };
    
    int main()
    {
    DDRB = 0xff;
    PORTB = 0;
    signed char x=0;
    signed char y=0;
    
    while(1)
    {
    for(y=0;y=0;--x)
    	{
    	clr_clk;
    		if(linia[y][x]==1)
    		{
    			set_data;
    		}
    		if(linia[y][x]==0)
    		{
    			clr_data;
    		}
    	set_clk;
    	}
    set_le;
    clr_le;
    
    _delay_loop_2(300);
    }
    }
    }


    PS works fine, also if I made a mistake it's not great.
  • #137 5640375
    apocalipsis
    Level 1  
    Why is the clock lit and the output is off? that he doesn't?

    Unfortunately for Poland, bad, but someone can tell me my problem.

    The post was reported.
    Writing a post under a post.
    Use the CHANGE button.
    I merged two posts. [hefid]
  • #139 6154150
    mar614
    Level 12  
    Is this motor driver really the tda5410a? And not by coincidence tda5140a, because it also exists and is in datasheets.
  • #140 6156419
    kamson00
    Level 2  
    You have the TDA5140a on the front page :)
  • #141 6161911
    mar614
    Level 12  
    I know, I just couldn't find anywhere and the 5140 was so I thought it was a typo. It's hard to get such a driver.

    I found in tme LB1688, in pdf, is an example diagram, but I do not know if it will work.
  • #142 6180643
    Anonymous
    Anonymous  
  • #143 6209514
    Marek_Ertew
    Level 16  
    By changing the state of several ports together, there will be a slight delay between switching on of each of them.
    The ports must have adequate current capacity and a limiting resistor must be used for each of them.
  • #144 7108174
    hetm4n
    Level 20  
    question to the author: have you changed anything in this watch today? any improvement ?? external date setting ?? The big disadvantage of this clock is that someone without knowledge of the C language is unlikely to make it :(
  • #145 7110719
    mb1988
    Level 12  
    After your 396 posts, you should probably already know that there are no "gentlemen" in this forum :P . As for the watch, no new version was created, although I had a lot of thoughts, mainly about the power supply (coreless transformer) and data transmission to the device (IrDA, Bluetooth, or FM modulation of the power waveform). The minus mentioned by you, in my opinion, is not a minus of the device itself. I could just as well write that the downside of the device is that it will not be made by a person who has never had a soldering iron in his hand ;) .
  • #146 7121955
    mot
    Level 11  
    Is it possible to use the 555 timer for this project?
  • #147 7122363
    mlassota
    Level 18  
    mb1988 wrote:
    As for the watch, no new version was created, although I had a lot of thoughts, mainly about the power supply (coreless transformer) and data transmission to the device (IrDA, Bluetooth, or FM modulation of the power waveform).


    As for the power supply ... I tried to power your (in my version) watch with a coreless transformer, but either I moved in the too low frequency range (about 35 kHz) or I was unlucky - the fact was that it did not work - a block of aluminum from which it was made there is an overlay on the rotor that allows the mounting of the plate, he heated up quite strongly, while the power transferred to the secondary winding was small. I used a similar transformer in another watch - rotated with a fan and everything was ok.
    After a few more unsuccessful attempts and a collision between the board and "something on the table", I abandoned the project.
    For me, the biggest problem was showing the clock - 00:00:80 which I couldn't cope with because I didn't know the C language, but it's a different pair of wellies
  • #148 7122854
    mb1988
    Level 12  
    mot wrote:
    Is it possible to use the 555 timer for this project?
    Sure. I don't really know what role.
    mlassota wrote:
    the aluminum block from which the rotor overlay is made, which enables the mounting of the plate, heats up quite strongly, while the power transferred to the secondary winding was small.
    Just my main concern was the efficiency of the transformer, while inside the coils there would be an aluminum rotor of the motor. There were concerns that the device would be more suitable for an induction heater. The only solution would be to move the coils away from the body itself to minimize eddy current losses. As for your mysterious "00:00:80", I remember that it also showed up to me sometimes. The answer why this is happening can be found directly in the documentation:
    Quote:
    Bit 7 of Register 0 is the clock halt
    (CH) bit. When this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. He first
    application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00
    (MM / DD / YY DOW HH: MM: SS). The CH bit in the seconds register will be set to a 1.
    The 00h register is used to store seconds. Like most values in this clock, the seconds are also stored in BCD format. Bits [3: 0] are units of seconds, while bits [6: 4] are tens of seconds. As we read in the quoted fragment, bit 7 is a control bit that activates the operation of the oscillator. A simple software BCD decoder does not take into account that the older half of the seconds register is not entirely dedicated to storing the tens digit value. And that when the clock is on, we have set to bit 7 and the reading of the seconds always ends with a surprising value of 80 :) .
  • ADVERTISEMENT
  • #149 7263891
    HollowMen
    Level 11  
    Amazing project. I didn't know you could do something like that until I watched the video on YT. Everything makes an electrifying impression.

    I read the posts on the topic and from what I understood all this board with LEDs was made entirely by the author of the project. However, I would like to know if it is possible to buy a ready-made PCB with programmable LEDs somewhere.
    In matters of electronics, I only have theoretical knowledge (quite limited), and no practical knowledge. I used to program in Assembler, but only M8051, and in other languages I wrote / write only PC applications.

    Nevertheless, I would love to make something like this clock. It is true that in a very simplified version at the beginning, but still :)
    I also wonder how the connection between the PC and such a board is made. It is connected directly with some cable, or if an intermediary device is needed (for example, because of the possibility of burning the PC, because of a badly made PCB, etc.).
  • #150 7800620
    Scyzor
    Level 13  
    Hello.

    I built a watch based on this design with some changes:

    1.ATmega8 processor
    2. Instead of MBI chips I used 74HC595 chips
    3rd position sensor connected to the ICP1 input
    4. powering the clock via an air transformer.

    As for the code, the part responsible for displaying the whole thing is based almost entirely
    on the code of the author of the project (graphic display has been removed due to the one used
    processor).

    And unfortunately, despite many attempts and combinations with timers, the clock does not close the entire circle

    Spectral Clock - Propeller Clock

    The rotation speed of the clock is approximately 30 rpm. Timer prescaler set to 64 (at 8 no
    nothing is displayed).

    This is the position sensor interrupt procedure

    
    ISR(TIMER1_CAPT_vect)
    {
    	TIMER1_OFF;
    	TCNT1 = 0;
    	g_tick = ICR1 / RESOLUTION;
    	g_pos = 0;
    	OCR1A = g_tick;
    	TIMER1_ON;
    }
    


    Here is the procedure where everything is displayed

    
    ISR(TIMER1_COMPA_vect)
    {
    	if(g_pos < RESOLUTION) OCR1A = OCR1A + g_tick;
    
    // tutaj wyswietlanie
    // ....
    
    	Send4BytesT(buff);
    	_delay_us(20);
    	RED_OFF;
    	SET_OE;
    
    	g_pos++;
    }
    
    


    Could the author of the topic or someone from the forum members suggest what is wrong, because I don't have any ideas myself.

Topic summary

The discussion revolves around the design and implementation of a spectral clock using a propeller mechanism. The project utilizes an ATMEGA32 microcontroller to control 32 blue SMD LEDs via MBI5170 LED drivers, with timekeeping managed by a DS1307 RTC. Participants share insights on motor control, programming in C, and the challenges of achieving precise synchronization for the display. Various users inquire about the specifics of the circuit, including the use of different LED drivers, the programming process, and the durability of components. Suggestions for improvements, such as using a coreless transformer for power and implementing IR communication for time setting, are also discussed. The community expresses interest in obtaining schematics, PCB layouts, and a bill of materials for the project.
Summary generated by the language model.
ADVERTISEMENT