Maker Pro
Maker Pro

Assorted Gubbins on toy tank

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
Hmmm ...
4xAA would have to go in a 2x2 block (pair of 2xAA holders back-to-back?) to fit in the space. I've seen several tiny circuits for the Linear Regulator, including the linked one, so I can go with that (if my failing eyes and shaky hands can cope with the soldering!).
I'll talk to my PCB man about the best way to design it, as he'll be the one etching it!

So that is power.

Back to Audio, then. I've got a LM386 and a few other bits on the way, to build the circuit from.
I can just connect this to the 6V battery feed?

I'll draw up a full schematic at some point! I've been testing parts, and building it bit by bit on breadboard, and now designing the PCB(s).
Should really document the whole plan!

Guess I'm procrastinating a little - the physical preparation of the Tank is going to be a bind! I've drilled a few LED holes, and when I've got them all done, I need to paint it before installing the Gubbins. Bleeuurrgghh! ;)

Will post a few pics as I progress, but not much to see for now.

If nothing else, I've already learnt LOTS (some for the second time, but long-forgotten! :) ) Thanks! :)
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hmmm ...
4xAA would have to go in a 2x2 block (pair of 2xAA holders back-to-back?) to fit in the space. I've seen several tiny circuits for the Linear Regulator, including the linked one, so I can go with that (if my failing eyes and shaky hands can cope with the soldering!).
I'll talk to my PCB man about the best way to design it, as he'll be the one etching it!

So that is power.

Back to Audio, then. I've got a LM386 and a few other bits on the way, to build the circuit from.
I can just connect this to the 6V battery feed?

I'll draw up a full schematic at some point! I've been testing parts, and building it bit by bit on breadboard, and now designing the PCB(s).
Should really document the whole plan!

Guess I'm procrastinating a little - the physical preparation of the Tank is going to be a bind! I've drilled a few LED holes, and when I've got them all done, I need to paint it before installing the Gubbins. Bleeuurrgghh! ;)

Will post a few pics as I progress, but not much to see for now.

If nothing else, I've already learnt LOTS (some for the second time, but long-forgotten! :) ) Thanks! :)
If the part supports 6V, then by all means, go right to the battery.
(Especially power hogs)
I would very strongly recommend putting a capacitor on the output side of the voltage regulator for the other stuff though. It will help when the speaker decides to pull any juice.
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
If the part supports 6V, then by all means, go right to the battery.
(Especially power hogs)
I would very strongly recommend putting a capacitor on the output side of the voltage regulator for the other stuff though. It will help when the speaker decides to pull any juice.
The regulator circuit I was looking at has a 100uF on the input and a 10uF on the output. Is this enough?

Waiting for Audio parts to arrive ...
Art waits for no man ... except the Post man!
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
Minor rewiring.
Have juggled some pins to free up correct pins for SD card.
Have been working on plastic plate to take LEDs/buttons, and design circuit. Not decided whether to use vero/perf board, or get PCB etched.

Issue: When I press the Status buttons, one of the Gun LEDs lights up! Checking my Serial Monitor, gunValue does indeed change, even though I have no circuit yet.
I think I am getting interference. Status Buttons (3 buttons on Resistor Ladder) is on input A2. Gun Buttons (3 buttons on Ladder) are coded for input A3, but no circuit exists (pin is 'floating'). I'm running out of breadboard to put circuits on! I presume the signal I'm getting on A3 is interference from A2, and will go away when I put a circuit on A3. Could add a 10k pull-down resistor in lieu of circuit, to force A3 to 0V? (or pull-up? I think code wants 5v = no button pressed, buttons short some resistors, lowering signal)

Speakers arrived, but no connector 'tags' on them, just solder-points. Don't have a soldering iron yet! :(

Have written an ExpressPCB file to show my circuits. I'll be looking for advice on optimising them. Some of the connections need to be done with jump-cables, and I'm not sure which to do. (e.g. currently have Shift1Pin10 and Shift2Pin16 needing Vcc (5V), but no route in. Shift2Pin13 needs GND). Is it better to have signal on jump-wires? Does it matter?
The Voltage Regulator will be on its own small piece of veroboard, strapped to the 2x2 AA battery holder.
Can I upload this anywhere, for your perusal?
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
Added a single button with pull-up resistor to A3 (gunValue) and interference is now gone! :)

Still working on Audio.
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
OK, I am now trying to set up my SD Card Reader with my Arduino nano.
I am finding a lot of contradictory information and confuzzling info
sad.gif


1) Pins. SCK = Pin 13. MISO = Pin 12. MOSI = Pin 11.
Where does CS go? I see Pin 10, Pin 9 and Pin 4! Also, is SC the same as SS?

