Warm Tube Clock sat v2
Moderators: pedja089, stojke369, [eDo], trax
Re: Warm Tube Clock sat v2
project on hold (again) until the new multimeter arrives next week.
Re: Warm Tube Clock sat v2
OK, do you mind posting some photos of the clocks mainboard until then?
Re: Warm Tube Clock sat v2
Here are the 3 main boards.
Re: Warm Tube Clock sat v2
It looks OK from here
Nice work!
Just make sure you don't have short-circuited pins in DS3231 RTC clock IC.
Nice work!
Just make sure you don't have short-circuited pins in DS3231 RTC clock IC.
Re: Warm Tube Clock sat v2
It is some sloppy soldering but I checked to make sure there were no short circuits.trax wrote:It looks OK from here
Nice work!
Just make sure you don't have short-circuited pins in DS3231 RTC clock IC.
Do I have to programe the Atmega ic with the firmware?
Re: Warm Tube Clock sat v2
YES!Niall wrote:Do I have to programe the Atmega ic with the firmware?
And also with CLKOUT fuse enabled! This provides the required clock for the LED driver IC. Please find the fuses-image-screenshot in this topic, somewhere
If you fail, let me know and I will look it up.
Re: Warm Tube Clock sat v2
Cool, another new process to learn. (hello youtube tutorials) I will search for fuse image screen shots.trax wrote:YES!Niall wrote:Do I have to programe the Atmega ic with the firmware?
And also with CLKOUT fuse enabled! This provides the required clock for the LED driver IC. Please find the fuses-image-screenshot in this topic, somewhere
If you fail, let me know and I will look it up.
Re: Warm Tube Clock sat v2
Wow, a whole new world of stuff to learn.
Quick question to narrow my research field...
You said in an earlier post you are using a AVR programmer from mikroelectronika and I see other AVR programmers like the AVR dragon. For me, as this will be the only time I program an AVR, it would make more sense to go via an arduino, bread board and a AVR usb cable, there is the likely hood I could use the arduino for a future project. Would this be more complicated?
Sorry about this, it seemed I only needed to be guided through the physical assembly of the board but now I will be annoying for information about the programming
Quick question to narrow my research field...
You said in an earlier post you are using a AVR programmer from mikroelectronika and I see other AVR programmers like the AVR dragon. For me, as this will be the only time I program an AVR, it would make more sense to go via an arduino, bread board and a AVR usb cable, there is the likely hood I could use the arduino for a future project. Would this be more complicated?
Sorry about this, it seemed I only needed to be guided through the physical assembly of the board but now I will be annoying for information about the programming
Re: Warm Tube Clock sat v2
Well, that might be a bit of a problem then. You see, Arduino uses a bootloader to program itself, whilst the Warm Tube Clock project is not compatible with Arduino and it can't be programmed with a bootloader method.
You actually need an ISP AVR programmer. However, you might be in luck because you can actually use Arduino to program the AVR chip in ISP mode. I did not try this, but they say it works:
https://www.arduino.cc/en/Tutorial/ArduinoISP
http://forum.arduino.cc/index.php?topic=125248.0
http://hardwarefun.com/tutorials/use-ar ... ontrollers
Bottom line: You need to program your AVR chip with the HEX file that is provided in the project files of the Warm Tube Clock.
Let me know if this makes sense to you.
You actually need an ISP AVR programmer. However, you might be in luck because you can actually use Arduino to program the AVR chip in ISP mode. I did not try this, but they say it works:
https://www.arduino.cc/en/Tutorial/ArduinoISP
http://forum.arduino.cc/index.php?topic=125248.0
http://hardwarefun.com/tutorials/use-ar ... ontrollers
Bottom line: You need to program your AVR chip with the HEX file that is provided in the project files of the Warm Tube Clock.
Let me know if this makes sense to you.
Re: Warm Tube Clock sat v2
Thanks Trax, I understand the basic concept of what is needed. I just have to read more and get familiar with exactaly whats going on.
Quite a few tutorials about using an arduino and bread bord as an ISP, but I even found this one for putting hex code on Atmega chips which skips the arduino altogether, using a USBasp and software.
https://www.youtube.com/watch?v=jcDS8iaYS_Q
Quite a few tutorials about using an arduino and bread bord as an ISP, but I even found this one for putting hex code on Atmega chips which skips the arduino altogether, using a USBasp and software.
https://www.youtube.com/watch?v=jcDS8iaYS_Q
Re: Warm Tube Clock sat v2
If I am not mistaking, there are AVR programmers for burning the HEX on eBay for just a few $, maybe even $3 with shipping! That is crazy cheap
Maybe something like this would work: http://www.ebay.com/itm/USBASP-ISP-AVR- ... TBtzLxcn8g
You can investigate that...
Maybe something like this would work: http://www.ebay.com/itm/USBASP-ISP-AVR- ... TBtzLxcn8g
You can investigate that...
Re: Warm Tube Clock sat v2
I was looking at those, compatible with atmega 328, for that price its worth a try.
Re: Warm Tube Clock sat v2
So I bought it, now 30 day wait til it comes form China and I familiarize myself with how to program the AVR.
Re: Warm Tube Clock sat v2
My new multimeter arrived today . And so I re ran the tests that are in the final pages of the mainboard assembly on all 3 of my mainboards.
Test 1. With only the 3v battery check across point 7 and 22 of the Atmega ic socket. It should read 3v but it reads nothing for any of them.
Test 2 With the power supply connected across the same points 7 to 22 it reads 4.9v on all 3
Test 2a from the +battery to the voltage stabilizer it should read 3v, but it reads 1.02v on 2 of the mainboards and 0 on the 3rd mainboard
Test 3 Voltage stabilizer to the +C14 (1uf 250v) reads 11.24v on all 3.
My highly unqualified conclusion is that the back up circuit has a problem. I really hope it has nothing to do with the DS3231 RTC clock IC.
Test 1. With only the 3v battery check across point 7 and 22 of the Atmega ic socket. It should read 3v but it reads nothing for any of them.
Test 2 With the power supply connected across the same points 7 to 22 it reads 4.9v on all 3
Test 2a from the +battery to the voltage stabilizer it should read 3v, but it reads 1.02v on 2 of the mainboards and 0 on the 3rd mainboard
Test 3 Voltage stabilizer to the +C14 (1uf 250v) reads 11.24v on all 3.
My highly unqualified conclusion is that the back up circuit has a problem. I really hope it has nothing to do with the DS3231 RTC clock IC.
Re: Warm Tube Clock sat v2
I am currently stuck at programming the Atmel.
To program I bought an usbasp device with a 10 pins flat cable. It also had a program board with a zif socket which is too wide, so the 328p doesn't fit in.
Therefore I made a programmer board, using this circuit
(full page is here: Link
When I try to connect with Avrdude I get this output:
sudo avrdude -v -c usbasp -p m328p
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xc817a8
avrdude: Expected signature for ATmega328P is 1E 95 0F
Could the problem be that the circuit for the programmer board is for ATmega328 and I have a 328P?
Are there other ways to program the atmel? Like using an Arduino (I have an Uno laying around)
To program I bought an usbasp device with a 10 pins flat cable. It also had a program board with a zif socket which is too wide, so the 328p doesn't fit in.
Therefore I made a programmer board, using this circuit
(full page is here: Link
When I try to connect with Avrdude I get this output:
sudo avrdude -v -c usbasp -p m328p
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xc817a8
avrdude: Expected signature for ATmega328P is 1E 95 0F
Could the problem be that the circuit for the programmer board is for ATmega328 and I have a 328P?
Are there other ways to program the atmel? Like using an Arduino (I have an Uno laying around)
Re: Warm Tube Clock sat v2
It is true that these two have different signatures, so programmer isn't getting what it is expecting.hetoosten wrote:Could the problem be that the circuit for the programmer board is for ATmega328 and I have a 328P?
You can set your avrdude to program m328 and see what happens. The HEX code should work just fine in 328 and 328P!
Re: Warm Tube Clock sat v2
This is good news. There should be no power here from the 3V battery. The AVR does not run on 3V battery, only DS3231 RTC IC.Niall wrote:Test 1. With only the 3v battery check across point 7 and 22 of the Atmega ic socket. It should read 3v but it reads nothing for any of them.
This is also good news. So far so good.Niall wrote:Test 2 With the power supply connected across the same points 7 to 22 it reads 4.9v on all 3
This I do not quite understand. What are you attempting to measure here? Anyway, all three boards should behave identically.Niall wrote:Test 2a from the +battery to the voltage stabilizer it should read 3v, but it reads 1.02v on 2 of the mainboards and 0 on the 3rd mainboard
This is also good news, since ATmega is not connected or does not have firmware programmed. Once the firmware is there, at C14 you should see high voltage! This is all good.Niall wrote:Test 3 Voltage stabilizer to the +C14 (1uf 250v) reads 11.24v on all 3.
You just need to explain a bit more what are you doing in your test 2a, and see why all boards do not behave the same.Niall wrote:My highly unqualified conclusion is that the back up circuit has a problem. I really hope it has nothing to do with the DS3231 RTC clock IC.
If I were you, I would load HEX into the ATmega328P and see what happens with the high voltage generator. Do not shock yourself.
Re: Warm Tube Clock sat v2
@trax thank you for the reply!
I tried lots of different combinations. The returned id does not exist. I suspect the USBasp device is broken.
I had more luck with my Arduino uno. I connected the 328P, using the 6pins ICSP header, and Arduino-isp
I added two extra wires to the 328P: 1x 5v to pin20 and Ground to pin 22
Command:
sudo avrdude -P /dev/ttyUSB0 -c arduino -p m328p -v -e -U flash:w:wt2_IN14_shield.hex
I am only confused what to do with the fuses.
I tried lots of different combinations. The returned id does not exist. I suspect the USBasp device is broken.
I had more luck with my Arduino uno. I connected the 328P, using the 6pins ICSP header, and Arduino-isp
I added two extra wires to the 328P: 1x 5v to pin20 and Ground to pin 22
Command:
sudo avrdude -P /dev/ttyUSB0 -c arduino -p m328p -v -e -U flash:w:wt2_IN14_shield.hex
I am only confused what to do with the fuses.
More info: https://learn.sparkfun.com/tutorials/in ... bootloaderOutput:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: erasing chip
avrdude: reading input file "wt2_IN14_shield.hex"
avrdude: input file wt2_IN14_shield.hex auto detected as Intel Hex
avrdude: writing flash (15060 bytes):
Writing | ################################################## | 100% 2.34s
avrdude: 15060 bytes of flash written
avrdude: verifying flash memory against wt2_IN14_shield.hex:
avrdude: load data flash data from input file wt2_IN14_shield.hex:
avrdude: input file wt2_IN14_shield.hex auto detected as Intel Hex
avrdude: input file wt2_IN14_shield.hex contains 15060 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.71s
avrdude: verifying ...
avrdude: 15060 bytes of flash verified
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK (H:00, E:00, L:00)
avrdude done. Thank you.
Re: Warm Tube Clock sat v2
OK, it looks like it will work.
Please see the attachment from my programmer software to see which fuses you need. After you saw them, you should access this page to do the same and get the three bytes you need (three fuse bytes): http://www.engbedded.com/fusecalc/
This is what I got when I set the fuses in this calculator:
-U lfuse:w:0x96:m -U hfuse:w:0xd9:m -U efuse:w:0xfd:m
Please see the attachment from my programmer software to see which fuses you need. After you saw them, you should access this page to do the same and get the three bytes you need (three fuse bytes): http://www.engbedded.com/fusecalc/
This is what I got when I set the fuses in this calculator:
-U lfuse:w:0x96:m -U hfuse:w:0xd9:m -U efuse:w:0xfd:m
I never used avrdude so I can't help more than this.paste this option string into your avrdude command line. You may specify multiple -U arguments within one call of avrdude.
Re: Warm Tube Clock sat v2
Thank you! that was very helpful. I used this command to program:paste this option string into your avrdude command line. You may specify multiple -U arguments within one call of avrdude.
sudo avrdude -P /dev/ttyUSB0 -c arduino -p m328p -v -e -U lfuse:w:0x96:m -U hfuse:w:0xd9:m -U efuse:w:0xfd:m
I got error messages, but the fusecalculator website already warned this would happen. I will try the avr on my nixie mainboard now Let see what happens.