Show Posts
Pages: [1] 2 3
1  Using Arduino / Networking, Protocols, and Devices / Re: Arduino as HCS301 (KEELOQ) Rolling Code Receiver? on: November 30, 2013, 11:44:26 am
There must be. But, it's unlikely that they will tell you what the algorithm is.

It seems like someone has figured out what algorithm it is using.

unsigned long Keeloq::encrypt(unsigned long data)
  unsigned long x = data;
  unsigned long r;
  int keyBitNo, index;
  unsigned long keyBitVal,bitVal;

  for (r = 0; r < 528; r++)
    keyBitNo = r & 63;
    if(keyBitNo < 32)
      keyBitVal = bitRead(_keyLow,keyBitNo);
      keyBitVal = bitRead(_keyHigh, keyBitNo - 32);
    index = 1 * bitRead(x,1) + 2 * bitRead(x,9) + 4 * bitRead(x,20) + 8 * bitRead(x,26) + 16 * bitRead(x,31);
    bitVal = bitRead(x,0) ^ bitRead(x, 16) ^ bitRead(KeeLoq_NLF,index) ^ keyBitVal;
    x = (x>>1) ^ bitVal<<31;
  return x;

I think it makes no sense to keep the algorithm secret. Security shouldn't be purely based on that. Otherwise if someone discovered the algorithm somehow or it was leaked then there would be a huge problem.

It should be like the SSL protocol. Everyone knows how to generate keys and everyone has access to the public keys but you still can't hack it.

The receiver simply generates a stream of data that is one of the streams of data that the receiver understands. It does this in the same way that MasterCard generates valid credit card numbers. They are not about to tell you how they know that a set of 16 digits is, or is not, a valid credit card number. Nor, I'm sure, are the Keeloq people going to tell you anything.

I am assuming that you meant 'The transmitter simply generates'. Okay, the transmitter will transmit a certain code and the receiver will receive it. Fine. However, I don't think the receiver has a way of guessing what the next code will be, otherwise it wouldn't be secure. There will be millions of possible combinations so really, next time a code is received there's no way to know if it was the expected one.

Except the receiver knows not to expect to see that same sequence again, until after a number of other sequences have been received. The transmitter knows to send a different sequence each time. The receiver knows what sequence should be next. Anything out of order is rejected.

I do understand that wrong codes are simply ignored. This is why parking your car in a car lot won't cause your system any trouble, even if the other cars are exactly the same model as yours - because the key does not match and it will never because there are millions of possibilities.
2  Using Arduino / Networking, Protocols, and Devices / Arduino as HCS301 (KEELOQ) Rolling Code Receiver? on: November 30, 2013, 10:25:19 am
I am trying to control a circuit with a secure one-button remote control device. After doing some research I came up with the Keeloq system and some affordable transmitters based on the HCS301 chip.

I searched several sites like eBay but I found some receivers which I found to be a bit overpriced. I am trying to keep costs as low as possible, so I am trying to use stuff that I already have like RF kits and the like.

So I was wondering if there was any way to use the arduino + RF receiver + VirtualWire for this task?

I admit I don't know much about Keeloq I did some research but I am clueless as to how the receiver 'learns' the transmitter. Is there a fixed algorithm of some sort?

If the receiver is capable of generating a sequence of numbers that matches the transmitter only by decoding a single message I don't see how that would be secure. Anyone who managed to capture it would be capable of generating the same sequence.

I found this on GitHub which I assume could be of great help but I still can't get to understand how to do the syncing.

Any help would be greatly appreciated !
3  Using Arduino / General Electronics / Re: Minimizing power consumption on: October 11, 2013, 12:54:34 pm
Thank you for all your suggestions. I was already running the device with no crystal and using the internal 8mhz oscillator.

Will the LM7805 still leak current if applied +5V to the out pin and keep gnd connected, leaving the IN pin floating?

I am using one of those little 9V batteries because they provide 9V in a reasonably small package. The reason for using a power source of more than 9V was to increase range of rf transmitter.

4  Using Arduino / General Electronics / Minimizing power consumption on: October 11, 2013, 09:56:12 am
Hello, I am trying to build a circuit with a minimum power consumption in order for it to be battery powered.

I have a circuit consisting of a PIR sensor, a 433Mhz transmitter that is turned on or off through a 2n2222a and an atmega328p-pu that is held on power down until the PIR sensor interrupts its sleep. The microcontroller and the PIR sensor are powered from a LM7805, the rf transmitter is connected to 9V. Everything runs on a 9V battery.

