modifications of barebone arduino

Hello everyone..i have made an arduino barebone..with a voltage regulator to step down from 9V to 5V. However now I realise that the voltage regulator is consuming a lot of current, so I decided to get rid of it and I decided to use 3V battery or 5V directly from arduino uno(just for now to check).. So I remade the barebone removing the regulator.

The barebone is also interfaced with RF module Tx 433 Mhz.. the operating voltage for the tx is 1.8 V so we are ok there. However when I connect it to 5V from arduino or even 3V batteries...no signal is sending, Iam not quite sure where the problem is. The connections are all correct.

The connections of barebone are the standard connections. Just to go over it quickly..8Mhz clock, one pull up resistor of 10K, couple of 22Pf capacitors, and shorting GNDS, and VCC and AVCC..also added a decouplng capacitor of 10uF capacitor across Vcc and GND when I use 3V batteries. I even directly connected it to 9V battery and still no signal transmitting.

But its still not working, any help would be really appreciable. Thank You

Hi, welcome to the forum.

You connected a 9V battery directly ? How ? Perhaps you damaged something ? Can you test how much of your components is still working ?

Which transmitter is that ? How is it connected ? The cheap 433MHz transmitters (with round saw based oscillator) work at 5V, and maybe a little at 4V, but maybe not so good at 3V. A battery powered ATmega chip is often used with three AA batteries or a Li-ion or Lipo cell.

I prefer to have VCC-GND decoupling with 100nF capacitor, I don't care about a 10uF.

Can you tell more ? Which ATmega chip ? Internal 8MHz or external crystal ? Which bootloader ?

Peter_n:
Hi, welcome to the forum.

You connected a 9V battery directly ? How ? Perhaps you damaged something ? Can you test how much of your components is still working ?

Which transmitter is that ? How is it connected ? The cheap 433MHz transmitters (with round saw based oscillator) work at 5V, and maybe a little at 4V, but maybe not so good at 3V. A battery powered ATmega chip is often used with three AA batteries or a Li-ion or Lipo cell.

I prefer to have VCC-GND decoupling with 100nF capacitor, I don't care about a 10uF.

Can you tell more ? Which ATmega chip ? Internal 8MHz or external crystal ? Which bootloader ?

its a simple ASK Transmitter(WSTX01) 434Mhz ..its connected on a breadboard..it has 4pins..Gnd, Vcc and data pin and antenna(not used)..the operating voltage of transmitter it mentions is 3V-12V.. so maybe it wont work at 3V..but I gave it 5V from the uno..so it should have worked..its an external clock of 8Mhz..

its an atmega 328p chip..used in arduino uno already bootloaded from before...and yes luckily all the components are working..

You can use the "REPLY" button, you don't have to quote my reply, since my reply is already posted ::slight_smile:

I have so many questions !
Did the transmitter and receiver work before ?
Can you first test everything with Arduino Uno and 5V ?
How do you test if something is transmitting ? (I hope with SDR).
Which library do you use ? (I hope with RadioHead/VirtualWire). Do you have a seperate board definition in boards.txt for the 8MHz ?

Sorry about the quote..I was planning to quote and remove few lines here and there..but then decided just to quote the whole thing..anyways yes the transmitter and recievers are working..I have tested them before..the programming everything has been done compiled burned and tested..I have tested normally using two arduino unos..one for transmitting and one for recieving.. then i made the barebone circuit on the breadboard..unplugged the same chip from the uno and used it on breadboard..added the extra circuitory..resistors capacitors and what have you..and i have given it 5V supply from the arduino uno..which is connected with USB cable..on the pc..

How do i know whether its working..because the reciever module is already set up in another breadboard..and in the in the serial monitor..it should start recieving messeges of what I have written in my code..once I start giving power supply..

Regardsing the programming part..I have virtualwire.h library..Iam not sure about what you meant regarding seperate definition for 8MHz..

An AVR running on the internal 8 MHz clock doesn't need the 22 pF caps for a 16 MHz crystal.
The 2 CLK pins are open, I think it's PortB that has all 8 bits usable.

You can run 3.3V at 8 MHz. You can wire 3.3V devices directly, many devices, microSD adapters.

If you want to go from 9V or 12V to less, efficiently, look up buck converters including make your own.
And then look at boost converters, you can run on a 1.8V source.

It should work. Your barebone at 5V should almost be the same as the Arduino Uno.
Can you make a photo of it ? So we can see the wiring.

I agree with GoForSmoke, let's focus on the 8MHz (together with the bootloader).
When you have a sketch compiled for 16MHz and upload it into a ATmega with 8MHz it won't work. You must be sure that you have selected a board running at 8MHz in the Arduino IDE. Let's forget that definition in 'boards.txt', because there is are a few official Arduino board running at 8MHz.
If you have an external crystal with 8MHz, select the "Pro Mini 3.3V 8MHz" with the "ATmega328" and use that to compile your file.
What bootloader is on your barebone, or do you upload a sketch with a programmer ?

