Recent Posts

Pages: [1] 2 3 ... 10
1
There really is no major problem with this setup.

a big relay may be more appropriate. Much less likely to emit expensive magic smoke.


Any thoughts on the use of Mosfets Paul or a good suggestion on mouser? I'm trying to figure this out soon.
2
Project Guidance / Re: Flux Capacitor Project wit...
Last post by TomGeorge - Today at 04:22 am
Hi,
No problem, you can attach your code

OPs code attached

Fine on the YouTube link.

Make sure your pins are only connected to one device,  you may have one pin trying to control the mp3 player and the lights.
What are you using to power your project at the moment, and how many LEDs are you controlling?

Tom.... :)
3
//------------------------------------------------------------------------------
// Include the IRremote library header
//
#include <IRremote.h>

IRsend irsend;
#define POWER 0x202B24D
#define Vol_Mais 0x202D02F
#define Vol_men 0x202708F




//------------------------------------------------------------------------------
// Tell IRremote which Arduino pin is connected to the IR Receiver (TSOP4838)
//
int LED = 3;
int recvPin = 11;
IRrecv irrecv(recvPin);

//+=============================================================================
// Configure the Arduino
//
void  setup ( )
{
 Serial.begin(9600);   // Status message will be sent to PC at 9600 baud
 irrecv.enableIRIn();  // Start the receiver
}

//+=============================================================================
// Display IR code
//
void  ircode (decode_results *results)
{
 // Panasonic has an Address
 if (results->decode_type == PANASONIC) {
   Serial.print(results->address, HEX);
   Serial.print(":");
 }

 // Print Code
 Serial.print(results->value, HEX);
}

//+=============================================================================
// Display encoding type
//
void  encoding (decode_results *results)
{
 switch (results->decode_type) {
   default:
   case UNKNOWN:      Serial.print("UNKNOWN");       break ;
   case NEC:          Serial.print("NEC");           break ;
   case SONY:         Serial.print("SONY");          break ;
   case RC5:          Serial.print("RC5");           break ;
   case RC6:          Serial.print("RC6");           break ;
   case DISH:         Serial.print("DISH");          break ;
   case SHARP:        Serial.print("SHARP");         break ;
   case JVC:          Serial.print("JVC");           break ;
   case SANYO:        Serial.print("SANYO");         break ;
   case MITSUBISHI:   Serial.print("MITSUBISHI");    break ;
   case SAMSUNG:      Serial.print("SAMSUNG");       break ;
   case LG:           Serial.print("LG");            break ;
   case WHYNTER:      Serial.print("WHYNTER");       break ;
   case AIWA_RC_T501: Serial.print("AIWA_RC_T501");  break ;
   case PANASONIC:    Serial.print("PANASONIC");     break ;
   case DENON:        Serial.print("Denon");         break ;
 }
}

//+=============================================================================
// Dump out the decode_results structure.
//
void  dumpInfo (decode_results *results)
{
 // Check if the buffer overflowed
 if (results->overflow) {
   Serial.println("IR code too long. Edit IRremoteInt.h and increase RAWBUF");
   return;
 }

 // Show Encoding standard
 Serial.print("Encoding  : ");
 encoding(results);
 Serial.println("");

 // Show Code & length
 Serial.print("Code      : ");
 ircode(results);
 Serial.print(" (");
 Serial.print(results->bits, DEC);
 Serial.println(" bits)");
}

//+=============================================================================
// Dump out the decode_results structure.
//
void  dumpRaw (decode_results *results)
{
 // Print Raw data
 Serial.print("Timing[");
  Serial.print(results->rawlen-1, DEC);
  Serial.println("]: ");

 for (int i = 1;  i < results->rawlen;  i++) {
   unsigned long  x = results->rawbuf * USECPERTICK;
   if (!(i & 1)) {  // even
     Serial.print("-");
     if (x < 1000)  Serial.print(" ") ;
     if (x < 100)   Serial.print(" ") ;
     Serial.print(x, DEC);
   } else {  // odd
     Serial.print("     ");
     Serial.print("+");
     if (x < 1000)  Serial.print(" ") ;
     if (x < 100)   Serial.print(" ") ;
     Serial.print(x, DEC);
     if (i < results->rawlen-1) Serial.print(", "); //',' not needed for last one
   }
   if (!(i % 8))  Serial.println("");
 }
 Serial.println("");                    // Newline
}