I have measured the power consumption and realized that the whole circuit was using about 3.8-4mA during the sleep period ( microcontroller sleeping, 2n2222 not turned on so rf transmitter not consuming power, pir sensor running). Because of such a high power consumption the battery runs out pretty quick, so I was wondering if it would be possible to extend its life by reducing the power consumption even more.

So I have a few questions:
  • Does the pullup resistor that is connected to the reset pin have any impact o power consumption
  • Would it be possible for a LM7805 to leak a couple mA of current?

Thanks !
5  Using Arduino / Networking, Protocols, and Devices / ENC28J60 and Power Over Ethernet on: September 20, 2013, 09:44:34 pm
Hello, I am currently planning to use this device to connect my arduino to the internet.

I was wondering whether it would be possible to use the ethernet cable as a power source ( i.e. PoE ) and be able to run my arduino without any extra wires.

Does anyone know if it's possible and how it should be done?

Thanks in advance !
6  Using Arduino / Networking, Protocols, and Devices / Re: Arduino and 315/433 MHz Wireless PIR Sensors on: August 09, 2013, 09:23:25 am
Thanks, I will check that out !
7  Using Arduino / Networking, Protocols, and Devices / Arduino and 315/433 MHz Wireless PIR Sensors on: August 08, 2013, 11:41:12 am

I bought a couple of RF wireless PIR sensors for home security but I am currently trying to figure out how to make these communicate with my arduino ver RF. I already have some RF receivers but I am not sure how these devices actually encode data.

My device looks like this:

Is there any library that takes care of this issue? Maybe something like VirtualWire?

8  Using Arduino / Networking, Protocols, and Devices / Re: Arduino and PT2272 RF Receiver on: August 02, 2013, 07:18:16 pm
I figured it out. You can close this thread.
9  Using Arduino / Networking, Protocols, and Devices / Arduino and PT2272 RF Receiver on: August 02, 2013, 07:15:25 pm
Hello, i bought a couple of keyfobs and rf receivers, something like this:

I am not sure how I could connect it to the arduino so I can control it with the keyfob. It seems that the receiver has several data pins, so I really have no clue how to use them.

Any ideas?

10  Topics / Device Hacking / Re: How to Create real home product without Arduino Uno R3 on: March 27, 2013, 11:24:12 am
I am still not sure what your problem is. I think you're wondering whether you can use any other pins on the standalone atmega? Yes, you can. You need to program your chip first and then make the adequate connections on the perfboard.

Refer to this pin mapping for the actual pin locations on the chip:
11  Topics / Device Hacking / Re: Using screen from IPad3 on: March 27, 2013, 11:20:09 am
You could do amazing things with the iPad and any Arduino if you know how to program both in XCode and the Arduino IDE. You should google it and You should get many tutorials and suggestions.

Yeah but OP said he had a spare iPad screen, not the whole thing.
12  Using Arduino / Motors, Mechanics, and Power / Re: H-Bridge to provide about 150A at 18V? on: March 27, 2013, 09:30:47 am

I had not thought about that, and yes, you're right, these relays handle some impressive amounts of current.

Speed control ( PWM ) might not be necessary for me, so i am going to take that into account.

13  Using Arduino / Motors, Mechanics, and Power / Re: H-Bridge to provide about 150A at 18V? on: March 27, 2013, 09:25:37 am
That makes sense to me but I am still wondering how I could limit the current? I know I could use a shunt and have an analog pin monitor the current flowing but is there any way I could limit it to, say 30A, without forcing the motor to stop?

Also, I've came up with some $20 brushed ESCs on eBay (rated at 320A is it even possible?). Would that be a better way to go?

Thank you for your reply.
14  Using Arduino / Motors, Mechanics, and Power / H-Bridge to provide about 150A at 18V? on: March 27, 2013, 09:04:02 am

I am currently thinking about building a sumo robot using a couple Mabuchi 775 motors. They seem to be quite powerful, their stall torque is about 12kg cm (according to the datasheets).

I have built H bridges in the past for loads of about 5A, but never built anything for a motor that could take about 150 A !

I have done a quick search on eBay and came up with with the RFP50N06, which can take up to 50A and are at a reasonable price. I am guessing that 4 of these in parallel should do the job? Are there any better candidates for this particular task?

How about some good P Channel Mosfets for the high side? I could not find any that was capable of carrying more than 23A.

15  Using Arduino / Motors, Mechanics, and Power / Re: Power Mosfets for a H-Bridge? on: February 28, 2013, 08:57:14 am
I was actually trying to keep everything on a single pcb besides learning.

And yes, I had seen the post that you linked.

Thanks !
Pages: [1] 2 3