Construction of Word Clock v1

Rasprava o AVR mikrokontrolerima, AVR projekti i drugo vezano za AVR...

Moderators: pedja089, stojke369, trax, InTheStillOfTheNight

Post Reply
hibs
Posts: 8
Joined: 29-01-2013, 20:34

Re: Construction of Word Clock v1

Post by hibs »

Thank you very much, the temperature offset works great !!! Thanks for your time, I'm most appreciative :D Hopefully I'll be taking it to another Maker Faire in about a months time here in the U.K. to show your work.
trax wrote:Hibs, if you want an offset the displayed temperature use this function instead of the original:

Code: Select all

// display the temperature
void display_temp(void)
{
	// if we have something new to display / if the temperature has changed inside the RTC chip
	if( !bv(bRTC_TempChg,BAPP1) )
	{
		return; // we don't, so get outa here
	}

	// clear all but dots in the corners
	display_clear(1);

	/*
		// code from my "Warm Tube v2" project
		temp_MSB = temp_MSB & 0b01111111; // make it positive
		uint8_t fract = (temp_LSB >> 6);
		fract = fract * 25;
		display_digits[0] = (temp_MSB / 10);			// [D]D,D_
		display_digits[1] = (temp_MSB % 10);			// D[D],D_
		display_digits[2] = (fract / 10);				// DD,[D]_
		display_digits[3] = (fract % 10);				// DD,D[D]
	*/

	char temperature[10];
	sprintf(temperature,"%d^", (int8_t)RTC[TEMP_MSB] -2 ); // ^ - is a degree symbol :) HIBS INFO: Here you put offset you want, currently it is -2

	// finally send the text to display
	text_to_display(temperature,1,0);

	bc(bRTC_TempChg,BAPP1); // clear and wait for another second-change
	// we need to falsify other changes, so that the next function in line executes at least once
	bs(bRTC_MinChg,BAPP1);
	bs(bRTC_SecChg,BAPP1);
	// next one...

	return;
}
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Haha great :!:
:)
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

vszabi wrote:Unfortunately, I can not program in C language, which is why I asked for help. Thanks for the tip, but if some one could also apply to parts that alarm clock, you can not get along with those tubes hour project. :oops:

Can you help?
The menu should poke it to build up the alarm function ... I take it?
Here is the hardware you can add for the Alarm function so you can finish your clock for now. Later, when I get the time or if someone else adds functionality in firmware, you can just re-program your Atmel and have the alarm function.
Attachments
alarm_hardware.jpg
Alarm addon - hardware only
(103.7 KiB) Downloaded 4 times
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

trax wrote:
vszabi wrote:Unfortunately, I can not program in C language, which is why I asked for help. Thanks for the tip, but if some one could also apply to parts that alarm clock, you can not get along with those tubes hour project. :oops:

Can you help?
The menu should poke it to build up the alarm function ... I take it?
Here is the hardware you can add for the Alarm function so you can finish your clock for now. Later, when I get the time or if someone else adds functionality in firmware, you can just re-program your Atmel and have the alarm function.

Hello!

I do not think we understand each other perfectly. :( (Not a hardware implementation of the Program the problem is I do not know C language..

I thank you for the connection, exactly how I imagined.
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

I understood you correctly, don't worry.

My plan is this:

1. You build hardware with "alarm function" support
2. Sometimes in the future, when I find the time or someone else finds time, we can make firmware modifications and you will be happy :-)

That's it
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

trax wrote:I understood you correctly, don't worry.

My plan is this:

1. You build hardware with "alarm function" support
2. Sometimes in the future, when I find the time or someone else finds time, we can make firmware modifications and you will be happy :-)

That's it

Ok, that makes sense. Good plan! :) Thank you!
Then the AVR 3 feet of piezoelectric plan.

However, a LED was among the plans that will be a bell symbol shows that the alarm function is on-off switch.
This can be a fr ee foot to the MAX7219?
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Hello,
No, you can't use MAX chip for that.

There is a PORTD.5 (marked as "spare") and that PIN is fr*e. Actually all pins marked as SPARE* can be used for whatever you want later.

You can put LED there...

Regards,
Trax
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

trax wrote:Hello,
No, you can't use MAX chip for that.

