In wall light switch node - Custom PCB
-
I can now rule out my previous thoughts of the capacitor on the DTR line being too far away from the FTDI connector, i just moved its placement and it doesn't change a thing. Still getting the protocol error.
@samuel235 I looked again at your board and saw that your DTR trace was routed very near Rx. Did your "move" of C7 had it's own wire from serial adapter, i.e. bypassed and unconnected to DTR trace on board?
I also pressume you've double checked value and functionality of C7. -
@samuel235 I looked again at your board and saw that your DTR trace was routed very near Rx. Did your "move" of C7 had it's own wire from serial adapter, i.e. bypassed and unconnected to DTR trace on board?
I also pressume you've double checked value and functionality of C7.I completely moved C7 and infact i attached it to the under side of the DTR pin on the FTDI header, then ran a wire to the pad that C7 WAS attached to (the uC side). I made sure it was not shorting on anything else in its vicinity.
I do understand the functionality and the value needed for this cap. The need for this cap is to essensially pull the RESET line low for a split second by discharging the cap and then the vcc line with the pullup resistor charges the cap back to full then pulls the reset pin high. This process then tell the uC to restart itself.
The only thing left for me to try is increasing the size of that cap. I have a 4.7uF cap in my inventory that i will attempt to change out. But i have read that everyone uses a 0.1uF and its very very unlikely that it needs to be higher. My case might just be that 0.1% that does.
-
I completely moved C7 and infact i attached it to the under side of the DTR pin on the FTDI header, then ran a wire to the pad that C7 WAS attached to (the uC side). I made sure it was not shorting on anything else in its vicinity.
I do understand the functionality and the value needed for this cap. The need for this cap is to essensially pull the RESET line low for a split second by discharging the cap and then the vcc line with the pullup resistor charges the cap back to full then pulls the reset pin high. This process then tell the uC to restart itself.
The only thing left for me to try is increasing the size of that cap. I have a 4.7uF cap in my inventory that i will attempt to change out. But i have read that everyone uses a 0.1uF and its very very unlikely that it needs to be higher. My case might just be that 0.1% that does.
@samuel235 If you mean the Ftdi header on the board, then it was still connected to that trace. Try bypass it completely and connect straigth from your serial adapter to cap to resetpin.
-
@samuel235 If you mean the Ftdi header on the board, then it was still connected to that trace. Try bypass it completely and connect straigth from your serial adapter to cap to resetpin.
@m26872 Of course it would, silly me. I have now ammended that and still nothing. I'm about to swap out that cap for a 4.7 to see if that does it. This is how i have it setup to test what you pointed out:


