Go Down

Topic: modifications of barebone arduino (Read 8604 times) previous topic - next topic

Adey

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

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 ?

Adey

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..



Peter_n

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

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 ?


Adey

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..



GoForSmoke

#5
Nov 15, 2014, 11:14 am Last Edit: Nov 15, 2014, 11:16 am by 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.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

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.

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 ?

GoForSmoke

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.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Adey

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..


Peter_n

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.

Adey

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.

Adey

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???

GoForSmoke

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:

http://gammon.com.au/breadboard

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.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Adey

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??



GoForSmoke

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.


 
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Go Up