//+=============================================================================
// Dump out the decode_results structure.
//
void  dumpCode (decode_results *results)
{
 // Start declaration
 Serial.print("unsigned int  ");          // variable type
 Serial.print("rawData[");                // array name
  Serial.print(results->rawlen - 1, DEC);  // array size
  Serial.print("] = {");                   // Start declaration

 // Dump data
 for (int i = 1;  i < results->rawlen;  i++) {
   Serial.print(results->rawbuf * USECPERTICK, DEC);
   if ( i < results->rawlen-1 ) Serial.print(","); // ',' not needed on last one
   if (!(i & 1))  Serial.print(" ");
 }

 // End declaration
 Serial.print("};");  //

 // Comment
 Serial.print("  // ");
 encoding(results);
 Serial.print(" ");
 ircode(results);

 // Newline
 Serial.println("");

 // Now dump "known" codes
 if (results->decode_type != UNKNOWN) {

   // Some protocols have an address
   if (results->decode_type == PANASONIC) {
     Serial.print("unsigned int  addr = 0x");
     Serial.print(results->address, HEX);
     Serial.println(";");
   }

   // All protocols have data
   Serial.print("unsigned int  data = 0x");
   Serial.print(results->value, HEX);
   Serial.println(";");
 }
}

//+=============================================================================
// The repeating section of the code
//
void  loop ( )
{
 decode_results  results;        // Somewhere to store the results

 if (irrecv.decode(&results)) {  // Grab an IR code
   dumpInfo(&results);           // Output the results
   dumpRaw(&results);            // Output the results in RAW format
   dumpCode(&results);           // Output the results as source code
   Serial.println("");           // Blank line between entries
   irrecv.resume();              // Prepare for the next value
 }

if (irrecv.decode (&results)) {
   if (results.value == 0x202B24D)
    irsend.sendSony(0xA81, 12);
 
}
if (irrecv.decode (&results)) {
 if (results.value == 0x202D02F)
   irsend.sendSony(0x481, 12);
 }

if (irrecv.decode (&results)) {
 if (results.value == 0xC81, 12);
 }

 }
4
Hardware / Re: Level Shifter con Aduino D...
Last post by Adrian_E - Today at 04:20 am
surbyte, usas los BSS138?
5
Arduino is a development platform intended to allow those interested to learn the workings of a MCU at the hardware level. Any discussion of a HAL such as Python is a non-sequitur and belongs elsewhere.

@sophiasmith2018
"Python is definitly (sic) better choice than c languages"
For you this may be true. This is your opinion and while an opinion is always valid, that does not make it right.
6
Hi, I am working on an independent study for Arduino project in my school, and I'm struggling to find a correct way to power my project. Basically, it is a vehicle with four high torque motors.

I have to power four motors and four servos right now.
Here are the condensed specs for each of the parts.


170rpm Econ Gear DC Motor
Nominal Voltage: 12V
Current(No Load): 0.10A
Current(Stall): 3.8A

HS-785HB Servo
Nominal Voltage: 6V
Current Drain(No load) = 285mA
Current Drain(Idle) = 8.7mA


I will be using two MDD10A motor drivers which can use up to 10A per motor, with 10~35V.

So here's the part I'm struggling with.
Because I don't have a good electronics knowledge, I'm getting confused how to draw a circuit and arranging which to go parallel and which to go serial.

What I've thought of right now is powering with 12V 13A battery, give 6A each to motor drivers through parallel circuit(3A each to motor) and then use the 6V regulator to drop the voltage down and supplying it to four parallel connected servos.

I'm sorry that I have to explain all of this through words, not a circuit diagram.
I wanted to make sure if the idea I have right now is correct.

For that much power, sealed acid battery(Car battery) is the only one I could think of. But because I need everything to be light enough for motors to handle, I was wondering if there could be better ways to arrange the circuit and find a better motor.

Thank you!
7
General Electronics / Re: currrent limiting
Last post by tim77777 - Today at 04:16 am
Horrendous or not, would it work?


I don't know what foldback limiting is.

PSU design. It just a AMS1117 with 9 volts in, 5 volts out. Bypass caps on both sides.
8
Added the suggestions to the code: volatile and noInterrupts(); & interrupt(); around the read & reset of the variable used inside the ISR.  No change, BUT, I decided remove the mask/filter code to allow the 2 standard CAN messages that arrive ~twice per second when the car is ON. The interrupt function works fine (forever) until I enter a PID on the Serial Monitor.  The system responds to the first sent message with the requested information message, but immediately after that all interrupts stop coming, even for the unsolicited messages.  So it seems the sending of a CAN message kills the interrupt process somehow.
9
Networking, Protocols, and Devices / Re: Need Help :(
Last post by uwabara - Today at 04:11 am
I don't know what a "barangay" is and it is not in my dictionary.

20 metres should be possible, but the only way to be sure is by testing.

You can't power a 5v Arduino using 2 x AA cells. However if you use a 3.3v Arduino or if (as I do) you build an 8MHz Atmega 328 on a piece of stripboard then you could power everything from 2 x AA cells. The advantage of using the Atmega 328 is that it has no energy-wasting attachments.

...R
barangay = residential community. if ever i will pursue with using arduino, what source can you recommend? and also, for the atmega, will i be only using this as my mc and where would i code this?
10
General Electronics / Re: currrent limiting
Last post by allanhurst - Today at 04:10 am
That's horrendous.

Can't you modify the supply side to be foldback limiting as I suggested? I'll hack out a circuit if you'll give me your psu specs/design.

Allan
Pages: [1] 2 3 ... 10