I have a selection for ATMega328 on a breadboard (8 MHz Internal Clock). No crystal required.

Last time I did that I had to alter a file to change the expected chip number to my 328P-PU's.

Maybe by now bootloader programs know alternates.

At 8 MHz 3.3V operation the 328 has 1 full 8 bit Port open. 8 bit parallel memory or xfer possible.

At 3.3V you can solder jumpers onto the contacts of a microSD adapter sleeve (take the card out) and breadboard right in to MOSI, MISO, SCK and SS as well as PWR and GND. SD runs at 3.3V, there's no voltage leveling needed. Same goes for a number of other 3.3V devices.

8 MHz is still fast. The C64 ran at 1 MHz as did the Atari 800. Z80's ran at 4 but cycle-hogging CISC.

All I'm saying is there's justification to run stand-alone on internal clock.

Peter_n:
It should work. Your barebone at 5V should almost be the same as the Arduino Uno.
Can you make a photo of it ? So we can see the wiring.

Ill give you the link of the barebone circuit from online from where I made the barebone and I wil send you the actual pic of my circuit tomorrow..I even replaced the 8Mhz crystal with a 16Mhz crystal on the breadboard and still it wasnt working.

What bootloader is on your barebone, or do you upload a sketch with a programmer ?

The atmega 328P chips I bought online already were bootloaded.so all I had to do was insert the chips on the uno compile and burn them and they were good to go..

http://www.instructables.com/id/Build-your-own-Arduino-Bare-Bone-System/.. its the same circuit except there is no voltage regulator and no button or led..

When you bought the ATmega chip from Ebay, there might be a bad bootloader on it, or a bootloader that is not for Arduino, or a very old bootloader that is no longer compatible. You wouldn't be the first one that bought ATmega chips with a useless pre-burned bootloader.
You also seem to have applied 9V to the ATmega chip, so it is probably broken.

Get a new ATmega chip and a programmer (or an Arduino as ISP), burn the bootloader or use the programmer to upload a sketch without bootloader.

i didnt get the chips from ebay, I got it from a decent electronics website back in my country, and the atmega 328p chips I purchased are with uno bootloader installed, so its makes life hell easier, yes maybe the chip might have gotten damaged, although when I plugged it out from the breadboard and plugged it back to the arduino uno, transmitter started transmitting again. I will change my chips once again and try again.

Iam not sure technically what or where Iam doing wrong. I mean its afterall its just a basic barebone circuit interfaced with a transmitter. Any help on the technical side would be appreciable thanks.

GoForSmoke:
An AVR running on the internal 8 MHz clock doesn't need the 22 pF caps for a 16 MHz crystal.
The 2 CLK pins are open, I think it's PortB that has all 8 bits usable.

You can run 3.3V at 8 MHz. You can wire 3.3V devices directly, many devices, microSD adapters.

If you want to go from 9V or 12V to less, efficiently, look up buck converters including make your own.
And then look at boost converters, you can run on a 1.8V source.

Yes iam aware of these options. If required I will look into solutions in the future. But for now I just want the barebone to work so that I can gain confidence. Iam sourcing it 5Volts directly from the arduino uno. But its just not working. Is there something technically Iam doing wrong..that Iam unaware of???

You have to run the AVR the way it is bootloaded to run.
If the 328 you bought works in an UNO then it needs 5V and a 16 MHz external oscillator.

Compare the Instructables (not known for checking their material) page to this blog:

and maybe some difference will be apparent besides.

Nick even covers the case where you have a bootloaded chip needing a crystal, with photos.

By the time you get the project to work you just may become an expert.

Can I suggest that the next step from breadboard would be to solder your wires and bits to the pins of a socket and then plug the AVR in that? Your connections will be better if you solder them well.

One person here suggested soldering female headers to the pins of a chip or socket. That would allow for plugging male jumpers directly. The prototype looked flat, low and neat.

BTW, if you always apply clean power you won't need the 5V regulator. See about using buck converters rather than regulators anyway, you won't get heat problems running on 9V or 12V.

I read the gammon foruns really carefully, and I understood 90percent of it. I somewhat got a bit messed up at the last part of programming the chip . I wish gammon himself was here so that I could ask him directly my doubt. So this is what I need to do.

I will purchase ATmega 328p BLANK chips and bootload it by uno as suggested by Nick. IF THE CHIP IS SUCCESSFULLY DETECTED DIRECTLY GO TO PROGRAMMING THE BOOTLOADER. Ok at this section suppose I choose 8Mhz internal clock and do as Nick says then he says now the chip has a bootloader, and you can disconnect the power (USB cable) and remove the crystal or resonator.

But there was no crystal or resonator in the first place on the breadboard. He only added external the crystal and capacitors IF THE CHIP WAS SUCCESSFULLY NOT DETECTED. That was my first doubt.

