@mr_red
I have a zipped snapshot of all the 3d step/wrl models that I used to build my projects so far. It was quite some work to gather them all and align with the footprints using the kicad stepup tools. It's not complete - still needs some more work:simple_smile: but it should help you or anyone else to get started into MCAD integration using FreeCAD and kicad stepup tools. Maybe it's not very easy to start when using free tools but hey they are "FREE" so we cannot ask for more. But the nice thing is that once you get used it will be really easy to do your stuff and to go forward. Oh and FreeCAD can be so powerful after you learn it - I was really amazed what you can do with it(it has it's quirks and downsides but once you master it - oh, well...).
There's also: https://www.onshape.com/ - pretty powerful this one too and it has more advanced features than FreeCAD but the downside is that it's a cloud based solution: it's free for public documents but you never know when they will go to paid accounts only so yeah...I don't really like the idea to depend on something that it's hosted and the application is not on my PC along with the documents that I create with it. Cloud solutions have their flexibility but you're locked and you depend entirely on that hosted service.
Ok, enough talking...I uploaded the zip file here: http://www.mediafire.com/file/kzh1l9uo40cpj1u/kicad_stepup_packages.zip
I have success!
(oops, that's suppose to be Timer1)
I only sample for 1/60 of a second. What I did was to back up all the timer registered I used and then resorted them after I was done sampling. (As opposed to initializing the registers in setup and then starting the timer when needed.)
Now I have a Nano sampling the data and sending it to a MySensors Gateway on an RPi3B+ which then sends it to an MQTT broker runing on an old laptop. Also running on the laptop is Home Assistant running inside of VirtualBox.
If MySensors does use Timer1, it appears that restoring the registers allows it to be shared.
//------------------------------------------------------ISR
ISR(TIMER1_OVF_vect){ // interrupt service routine for overflow
TCNT1 = TimerPreloadValue; // must be first line! starts the timer counting again
digitalWrite(TRIGGER_START_SAMPLE_PIN,HIGH);
samplesVolts[--sample]=analogRead(VOLTS_IN_PIN); // decrement before capturing
samplesCurrent[sample]=analogRead(CURRENT_IN_PIN);
digitalWrite(TRIGGER_START_SAMPLE_PIN,LOW);
if (!sample){ // count down to zero
digitalWrite(TRIGGER_START_SAMPLE_PERIOD_PIN,LOW); // indicate that sampling is complete
samplingEnd = micros();
TCCR1B &= 248; // turns off timer
}
}
//------------------------------------------------------sampleOneCycle
void sampleOneCycle(){
// back up timer registers
uint8_t TCNT1_b = TCNT1;
uint8_t TCCR1B_b = TCCR1B;
uint8_t TCCR1A_b = TCCR1A;
uint8_t TIMSK1_b = TIMSK1;
// configure timer which starts the sampling
noInterrupts(); // disable all interrupts
TCCR1A = 0;
TCCR1B = 0;
TCNT1 = TimerPreloadValue; // preload timer
//TCCR1B |= (1 << CS10)|(1 << CS12); // 1024 prescaler
TCCR1B &= 248; // turns off timer?
TIMSK1 |= (1 << TOIE1); // enable timer overflow interrupt ISR
// demark sampling
sample = NUMBER_OF_SAMPLES; // count down to zero
digitalWrite(TRIGGER_START_SAMPLE_PERIOD_PIN,HIGH);
samplingStart = micros();
TCNT1 = 65535; // first trigger right away!
TCCR1B |= 1; // turns on timer
interrupts(); // enable all interrupts
// wait for sampling to be complete
while(digitalRead(TRIGGER_START_SAMPLE_PERIOD_PIN)){};
samplingEnd = micros();
// restore timer registers
TCNT1 = TCNT1_b;
TCCR1B = TCCR1B_b;
TCCR1A = TCCR1A_b;
TIMSK1 = TIMSK1_b;
}
@JahFyahh - I still haven't managed to et round to it. I've been really busy since this project and its still hectic here. I'm sure i read a few reviews somewhere, here or google. Not sure.
Awesome project, I wish I made something like this.
(I actually wanted to make something like this when I was in school)
Very clean and nice presentation and realization, with a lot of attention to details. All is very realistic, I can imagine that it took quite some time making it.
Thanks for sharing the details!
Damm I am trying to get this working with a Arduino pro mini ,,but no luck wanted to use it in the car ..
How do you wire the NRF24L01+ ???
N-Channel Mosfet s ??? model number please any help much appreciated
I have tried mosfets >>>irf510n