Photographing my board under x25 magnification makes it look very amateurish and dirty :(
-
Does anyone have another bootloader that works with the atmega328p-au clocked using the internal oscillator at 8MHz? I just want to double check it isnt my bootloader playing up with the clocking speeds. That or a boards.txt section for this setup. I will edit my own later but i would just like to double/triple check it with one that has been made from someone other than myself to rule out any silly errors.
-
Scrap that idea, my Arduino Pro Mini is working perfect with the exact same fuse settings, boards.txt entry and sketch.
-
So after several discussions with some atmel information being thrown around over the arduino forums i have came to the point where i have now found out that using the internal oscillator will not always allow serial connections/uploads to work properly. So, at the moment to test this, i burnt the sketch using 'upload via programmer' and then unplugged the board and re-connected using FTDI connections. I then opened the serial monitor and its working perfect. Next up is to figure out some information regarding crystals. With the whole board running on a coin cell my main point was to have the power consumption as low as possible. Could anyone give me some information or websites regarding oscillators, i would like to know if they use any extra power consumption compared to using the internal crystal of the atmega328p-au.
I have two options for this board where i would like to take it;
- Add an external crystal and allow users to upload via FTDI without having to touch the ISP connection/burning a new bootloader.
- Keep the internal crystal in use, and instruct the users to upload via ISP with the programmer and then debug using serial connection.
-
I'm now sitting with two of these boards in front of me giving me an "Starting sensor (1.6.0-beta), Radio init failed. Check wiring.". As i already have experienced this, i do know that 9/10 times this is hardware related. Normally incorrect wiring. Time to troubleshoot this for the second day. I'm pretty sure that i have no shorts on the board, the only thing that i can think it could be is a broken radio, but with the two doing this i'm a little skeptical about that.
-
So here we have it guys, Revision 2 is now complete, tested and working perfectly! Its been a grueling process but so rewarding. I plan on making a few tiny little changes, including some headers/jumpers to allow ISP uploads while the radio is attached and pull-up resistors to the switch lines. I will get these all ironed out in the next few days and get the designs sent off to get the final boards manufactured. However, I don't feel that there is a great rush for this last board as the upgrades are very minor ones that won't effect its usability right now. The files on the original post are all up to date and relevant including the schematic. I'm yet to test the current draw, I'm trusting that it is sleeping in between the switch toggles, would this be tested via the current draw, if so where should it be measured to confirm this?
Here are a few photographs of the final board attached to a switch plate:



-
Hi,
I'm trying to order this PCB pre-assembled from itead.cc, but it requires Gerber and BOM files, none of which are found in the Eagle files zip...
Any idea how can I get this PCB pre-assembled?
-
Hi,
I'm trying to order this PCB pre-assembled from itead.cc, but it requires Gerber and BOM files, none of which are found in the Eagle files zip...
Any idea how can I get this PCB pre-assembled?
I'm affraid i don't have this board set up with any distributor for pre-assembly sales. The only option to get this board pre made would be for me (or anyone else willing to build the board) to build the board for you then mail to you. I can supply you with the gerber files and everything needed to purchase the board and a BOM then you can build the board yourself if thats possible.
-
I'm affraid i don't have this board set up with any distributor for pre-assembly sales. The only option to get this board pre made would be for me (or anyone else willing to build the board) to build the board for you then mail to you. I can supply you with the gerber files and everything needed to purchase the board and a BOM then you can build the board yourself if thats possible.
@samuel235
That is a shame, this looks like exactly what I was looking for, though the assembly is way over my head. This is why I was hoping to get it pre-assembled...I can handle the basic soldering of a capacitor or varistor, but not their miniature versions, not to mention the atmega chip...
-
I'm affraid i don't have this board set up with any distributor for pre-assembly sales. The only option to get this board pre made would be for me (or anyone else willing to build the board) to build the board for you then mail to you. I can supply you with the gerber files and everything needed to purchase the board and a BOM then you can build the board yourself if thats possible.
@samuel235 said:
I'm affraid i don't have this board set up with any distributor for pre-assembly sales. The only option to get this board pre made would be for me (or anyone else willing to build the board) to build the board for you then mail to you. I can supply you with the gerber files and everything needed to purchase the board and a BOM then you can build the board yourself if thats possible.
I'd appreciate the gerber and BOM files, though!
Could you add a link to them in the first post? -
@samuel235 said:
I'm affraid i don't have this board set up with any distributor for pre-assembly sales. The only option to get this board pre made would be for me (or anyone else willing to build the board) to build the board for you then mail to you. I can supply you with the gerber files and everything needed to purchase the board and a BOM then you can build the board yourself if thats possible.
I'd appreciate the gerber and BOM files, though!
Could you add a link to them in the first post?@Sefi-Ninio - Soon as i get home from work tonight i will get that sorted for you. However i do advise you waiting for revision 3 to come out as currently a new sketch/program can't be uploaded to the uC while the radio is attached.
-
@Sefi-Ninio - Soon as i get home from work tonight i will get that sorted for you. However i do advise you waiting for revision 3 to come out as currently a new sketch/program can't be uploaded to the uC while the radio is attached.
@samuel235 said:
@Sefi-Ninio - Soon as i get home from work tonight i will get that sorted for you. However i do advise you waiting for revision 3 to come out as currently a new sketch/program can't be uploaded to the uC while the radio is attached.
Thanks!
When do you think rev. 3 will come out and tested? -
Depending on my full-time job workload, I'm hoping to have the designs completed and sent off for manufacturing by sunday, but then we face the 3 week wait for the shipping, and then the testing +/- a week for constant testing measures.
-
Other than re-designing pretty much all of my board to allow for jumpers on the SPI lines that collide with the nRF24 lines, to allow for SPI uploads, how else would you go about this?
The other option would be to run with a 8MHz external crystal to allow my FTDI Serial header to upload sketches. Which if i'm honest, I'de rather not do due to power consumption (If it was a case of using a 16MHz crystal the power consumption would be worth the clock speed increase to get the uC back to sleep quicker, but on wake the uC only have one thing to process then it will go back to sleep anyway, it isn't like it has a lot to process before sleeping again).
-
OK then,
But a thought: if instead of soldering the radio to the PCB, we solder female pins? That way we can easily detach the radio when we want to flush new sketch and attach again. -
OK then,
But a thought: if instead of soldering the radio to the PCB, we solder female pins? That way we can easily detach the radio when we want to flush new sketch and attach again.@Sefi-Ninio - This was a plan of mine right from the start as stated in a few of the early comments. However, to me, this is not an option due to the height restrictions on the board. I really want to keep this as thin as possible to accommodate for various 'new' style switches that take up more than normal ones in terms of the depth of the back box.
I would turn the radio round and stack it on top of the coin-cell but i do not want to be battling with any interference, it will have enough to contend with being nested inside of a metal backbox as it is.
-
@Sefi-Ninio - This was a plan of mine right from the start as stated in a few of the early comments. However, to me, this is not an option due to the height restrictions on the board. I really want to keep this as thin as possible to accommodate for various 'new' style switches that take up more than normal ones in terms of the depth of the back box.
I would turn the radio round and stack it on top of the coin-cell but i do not want to be battling with any interference, it will have enough to contend with being nested inside of a metal backbox as it is.
@samuel235
While we're on the subject of switches - how is it that you are able to control the switch without a relay on board?