There is a PORTD.5 (marked as "spare") and that PIN is fr*e. Actually all pins marked as SPARE* can be used for whatever you want later.

You can put LED there...

Regards,
Trax

Ok, I get it!
The PIN PORTD5 plan this indicator leds.

Szabi
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

vszabi wrote:
trax wrote:Hello,
No, you can't use MAX chip for that.

There is a PORTD.5 (marked as "spare") and that PIN is fr*e. Actually all pins marked as SPARE* can be used for whatever you want later.

You can put LED there...

Regards,
Trax

Ok, I get it!
The PIN PORTD5 plan this indicator leds.

Szabi

Hi Trax!
What's going on? It was time to deal with the alarm function?

Szabi
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Hello!

I'm in trouble, help!
Struggled with the problem of brightness calibration. Now been delivered the missing photoresistor and integrated. The problem is that it started in daylight showed the value of 17 hours. And I thought that daylight should show 99 to 1 so dark it started to play the resistor values. He also started the circuit that nothing was soldered to the light sensor into place. Since then, whatever I do the calibration menu, the numbers are spinning in no time, and one does not move from there. The brightness is so dim that it is almost invisible. I ruined anything? Does anyone have suggestions? Please help!
Oh, and someone to write the English equivalent of "zatamni" and "osvijetli" word? A google translation stupid and do not understand why there is two parts to the calibration.
Thx!

Szabi
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Hi,

I have tried to build your clock, and it went ok until i started it. I soldered it together as it suppose to and i got confused when the text didnt show as i gues it should be. Easy solved after some reserching, that the mapping was done as if you didnt solder it in the correct order. Removed it and it worked with the text.

Now i got the problem though.

The word clock is showing and go through, but then it comes and alter between temp and time. And this works for about 2 times, then the bottom right (7219 no:4) stops working. If i reset it works and once again efter the temp has been on for the second time this field stops showing any led.

Now to what i thought was the problem. I didnt have any 8Mhz crystals so i was setting a 16Mhz with the atmega instead, and i thought that this was the problem, tried to change the #define I2C_TWBR_VAL in wc.h, to 128, 64(standard) and 32, but no difference. It still has the problem of beeing dark after 2 times of the temp, with this value set to 32 it worked for a bit longer, but only 2 more temperature.

I also tried to change the I2C_TWSR_VAL but didnt see any improvment. What do you think, does it only work with a 8Mhz, or did i miss the code where to change this?

I have nothing else connected than the 7219, no button or corner LED or so that can interupt.

Kind regards
Robert
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Well, i forgot to mention the above F_CPU in the wc.h as I also tried to change to 16000000, forgot to write that. And a lot of different combination of those but still the same problem.

/Robert
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Hi Robert!
Sorry my English is a little ratty, but I understand the trouble to hang the clock and doing stupid things? I've done it, I finished it this weekend, I have just left the last aesthetic touches. The code is not the fault of the absolutely great! Me the "buttons" on the touch you fool it. Solution grounded. You can not measure the sensor properly and collect all the noise. In fact I have even done to the wire between the main board and I touch the shadow. Household aluminum foil glued paper and wrapped around the wire. I admit I do! The 8 MHz clock signal is good, no need to poke. The fuse is a bit high = D9 low= EE
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Oh, and do not use switch-mode power supply, has been killed by an AVR. Switching power supply inventions of the devil! :)
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

robertholmberg wrote:Well, i forgot to mention the above F_CPU in the wc.h as I also tried to change to 16000000, forgot to write that. And a lot of different combination of those but still the same problem.

/Robert
Robert, you can't use 16MHz crystal because MAX7219 maximum clock rate is 10MHz. You can use 10 at maximum but it is also not recommended. Find 8MHz crystal and use it :!:
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Good evening,

Thanks Trax, didnt know that. I just guessed it was something wrong, and you confirmed it. I really appriciate it, and will order a 8Mhz version now and will see if it works as good as it look.

Wish you all the best.
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Good evening,

Now i got the 8Mhz and changed from the older one (16Mhz). Sadly it didnt change a thing. Its the same problem. I then thought, maybe it broke something, so what i did was to change the ATmega for a new one, i reprogrammed it and i changed the MAX7219 (all 4), but no difference.

