OpenSprinkler › Forums › Hardware Questions › DIY Kit Assembly Questions › Built and does not work
- This topic is empty.
-
AuthorPosts
-
March 14, 2013 at 6:27 am #22371
goldserveMemberI soldered everything perfectly, measured 5V and 3.3V but when I power on, I get nothing but black blocks on the LCD.
I was able to program the micro as seen below but still nothing.
E:My ProjectsOpenSprinkler>avrdude -c usbtiny -p m328p -F -U flash:w
:firmware1.8.2.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "firmware1.8.2.hex"
avrdude: input file firmware1.8.2.hex auto detected as raw binary
avrdude: writing flash (32768 bytes):
Writing | ################################################## | 100% 19.62s
avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against firmware1.8.2.hex:
avrdude: load data flash data from input file firmware1.8.2.hex:
avrdude: input file firmware1.8.2.hex auto detected as raw binary
avrdude: input file firmware1.8.2.hex contains 32768 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 12.46s
avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
E:My ProjectsOpenSprinkler>I suspect something is wrong with my fuses and it is not using the internal oscillator? Do you have any idea or the command to set up the fuses correctly?
March 14, 2013 at 7:08 am #23415
goldserveMemberI measured SCL and SDA voltage and it is only 3.9V when the micro is plugged in. When it is off, it measures 5V.
March 14, 2013 at 1:53 pm #23416
RayKeymasterThe binary size (32768) does not look right. It should be a few hundred bytes less than that. Note that if you are downloading 1.8.2.hex firmware as an individual file, you should use the ‘Raw’ file link in GitHub, not ‘Save File As’, or ‘Save Link As’. Here is the direct raw file link of firmware 1.8.2 for OpenSprinkler v1.4:
https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Controller/software/compiled/v1.4/firmware1.8.2.hexMarch 14, 2013 at 2:05 pm #23417
goldserveMemberI realized the note in the directory after that and downloaded the repro as a zip. Flashed 1.8.2 and 1.8.3 and it still doesn’t work. I am a EE by day so I’m pretty qualified to say something is wrong hardware wise. The enet chip seems to be drawing close to 1 watt in power. When I measure one side of the 49.9 bias resistors, one side measures 25 ohms expected and the other side 0.5. If the enet chip is not I’m, is the board supposed to boot? How can I tell if the firmware is running or not. Does the internal oscillator go to an external pin? I have an oscpoe. Thanks!
March 14, 2013 at 2:28 pm #23418
RayKeymasterJust to make sure we are on the same page: you said the LCD does not display any message, is that still the case after flashing the firmware the correct way? The fact that you can flash firmware means the MCU is up and running, and if so the LCD should display a ‘Connecting to the Network’ message, independent of whether the Ethernet controller is up running or not.
March 14, 2013 at 3:01 pm #23419
goldserveMemberNo messages. Just first row of black blocks even after flashing correct hex file.
March 14, 2013 at 4:06 pm #23420
RayKeymasterHmm, that’s very strange. For the LCD to display that message, it really just requires a running MCU and connections from the MCU to LCD. Some questions/suggestions:
– I assume you have hardware v1.4u, right?
– could you post the number of bytes written as reported by avrdude?
– check the connections from MCU pins to LCD, specifically the following (note the MCU pins are referring to the pin numbers on the body of the MCU, not the Arduino logic pin numbers):
(mcu pin to LCD pin):
2 -> E
3 -> RS
6 -> DB4
11 -> DB5
12 -> DB6
15 -> DB7March 14, 2013 at 8:49 pm #23421
goldserveMemberI’ll check this out today and post back.
Cheers!
March 14, 2013 at 10:56 pm #23422
RayKeymasterThere are a few other potential causes, for example:
– the LCD might be damaged, although this is very unlikely unless if you have reason to believe that it’s damaged by 24VAC
– the MCU’s reset line (pin 1) is for some reason held to ground, causing the MCU to remain in reset state (also very unlikely since you can program the MCU successfully).March 15, 2013 at 5:15 am #23423
goldserveMemberFlashed 1.8.2 again to show you the output and still doesn’t work.
E:!D Drive!My ProjectsOpenSprinkler>avrdude -c usbtiny -p m328p -F -U flash:w
:firmware1.8.2.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "firmware1.8.2.hex"
avrdude: input file firmware1.8.2.hex auto detected as Intel Hex
avrdude: writing flash (32678 bytes):
Writing | ################################################## | 100% 19.98s
avrdude: 32678 bytes of flash written
avrdude: verifying flash memory against firmware1.8.2.hex:
avrdude: load data flash data from input file firmware1.8.2.hex:
avrdude: input file firmware1.8.2.hex auto detected as Intel Hex
avrdude: input file firmware1.8.2.hex contains 32678 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 12.62s
avrdude: verifying ...
avrdude: 32678 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.March 15, 2013 at 5:24 am #23424
goldserveMember@ray wrote:
There are a few other potential causes, for example:
– the LCD might be damaged, although this is very unlikely unless if you have reason to believe that it’s damaged by 24VAC
– the MCU’s reset line (pin 1) is for some reason held to ground, causing the MCU to remain in reset state (also very unlikely since you can program the MCU successfully).I am applying a DC 12V using bench power supply and before I put in any chips, I measured 5V and 3.3V like in your tutorial. LCD does not seem to be dead. Pin 1 of MCU is pulled high to 3.3V.
At this point, i don’t know what could be wrong. Do you have a program I can flash to ensure the mcu is running? Usually i have a serial terminal that I can see if things are alive or not.
March 15, 2013 at 6:08 am #23425
goldserveMemberThere is something I really don’t understand.
In the schematics, the center taps for the enet jack with magnets is pin 6 and pin 3 but the datasheet for HR911105A says it is a type 9 schematics and pins 4 and 5 are center taps…
ENET JACK Schematics: ftp://imall.iteadstudio.com/Connector_Socket/DS_IM120814005.pdf
None the less, I look off the ENET jack with a solder sucker and now I no longer get a short between R4 and I get 50 ohms as expected. I stick back in the ENET chip and it is drawing 60mA on 12V input with everything plugged in except for enet jack.
Still, the LCD is not being initialized….giving up pretty soon…
March 15, 2013 at 11:01 am #23426
RayKeymasterLook, if you can upload a program, that means the MCU is alive: it has to be functional and respond to SPI in order to receive program data and send data back for verification. So I am pretty sure your mcu is alive. If you want to check this more explicitly, you can flash an Arduino program that toggle a digital pin and place an LED across that pin with ground to see if the LED is flashing. The easiest would be digital pins 16 and 17 (which are also analog pins A2 and A3), these two pins are accessible in the pin out area.
Regarding the Ethernet jack schematic: the one published online is for the previous version of 1.4u (which uses SparkFun Ethernet jack). The new 1.4u (Oct 2012 version) is using the same Ethernet jack as the SMT version 1.4s:
https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Controller/hardware/v1.4/smt/OpenSprinkler_v14_smt.png
If you take a look, it does show pin 4 and 5 as the center taps, which match the datasheet.You mentioned: ” I no longer get a short between R4 and I get 50 ohms as expected”, I am losing the context here: did you mention that you had a short before?
If you still can’t figure out the LCD problem, you are welcome to send the kit back to me so I can take a look. However, I am traveling out of the country today, and will be back Saturday next week.
March 15, 2013 at 2:10 pm #23427
goldserveMemberOkay. The jack and the board does not make sense then. If I install the jack, I get a short across the 49.9 resistor. Take the jack off and it is okay.
I will send it back this weekend. In the meanwhile, can you send out a verified kit to me again? I am anxious to finish this project. I was the order [email protected]. Thanks!
March 16, 2013 at 5:45 am #23428
RayKeymasterI am out of the country. Will take a look at your board after I get back Saturday next week.
To answer some of your earlier questions:
– all MCUs we ship are pre-programmed with the correct fuse bits. I assume yours are correct, otherwise you won’t be able to upload a program. in any case, did you by any change change the fuse bits?
– the default fuse bits set the MCU to use internal 8MHz RC oscillator. ‘Internal’ means it’s not connected to any external oscillator pins.
– The Ethernet controller typically draws about 180-200mA current during operation, so the power consumption is roughly 3.3V * 0.2 = 0.66 watt. Your measurement of 1 Watt does seem a bit high. How did you measure the power consumption?March 16, 2013 at 6:42 am #23429
goldserveMemberI tried changing the fuse bits to be sure. I followed the setting on your FAQ page regarding a new chip: avrdude -c usbtiny -p m328p -B 250 -F -U lfuse:w:0xe2:m -U hfuse:w:0xd1:m -U efuse:w:0x06:m
With the short across R4 (I still maintain bad ENET or wrong ENET jack), I was reading 0.1A using a 12V bench power supply. That just puts it over 1.2W which was quite high I thought. When I take out the enet jack and power the entire board now, I get 0.06A x 12V = 0.72W. Still, no MSG on LCD screen.
I’m sending back the completed board tomorrow. Enet jack is de-soldered.
March 17, 2013 at 6:32 am #23430
RayKeymasterYou don’t need to change the fuse bits unless if you are using an MCU that’s purchased separately elsewhere.
Regarding the power consumption: you need to discount the power loss on the switching regulator (about 75% efficiency regardless of the output/input voltage ratio) and the 5V->3.3V linear regulator (effectively 3.3/5 = 66% efficiency). For example, if the input voltage is 12V and current draw is 0.1A, the switching regulator will lose about 12 * 0.1 * 25% = 0.3 Watt, and the linear regulator will lose 12 * 0.1 * 75% * 34% = 0.31Watt. So about 0.61 Watt is wasted just on the voltage conversion.
March 17, 2013 at 7:15 am #23431
goldserveMemberYeah, I forgot about the conversion losses. Regarding the fuses, I tried everything and nothing worked. The package is on the way back to you anyways. Thanks!
March 23, 2013 at 9:20 pm #23432
RayKeymasterI just came back from vacation today and received your kit in the mail. Look, when I say ‘check the solder joints’, that’s exactly what I mean: check the solder joints! I flipped the PCB and immediately noticed that one pin of the LCD female header is not soldered at all (the 5th pin from the right). If you don’t believe me, here is a snapshot of your PCB before I did anything to it. After soldering that pin, and replacing the Ethernet jack (yours had a broken pin), everything is working fine now. I will send it back to you on Monday. The good thing is that your soldering quality is overall pretty good, unfortunately that one unsoldered pin took much of your and also my time.
March 23, 2013 at 11:15 pm #23433
goldserveMemberOh snap! I could have been enjoying my system 🙁 Thanks for taking your time!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › DIY Kit Assembly Questions › Built and does not work