2) Power. I have 3.3V and 5V connectors on SD Reader. Which should I use, and can I connect to Arduino, or should I use a separate power? SD Reader takes quite a bit of current, I hear (100mA), and I am using 14x10mA on LEDs, so don't want to run too much through the Arduino.
For testing, I am powering nano by USB, but in Final Build will be 4xAA Batteries.

3) Signal levels. Can I connect MOSI/MISO/SCK/SS/SC direct to Arduino? I read that SD work on 3.3V logic, so need to convert. I also read that a simple resistor-based voltage divider was not accurate enough.

I then need to #include <SD.h> and <SPI.h>? There appear to be other libraries available (SDFAT.h?)

Am I on the right lines?
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
OK, I am now trying to set up my SD Card Reader with my Arduino nano.
I am finding a lot of contradictory information and confuzzling info
sad.gif


1) Pins. SCK = Pin 13. MISO = Pin 12. MOSI = Pin 11.
Where does CS go? I see Pin 10, Pin 9 and Pin 4! Also, is SC the same as SS?

2) Power. I have 3.3V and 5V connectors on SD Reader. Which should I use, and can I connect to Arduino, or should I use a separate power? SD Reader takes quite a bit of current, I hear (100mA), and I am using 14x10mA on LEDs, so don't want to run too much through the Arduino.
For testing, I am powering nano by USB, but in Final Build will be 4xAA Batteries.

3) Signal levels. Can I connect MOSI/MISO/SCK/SS/SC direct to Arduino? I read that SD work on 3.3V logic, so need to convert. I also read that a simple resistor-based voltage divider was not accurate enough.

I then need to #include <SD.h> and <SPI.h>? There appear to be other libraries available (SDFAT.h?)

Am I on the right lines?
You can upload files right on ElectronicsPoint when you make a post ;)
Glad to hear you resolved your interference issue earlier.

As far as the SD Card is concerned... are you using a shield or simply a holder that breaks out the pins?
You don't need logic to all of the SD Card Pins, and the headers you require will depend on how you want to treat the data. This is going to be a tricky part to deal with, not just for dealing with the SD Card, but for dealing with files on it as well.
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
UPDATE:
1) I picked up a soldering iron! I don't have a proper place to work yet, as my hobby-desk is covered with toy soldiers in need of painting. But I had a go at soldering on a piece of veroboard. It did not go as well as I had hoped. A combination of make-shift work-space, poor eyes, shaky hands and lack of practice lead to a very poor job. Will try again.

2) Rigged up SD card reader. Failed to read card. Not sure what the problem is. Have put it aside, and working on Audio output code.

3) Amplifier circuit (attached) apparently needs a capacitor on the input, before the 10k pot. I have been recommended 10uF. Can this be electrolytic? I have a 105 (10 x 10^5 pF = 1uF?) ceramic, or a 10uF Electrolytic.

4) Need to paint tank before I put components/boards in, or I'll get paint all over everything! Could take a while. Attached pic shows colour-scheme (dark green with bright green edging, to look a bit "Crystal").
 

Attachments

  • low_power_amp.gif
    low_power_amp.gif
    5.2 KB · Views: 56
  • P1010650 - Copy.JPG
    P1010650 - Copy.JPG
    178 KB · Views: 92

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
UPDATE:
1) I picked up a soldering iron! I don't have a proper place to work yet, as my hobby-desk is covered with toy soldiers in need of painting. But I had a go at soldering on a piece of veroboard. It did not go as well as I had hoped. A combination of make-shift work-space, poor eyes, shaky hands and lack of practice lead to a very poor job. Will try again.
Practice makes perfect. Try to keep the tip nice and clean and shiney. Pre-tinning the contacts, and soldering iron tip with a little solder helps.

3) Amplifier circuit (attached) apparently needs a capacitor on the input, before the 10k pot. I have been recommended 10uF. Can this be electrolytic? I have a 105 (10 x 10^5 pF = 1uF?) ceramic, or a 10uF Electrolytic.
I'm surprised you need the cap, but it's not uncommon. Was it recommended to offer DC decoupling or to filter the signal from the Arduino?

4) Need to paint tank before I put components/boards in, or I'll get paint all over everything! Could take a while. Attached pic shows colour-scheme (dark green with bright green edging, to look a bit "Crystal").
Thanks for Sharing!
 

Crystal Wizard

Feb 10, 2016
100
Joined
Feb 10, 2016
Messages
100
The Arduino sends out a PWM square-wave 0v-5v. I think the cap is for re-centring the signal to +/- 2.5v Not 100% on that, though!

I'll be having another go at soldering, got to get back in to it! Will look over some more tutorials.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
The Arduino sends out a PWM square-wave 0v-5v. I think the cap is for re-centring the signal to +/- 2.5v Not 100% on that, though!

I'll be having another go at soldering, got to get back in to it! Will look over some more tutorials.
Oops... that's exactly it. It is there to remove the DC offset.
 
Top