It doesnt matter what firmware i run, i compiled my own and tried the english one and of course your original one as well, but its all exactly the same problem. So with that i can at least say its not the code since it runs good for everyone else.

But since i now have been trying to exchange things with no success, i wonder if anyone could know what it might be that makes this happen.

My problem is that the last MAX7219 doesnt seem to work after a while, because its 8*8 LED doesnt light up after the initial Word clock text and after that it works sometimes for just a second and sometimes for 2 minutes, but once its dead, it doesnt work until I restart the Wordclock, and when i do it repeat and do exactly the same again.

For you to see the progress of how my clock works from start, the film is speeded up in 8*speed.
http://youtu.be/Gfh4pE_kC20

/Robert
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

robertholmberg wrote:Good evening,

Now i got the 8Mhz and changed from the older one (16Mhz). Sadly it didnt change a thing. Its the same problem. I then thought, maybe it broke something, so what i did was to change the ATmega for a new one, i reprogrammed it and i changed the MAX7219 (all 4), but no difference.

It doesnt matter what firmware i run, i compiled my own and tried the english one and of course your original one as well, but its all exactly the same problem. So with that i can at least say its not the code since it runs good for everyone else.

But since i now have been trying to exchange things with no success, i wonder if anyone could know what it might be that makes this happen.

My problem is that the last MAX7219 doesnt seem to work after a while, because its 8*8 LED doesnt light up after the initial Word clock text and after that it works sometimes for just a second and sometimes for 2 minutes, but once its dead, it doesnt work until I restart the Wordclock, and when i do it repeat and do exactly the same again.

For you to see the progress of how my clock works from start, the film is speeded up in 8*speed.
http://youtu.be/Gfh4pE_kC20

/Robert


Robert!
Where the LED is not working no-fault accident? I do not know what method you built in the matrix, such as I-Trax is done and when it all fell into place, I had a fault in it. So I do not even lit. Although I should not only light up where there is fault. I do not think that 128 LED shorted. Hmm broblémádon the thoughtful, but suddenly can not think of anything else. Is still very morning. :) If you like I will send you my translation tutorial, if you still have trouble with.
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Robert,
You probably have a faulty LED matrix with short-circuits in LED wiring. I had the same problem, sometimes MAX gets initialized and sometimes it stops working. Also, you should use shielded cables to connect MAX chips!

Please take some pictures of the back of your clock so I can see what's going on there.

One more thing, you must have decoupling capacitors on every MAX7221 (7219) IC and an electrolytic capacitor :!:
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Hi,

What i always find weird is that every time I restart the clock the text works perfect,

I will upload some pictures of the back of my clock.

What accident report ocj fault would it be? Anyway, i cant see any repost, it just dies and never come back on track, until i restart the clock. I have not lid, its an open back since I just want to learn and try and see if i can do it before i do a proper one. And the pcb (dont know the reall name, what its called) it all soldered on is also not the best, but i have been running with my knife to be sure there is no connections between the lead where is not suppose to be connections.

What translation do you have? I followed the one here and its schedules, and it works out ok for me, so im not sure if it would help, but yes, it would be nice, i can have a look.
Is it possible to send it here at the forum?

I used shielded cables 0,25mm. I cant see anywhere where it would be possible to short cut them, Because i guess its between the LED you ment it could be shortcutted, or where to the MAX?

Every MAX7219 has the folowing capacitors:
From + to Gnd: 0,1UF Ceramic
From + to Gnd: 220 uF Electrolyt


Im not sure if the ceramic is the one you point out to have there or do you need another one? Maybe a smaller one?


For the information, im using a 2Amp poweradapter, so the power should not be an issue.


The pictrues will follow since 5 was max in a post.
Attachments
Max7219 no 4
Max7219 no 4
IMG_9434.JPG (61.67 KiB) Viewed 14927 times
Atmel 328P under - 2
Atmel 328P under - 2
IMG_9433.JPG (68.59 KiB) Viewed 14927 times
Atmel328P under
Atmel328P under
IMG_9432.JPG (73.05 KiB) Viewed 14927 times
Atmel328P
Atmel328P
IMG_9431.JPG (66.83 KiB) Viewed 14927 times
Back side
Back side
IMG_9430.JPG (84.56 KiB) Viewed 14927 times
Post Reply