Now my second main doubt is as follows. Supposing bootloading is done and I have changed the fuse settings to 8Mhz internal oscillator and what have you. Now we enter programming a sketch section of the forum. Now suppose I had written a code on uno..and I want that code to be uploaded on the CHIP i just bootloaded, so can I unplug that bootloaded chip from by breadboard and insert in on UNO..and upload the code. Would that work??

Nick posts here quite often and requests questions be posted here. I'll send him a PM.

Yes you can load a program on the breadboard chip.

I think that for your bootloaded chips that you can change the fuses to run on internal clock.

Once you change the speed, add or take away parts to match.

thanks a lot buddy...really appreciate your help. I guess I wasnt too clear with my second doubt..let me rephrase it once again clearly...after programming the bootloader section is done...can I just take you my chip from breadboard put in arduino uno..compile and burn the arduino of suppose say blinking led...and then remake the circuit on breadboard with external LED..according to the code i have written..would that work???

I am not really sure what purpose is FTDI cable required at the end where Nick mentions it..thanks

The UNO has a 16MHz resonator. What runs in it has to be set up for 16MHz.

I've programmed an ATtiny85 and on that didn't even put a bootloader on.
That can be done with AVR's as well.

When loading the bootloader and/or a sketch (bootloader usually loads Blink to test with) the programmer (UNO as ISP) uses SPI to write the chip.

The FTDI cable is there to turn USB into TTL serial. The bootloader program reads TTL serial and loads your program above it in flash. An UNO with its own programmed chip can be used to do that too.They let you program a chip running at different speed on a breadboard.

It's good to have spare 328(s) for your UNO. If you do burn or brick the one on there, you're not stuck.

It's good to experiment with running at lower V and MHz, especially if you ever want to run on batteries or alternate power. With the right code, 1 MHz is fast enough for a lot of projects.

Consider that new 328P's come set up for 1 MHz operation as factory default.

The UNO has a 16MHz resonator. What runs in it has to be set up for 16MHz.

So basically if I set up the chip using 8Mhz internal oscillator and then take the chip down from breadboard and put in on uno..and burn a code..so in that case it wont work right?? so i have to set up clock speed of 16Mhz iam guessing it while iam bootoading it.

the FINAL MAIN POINT I WANT to clear is the FTDI cable really required as mentioned by nick at the end for programming a sketch, once the bootloading is done cant i simply take my chip out of breadboard and connect in on uno burn and compile the code whatever code might be( according to circuit i will be making)..i and iam good to go. Wont that work, I know Iam asking too many questions but if you can answer the final point..that would really helpful..because I wil be going to shop today to purchase the equipments. Is FTDI cable required for programming a sketch???

thanks a lot

Adey:
The UNO has a 16MHz resonator. What runs in it has to be set up for 16MHz.

So basically if I set up the chip using 8Mhz internal oscillator and then take the chip down from breadboard and put in on uno..and burn a code..so in that case it wont work right?? so i have to set up clock speed of 16Mhz iam guessing it while iam bootoading it.

If you want it to run on the UNO board then it must be 16MHz external crystal or resonator.

the FINAL MAIN POINT I WANT to clear is the FTDI cable really required as mentioned by nick at the end for programming a sketch, once the bootloading is done cant i simply take my chip out of breadboard and connect in on uno burn and compile the code whatever code might be( according to circuit i will be making)..i and iam good to go. Wont that work, I know Iam asking too many questions but if you can answer the final point..that would really helpful..because I wil be going to shop today to purchase the equipments. Is FTDI cable required for programming a sketch???

thanks a lot

UNO has a 16 MHz bootloaded 328 chip. Any like it will do the same.

FTDI cable is not required. An UNO board can do the job, it has a USB to serial converter.

Somewhere I saw pictures of an UNO with the 328 chip removed used as the converter but I don't recall where. You can load programs onto a standalone/breadboard AVR using an Arduino instead of FTDI cable, it is just not as simple.

The setup to burn bootloader can burn bootloader and program or just the program too.
You don't have to have the bootloader unless you want to load programs through serial, which is what Arduinos do.

Here, Nick goes farther with his hex file (all code going to the chip is hex file) from SD card loader.

Here one guy is programming ATtiny chips with his own mini-shields on an UNO as ISP. With the UNO set up he loads programs the same as you would except different target and he does not bootload.

How many ways to program chips? Anything that meets the requirements will do. So, many ways.

ok I just read your post...but guess what i bought all the devices except teh FTDI connector..did exactly as nick mentioned, I had to add the external crystal and pF capacitors, so i choose the 16Mhz crystal, after the booloading was done..I didnt know what to do..so just for trying I loaded in on uno..burned a random code..i think it was a lighting two leds..with differnet delays..it worked on uno.tried on breadboard and guess what it worked on breadboard as well.. :smiley: .. i gave 5V from uno directly

so i guess its not that difficult afterall..tomorrow I will be setting 8Mhz internal oscillator and try with another blank chip... so i guess this part is complete...the next part would be to use power saving techniques in the software part..I will try it myself first..then I will again revert back to guys if some help is required..thanks a lot guys..