I am relatively new to the Arduino community and i didn't have any experience in hardware. I build two small Arduino projects with controlling lights and sound. I used an Arduino Nano board for these. I designed custom PCBs where I could connect all my switches, and leds and so on. I also mounted the complete Arduino Nano board onto my PCB. The downside is that the complete Arduino Nano board is relatively "big" especially with it's USB connector.
I have seen that I can use an Arduino Board as a flasher/ programmer to programm other Arduinoboard without using the USB connector. I also did this and programmed a nano board with my Arduino UNO board and that worked.
Now i want to shrink the footprint on my next project and I want to go only with the Atmega chip. Do I have to solder the programmed Atmega chip on my pcb with or without the 16 MHz crystal? I read somewhere that at least the Arduino nano has a build in oscillator with 8 MHz or so.
And I also have another question regarding powering custom PCBs. currently I use a battery pack and buck converter to regulate the voltage to constant 5V DC.
Are where any schematics on this forum for the necessary components of a 5V buck converter, so that I can solder these directly on my next PCB and don't have to use a separate converter chip?
That depends on what has been programmed. The blank chip as shipped by Microchip comes with the internal 8MHz oscillator enabled - with the divide by 8 fuse set as well if I recall correctly.
If you have already programmed the chip, then you need to check what fuses have been set during the programming as they determine the clock source for the 328P (amongst other things).
You can run a 328P directly of 3xAA batteries and avoid any regulators/converters.
What voltages do your other components require? Do those voltages need to be stable? Switches don't care, but your LEDs will go dimmer as the batteries discharge.
hey thanks i have some serial connections for controlling a sound chip but it only gives the chip a few bytes for please play song xy and so. are these sensitive to the frequencies?
currently i operated my board with a voltage regulator and i also powered it with 3 AA batteries. I use chips that operate between 3,3 and 5,0 V. everything works fine also the leds. I only thought powering the nano with less then 5,0 could "damage" it because the nano regulator needs at least stable 5V to power the atmega chip.
ok so the "blank" atmega chip as an build in oscilator with 8mhz that can be activated by using the right fuses when programming it via e.g. AVRDUDESS?
low dropout linear voltage regulator.
Like the one that classic arduino uses. You can choose some better though.
But if battery life is important factor, that 4.5V approach is the best.
You need to look at your sound chip documentation. What serial voltages does it require. Is it TTL serial or do you use an RS232 line driver chip?
I've always used an external crystal with my designs. If you are going to use the internal 8MHz oscillator, then have a read around the forum to see what others have said regarding this and serial comms and how closely you can get to standard baud rates.
You can't damage the nano by supplying a lower voltage. The regulator will probably stop regulating at some point.
Note that if you are using a bare 328P, then Microchip say it'll work between 1.8v and 5.5v. However, you need to select the clock appropriately. This is the speed graph:
As you can see, the lower the operating voltage, the lower the clock source. At 3.3v it's roughly around 13.3MHz if I recall. However, others have reported that the 328P appears to work fine at 16MHz at 3.3v.
hey that is the datasheet of the led drvier i use the DM13A i only see a max input clock frequency of 25MHz but no min. or average frequency. is this normal for clock dpending chips? and dies it that i theoretically could use this chip with a clock frequency of 1 Hz?
There are books out there, but personally I don't think reading them in a linear fashion from start to end will help much. You are more likely to get lost in the details of topics unrelated to your current project.
Just keep plodding along with your project and ask questions here whenever you need to. Once you have a feel for how it all hangs together, then I think the details will make more sense to you. Just my opinion.
i only use the commands
digitalwrite and
shiftout to get the needed bits into the led driver. i think thar these standard arduino function have a fixed baud rate coded?
sry yes both. i have a led driver ship that is controlled with the digitalwrite and shiftout function like normal shiftregisters and i have a soundchip an dy-hv20t that is controlled via a serial connection.
but i use a library for controlling the chip that has been written by someone else. it is called dyplayer and available on github.
after skimming the src it uses function like sendcommand and serialwrite.
it uses the hardwareserial pins on the arduino as well as other pins when used in software serial mode.
The 8MHz clock is calibrated to within +/-10% and I did have problems with certain baud rates being off enough so that external devices did not work. However you can calibrate it to be within +/-1%.
If you are making a custom board why not use the new version, the 328PB
It also has some extra features and it's cheaper